Programmable limit switch (pls) – Yaskawa MotionWorks+ Windows Software User Manual

Page 196

Advertising
background image

Standardized Template Project

MotionWorks+™

190

Programmable Limit Switch (PLS)

Because the controlled axis is configured in rotary mode, the system variable
mPosition_Actual rolls over automatically at the system variable sMachineCycle_Main.
Therefore, mPosition_Actual can be used as the “Encoder Variable” in the PLS block (5).
For systems where rotary mode is not applicable, mPosition_Actual (in a user variable,
such as [PositionCapture]) can be captured in the SET VARIABLE block (5) prior to
motion. Then, to make the PLS easy to setup (i.e. elements relative to move length) the
“Encoder Variable” could be configured as a calculation; mPosition_Actual – Position-
Capture.

The PLS block implemented in this project is executed in this subroutine and therefore
relies on the MOVE block (4) Wait for Completion box to be un-checked. It is used in
conjunction with the IF EVENT Block (6) that checks for move completion (system vari-
able mPosition_Complete). The PLS is updated while in motion.

Entries for (Value >) and (< Value) can be implemented as fixed numbers, user variables,
system variables, and any combination thereof. In addition, the entries can be calcula-
tions, especially useful for applications where PLS outputs also depend on machine speed.
Take care to use ‘C’ syntax in calculations. Lastly, when implementing values that go
through (past) zero, it is best to split them up in to two segments [(Value>) to 0] and [0 to
(<Value)] that set internal User bits. Then in a SET VARIABLE block, use those internal
user bits OR

ed

together to set the correct output.

Advertising