Download PMAC-NC Pro2 Software Reference Manual
Transcript
PMAC-NC Pro2 Software Reference Manual System Variables #1000-#1031 Discrete Inputs Parametric programming allows the use of discrete inputs from within NC programs. The useable parametric input variable range is from #1000 to #1031 (32 total). Each parametric variable represents a single bit of a 32-bit address in PMAC’s Dual Ported Ram. The 32-bit address is defined as follows and can be found in the Address.H file: #define IN_2_M M231 The integrator should use a mirror-image technique to transfer information from whatever particular I/O accessory being used into the IN_2_M 32-bit word. An additional 32-bit address to temporarily store the actual input state is provided and is as follows: #define IN_2_CHNG_M M241 Because of the multitude of hardware configurations supported it is up to the machine builder or integrator to implement this functionality. Example PLC Code: //--------------------// I/O Accessory Inputs //--------------------IN_2_CHNG_M = ACTUAL_INPUT_WORD IF (IN_2_M != IN_2_CHNG_M) IN_2_M = IN_2_CHNG_M // Inputs Changed? // Update change flag ENDIF How to Use in the NC program: 1. Start the NC program. 2. Select DIAG (F6) from the main menu and then PRM VAR(F2). 3. Select COMMON VARIABLES #100-131 from the variables pull down menu. 4. In the MDI mode, write the following program: G103 P1 #100 = #1000 #101 = #1001 #102 = #1002 #131 = #1031 M30 (Use M99 for continuous execution) 5. Execute the MDI program by pressing Cycle Start. If the inputs are connected, their values will be displayed. If the inputs are not connected, use PEWIN32 and write M231 = 7 and the DIAG page will display #100= 1, #101 = 1 and #102 = 1. Discrete Outputs #1100 - #1131 Parametric Programming 163