3. Instruction Set
API
Mnemonic
Operands Function
199 D
ICF
Immediately change frequency
Type
OP
Bit Devices Word devices Program Steps
X Y M S K H KnX
KnY
KnM
KnS
T C D E F
DVSPO: 13 steps
ES2/EX2
SS2
SX2
ES2/EX2 SS2
SX2
ES2/EX2
SS2
SX2
Operands:
S
1
: Target frequency to be changed S
2
: Gap time and gap frequency D: Pulse output
device (Y0, Y2)
Explanations:
1. Max frequency for S
1
: 100kHz. When ICF instruction executes, frequecy changing will start
immediately with ramp-up/down process.
2. ICF instruction has to be executed after the execution of DVSPO or DPLSY instructions. When
the instruction is used together with DVSPO, operands S
1
, S
2
, D of DICF has to be assigned
the same device with S
1
, S
3
, D of DVSPO. When the instruction is used with DPLSY, operands
S
1
and D has to be assigned the same device with S
1
and D of DPLSY.
3. If ICF instruction is used with DPLSY instruction, operand S
2
is invalid.
4. When ICF instruction is used with DVSPO instruction, parameter setting of S
2
functions the
same as S
3
in
DVSPO instruction, specifying the gap time and gap frequency of ramp-up/down
process.
5. D pulse output device supports only Y0 and Y2.
6. The instruction is suggested to be applied in interrupt subroutines for obtaining the better
response time and eexecution results
7. For associated flags and registers, please refer to Points to note of API 198 DVSPO
instruction.
Function Explanations:
1. If users change the target frequency by using DVSPO instruction, the actual changing timing will
be delayed due to the program scan time and the gap time as below.
Freq.
Time
Gap freq.
Delayed by program scan cycle
Gap
time
Gap
time
Change target freq.
Actual timing of changing