ETEL Doc. - Operation & Software Manual # DSC2P 903 / Ver. F / 3/6/05
Chapter C: System functions
Operation & Software Manual
Direct Drives & Systems
193
13.8.6.3 Example 3: ’Simple clock’ type
• The motor is initialized and it is going to complete a series of small movements.
• A clock is switched on. It jumps to label 50 every 10 seconds.
• At label 50, DOUT 7 is set to 1.
• After some time, digital output is switched off
Sequence:
:79.1
;Label 79: The following sequence starts automatically
PWR.1=1
;Motor phasing
IND.1
;Looking for the index
R0:8.1=40
;Type of RTI: ''Simple clock'' (
).
R0:9.1=50
;Jumps to label 50 (
R0:10.1=1
;Does not wait for the end of the commands 'wait' (
).
´Simple clock array´
R0:1.1=0x0001000B
;X11 variable to increment (hexa), (
).
R0:2.1=0x0001000A
;X10 variable as a limit (hexa), (
R0:3.1=0x020200AB
;Bit 2 from digital outputs (hexa), (
).
R0:4.1=1
;Digital outputs set to 1 (
).
X11.1=0
;Clock initialization
X10.1=10000
;Clock limit initialization
K191.1=1
;The first RTI line is
valid
)
K192.1=1
;The first RTI line is
enabled
K193.1=0
;Reset the flag of the activated RTI
RIE.1
;Sets the controller in the
RTI enable mode
:20.1
;Label 20: Any sequence of movements
POS.1=0
;Goes to the position 0
WTM.1
;Waits until the movement is finished
POS.1=200000
;Goes to the position 200000
WTM.1
;Waits until the movement is finished
JMP.1=20
;Jumps to label 20
:50.1
;Label 50:
Start
of ''Simple clock''
RTI processing
X11.1=0
;Switches the clock on again
DOUT.1=&64
;Outputs 1 to 7 switched off
WTT.1=500
;Waits 500ms
K171.1=0
;Digital Output is switched off
K191.1=1
;
Every preset RTI validated
(
)
REI.1
;
Back to the sequence and RTI activation
(
END.1
Содержание DSC Series
Страница 2: ...THIS PAGE IS INTENTIONALLY LEFT BLANK ...