3. Instruction Set
API
Mnemonic Operands Function
198
D
VSPO
Variable speed pulse
output
Type
OP
Bit Devices Word devices Program Steps
X Y M S K H KnX
KnY
KnM
KnS
T C D E F
DVSPO: 17 steps
ES2/EX2
SS2
SX2
ES2/EX2 SS2
SX2
ES2/EX2
SS2
SX2
Operands:
S
1
: Target frequency of output S
2
: Target number of pulses S
3
: Gap time and gap
frequency D: Pulse output device (Y0, Y2)
Explanations:
1. Max frequency for S
1
: 100kHz. Target frequency can be modified during the execution of
instruction. When S
1
is modified, VSPO will ramp up/down to the target frequency according
to the ramp-up gap time and gap frequency set in S
3.
2. S
2
target number of pulses is valid only when the instruction is executed first time. S
2
can NOT
be modified during the execution of instruction. S
2
can be a negative value, however, if the
output direction is not specified in D1220/D1221, PLC will take this value as a positive value.
When target number of pulses are specified with 0, PLC will perform continuous output.
3. S
3
occupies 2 consecutive 16-bit devices. S
3
+0 stores the gap frequency S
3
+1 stores the gap
time. Parameter setting can be modified during the execution of instruction. Set range for
S
3
+0: 1Hz ~ 32767Hz; set range for S
3
+0: 1ms ~ 100ms. (for SE series, the set range for
S
3
+0 is 1 ~ 40ms) If set value exceeds the available range, PLC will take the upper or lower
bound value.
4. D pulse output device supports only Y0 and Y2. If Y1 and Y3 is required for output direction
control, D1220 or D1221 has tobe set as K1(Pulse/Dir).
5. Parameters set in S
3
can only be modified while modifying the value in S
1.
When target
frequency is set as 0, PLC will ramp down to stop according to parameters set in S
3
. When
the output is stopped, PLC will enable the flags indicating pause status (Y0: M1538, Y2:
M1540). If target frequency other than 0 is specified again, pulse output will ramp up to
target frequency and operates untill target number of pulses are completed.