Program interaction, Example – Parker Hannifin GEM6K User Manual

Page 18

Advertising
background image

Program
Interaction

After the connection is established, mapping has been set up, and polling enabled, the 6K starts
exchanging data automatically with the PLC. Here is how to:

• Write a binary variable to the PLC: Write a value to one of the

VARB

variables in the

NTMPWB

mapping. The new data is written to the binary file during the next poll.

• Write an integer variable to the PLC: Write a value to one of the

VARI

variables in the

NTMPWI

mapping. The new data is written to the integer file during the next poll.

• Read a binary variable from the PLC: The

VARB

variables in the

NTMPRB

mapping

correspond to the values in the binary file in the PLC.

• Read an integer variable from the PLC: The

VARI

variables in the

NTMPRI

mapping

correspond to the values in the integer file in the PLC.

Example

VARB100 = HAB79 ; Element 3 in file 10 of the AB PLC will be equal to VARB100
if(VARB106 = B1111111111111111) ; VARB106 will be equal to variable 7 in
; file 10 of the AB PLC
if(VARI129 = 17) ; Element 6 in file 20 of the AB PLC will be equal to VARI129
VARI121 = 17

; Element 4 in file 20 of the AB PLC will be equal to VARI121

page 14

Advertising
This manual is related to the following products:

6K