JX2-PROFI1
8 Sample Programs
52
Jetter AG
8
Sample Programs
8.1
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) ;transmit data
;to the master
REGISTER_LOAD (@501, rPB_DataOut) ;transmit data
;from the master
GOTO tDataExchange
End of program
Summary of Contents for JetWeb JX2-PR0FI1
Page 1: ...Article 608 641 01 November 2002 Printed in Germany ...
Page 4: ...JX2 PROFI1 Table of Contents Jetter AG 4 ...
Page 13: ...1 Safety Instructions JetWeb 13 Jetter AG ...
Page 15: ...JetWeb 15 Jetter AG Fig 3 Side View JX2 PROFI1 Fig 4 Top View JX2 PROFI1 ...
Page 19: ...JetWeb 19 Jetter AG ...
Page 21: ...JetWeb 21 Jetter AG ...
Page 23: ...JetWeb 23 Jetter AG 5 3 Features ...
Page 43: ...JetWeb 43 Jetter AG ...
Page 45: ...JetWeb Jetter AG 45 ...
Page 62: ...JX2 PROFI1 8 Sample Programs 62 Jetter AG ...
Page 63: ...JX2 PROFI1 Appendices Jetter AG 63 Appendices ...