Sample Programs - Jetter JetWeb JX2-PR0FI1 Operator's Manual

Table of Contents

Advertisement

JX2-PROFI1
8
8.1
52

Sample Programs

Example 1: Basic Program
TASK tInit
;
;
WHEN ;wait, until Init is finished
BIT_CLEAR (rPB_Status, 13)
THEN
REGISTER_LOAD (rPB_NumIn, 16) ;number of input words
REGISTER_LOAD (rPB_NumOut, 16) ;number of output words
REGISTER_LOAD (rPB_StationAdr, 4)
WHEN ;wait, until module is active
BIT_CLEAR (rPB_Status, 13)
THEN ;module has been initialized
;data exchange can be started
LABEL lEndless
GOTO lEndless
;
TASK tDataExchange
WHEN
BIT_SET (rPB_Status, 3) ;master operates the module
THEN
REGISTER_LOAD (rPB_DataIn, @500)
REGISTER_LOAD (@501, rPB_DataOut) ;transmit data
GOTO tDataExchange
End of program
8 Sample Programs
;transmit data
;to the master
;from the master
Jetter AG

Advertisement

Table of Contents
loading

Table of Contents