Operation & Software Manual
192
Direct Drives & Systems
Chapter C: System functions ETEL Doc. - Operation & Software Manual # DSC2P 903 / Ver. F / 3/6/05
13.8.6 RTI programming examples
13.8.6.1 Example 1: ’Window test’ type
Tests if the X1 variable is inside the limit defined by X2 and X3.
Set the DOUT1, if it is the case.
Sequence:
:5.1 ;Start of the sequence.
X1.1=0 ;Sets the X1 variable
X2.1=20 ;Sets the X2 variable
X3.1=40 ;Sets the X3 variable
R0:8.1=22 ;Type of RTI.
R0:9.1=255 ;Does not jump to a label.
R0:10.1=1 ;Does not wait on the 'wait' command
R0:1.1=0x00010001 ;Variable to test X1
R0:2.1=0x00010002 ;Inferior limit, X2 variable
R0:3.1=0x00010003 ;Superior limit, X3 variable
R0:4.1=0x000200ab ;Bit to modify, DOUT1 (parameter K171)
K191.1=1 ;Valid RTI line
K192.1=1 ;Enables the RTI line
RIE.1 ;Sets the controller RTI enable mode
13.8.6.2 Example 2: ’Bit test' type
Test if the din1 comes to 1 and jump to label 200.
P3 is not included, because P4 = 0 in this case.
Sequence:
:5.1 ;Start of the sequence.
R0:8.1=3 ;Type of RTI.
R0:9.1=200 ;Jumps to label 200.
R0:10.1=1 ;Does not wait on the 'w..' command
R0:1.1=0x00030032 ;Bit 0 of DIN1 (M50).
R0:2.1=8 ;State 1
R0:4.1=0 ;No modification of P3
K191.1=1 ;Valid RTI line
K192.1=1 ;Enables RTI line
RIE.1 ;Sets the controller RTI enable mode
:200.1 ;Label 200.
….. ;Commands
K193.1=0 ;Resets the flag
REI.1 ;Back to the sequence and RTI activation