User's Manual

PMAC User Manual
Table of Contents xi
Compiled PLC Programs.......................................................................................................................................237
Execution of Compiled PLCs............................................................................................................................238
Preparing Compiled PLCs................................................................................................................................238
Variable Value Assignment Statements ............................................................................................................240
Integrating PLC Files ............................................................................................................................................243
Link Address File..............................................................................................................................................243
Executing the Compiler ....................................................................................................................................243
Compiler Errors................................................................................................................................................244
Compiler Processing ........................................................................................................................................244
Downloading the Compiled Code to PMAC.........................................................................................................245
Running the Compiled PLCs.............................................................................................................................245
WRITING A HOST COMMUNICATIONS PROGRAM...................................................................................247
Communicating From a Host Computer ...............................................................................................................247
Polled vs. Interrupt-Based Communications ....................................................................................................247
Serial Port Communications.............................................................................................................................247
Setting up the Interface.....................................................................................................................................247
Host Port Bus (PC/STDbus) Communications......................................................................................................249
Host Port Structure...........................................................................................................................................249
Base Address Selection .....................................................................................................................................249
Register Functions............................................................................................................................................249
Registers for Simple Polled Communications...................................................................................................249
Setting up the Port ............................................................................................................................................249
Sending a Character .........................................................................................................................................250
Reading a Character.........................................................................................................................................250
Using the PMAC PC/STD to Interrupt the Host Computer...................................................................................250
What Signals Can Be Used ...............................................................................................................................250
Selecting a Host Interrupt Line (PMAC PC or Lite).........................................................................................252
Selecting a Host Interrupt Line (PMAC STD) ..................................................................................................252
Interrupt Functions...........................................................................................................................................252
Setting Up .........................................................................................................................................................255
Finding an Open Interrupt Line........................................................................................................................255
Hardware Considerations.................................................................................................................................255
Initializing the PC’s PIC...................................................................................................................................255
Vectoring ..........................................................................................................................................................256
Setting up the Host Request Function...............................................................................................................256
Initializing the PMAC PIC................................................................................................................................256
Unmasking Interrupts .......................................................................................................................................256
Using the Interrupts..........................................................................................................................................257
Restoring Previous Vectors ..............................................................................................................................257
VMEbus Communications ....................................................................................................................................257
Setting up The Base Address for PMAC VME ..................................................................................................257
Address Modifier ..............................................................................................................................................258
Address Modifier Do Not Care Bits..................................................................................................................259
PMAC Base Address Bits..................................................................................................................................259
Interrupt Level ..................................................................................................................................................259
Interrupt Vector Number ..................................................................................................................................259
Dual-Ported RAM Base Address ......................................................................................................................259
DPRAM Enable ................................................................................................................................................260
Address Bus Width............................................................................................................................................260
Saving These Setup Values ...............................................................................................................................260
Setting up VME Dual-Ported RAM (Option 2V)..................................................................................................261
Starting Address................................................................................................................................................261
Talking to PMAC VME through the Mailbox Registers....................................................................................262
Sending Commands to PMAC VME through Mailbox Registers......................................................................263
Reading Data from PMAC VME through Mailbox Registers...........................................................................264