5. SEQUENCE PROGRAMS AND SFC PROGRAMS
5
−
10
[Error Details]
(1) In the following cases, an operation error occurs and the DSFLP instruction is
not executed.
•
When the setting for (D) is other than 1 to 4 or 1 to 8.
•
When the setting for n is a value other than 1 or 0.
•
When the setting for (D) or n has been indirectly designated using an index
register (Z, V).
(2) In the following cases, a minor error (error on control change) occurs and the
current value change is not executed.
When this happens, the error detection flag (M1607+20n) is turned ON and the
error code is stored in the minor error code area for the relevant axis.
•
When the axis designated in (D) for the current value change is in motion.
[Program Example]
(1) The program shown below changes the current value for axis 2 to the value
designated with an 8-digit digital switch.
(a) Conditions, ,
1) Numbers of inputs for the digital switch ........ X010 to X02F
2) Current value change command................... Leading edge
(OFF
→
ON) of X000
3) Current value change execution flag ............ M0
4) Axis 2 start accept flag
(used to determine whether axis 2 is
stopped or in motion) .................................... M2002
(axis 2 start accept flag)
(2) Program example.
Start accept flag
When X000 comes ON, M0 is turned ON.
0
2
CIRCUIT END
X000
M0
SET M0
DSFL D2 0
K
M2002
P
RST M0
DBIN X0010 D966
K8
P
The value set with the digital switch is stored
in the current value change register for axis
2 (D966, D967).
Axis 2 current value change execution
request
M0 turned OFF.
Downloaded from