K
K
K
K inco
inco
inco
inco -K
-K
-K
-K S
S
S
S series
series
series
series
34
only, if user needs to modify the current value, it can use following methods.
•
•
•
• Method
Method
Method
Method 1
1
1
1
User reset bit to clear current value.
The reset bits for 4 output channels are SM201.6 、 SM231.6 、 SM251.6 and SM221.6 .
When the reset bit is 1, PLC will set the current value as 0.Therefore, t only needs one scan time for the
reset bit to activate. When it needs to use this bit, try to avoid to keep this bit always 1 and also and also
avoid to set this bit while the Position Control instruction (Include PHOME, PREL, PABS, JOG and PFLO_F)
is executing , othe rwise the counting value may be wrong.
Following takes channel 0 as example to describe how to reset current value.
(* Network 0 *)
(*Based on homing signal, when it moves to homing, it requires to clear current value*)
LD %SM0.0
PHOME 0, %M0.0, %M0.1, %M0.2, %VW0, %VW2, %VW4, %VD6, %VW10, %M0.4, %M0.5, %MB1
(* Network 1 *)
(*After PHOME finishing, it uses finishing bit “ DONE ” to clear current value*)
LD %M0.4
R_TRIG
ST %SM201.6
•
•
•
• Method
Method
Method
Method 2
2
2
2
Modify current value by using following registers.
Q0.0 Q0.1 Q0.4 Q0. 5 Description
SMD208 SMD238 SDM258 SDM2 22
Read/Write. New current value. Use to modify the
current value together with specific control bit.
SM201.4 SM231.4 SM251.4 SM2 21 .4
Read/Write. Use to modify current value.
1 - Modify current value.
0 - Maintain the current value. 。
Here takes channel 0 as example to describe the method: If SM201.4 is 0,then it will maintain the current
value SMD212. If SM201.4 is 1, then it will move the value of SMD208 to SMD212.When it needs to use
this bit, avoid to keep this bit always 1 and also avoid to set this bit while the Position Control instruction
(Include PHOME, PREL, PABS, JOG and PFLO_F) is executing, otherwise the counting value may be