Danaher Motion
06/2005
Input/Output
M-SS-005-03 Rev
E
153
10.3.7. PLS Output State
Query the digital output associated with the PLS to query the state of the
PLS output. For example, assume the PLS output is assigned to
SYSTEM.DOUT.1. To determine the output state of the PLS, query the state
of SYSTEM.DOUT.1:
-->?Sys.Dout.1
0 | 1
10.3.8. Set
Up
Step 1
Declare the PLS with
Common Shared <var> as PLS
in Config.Prg or at the
terminal. You must name the PLS, specify the axis that drives the PLS, and
name an output to be controlled by the PLS. For example:
Common Shared MyPLS as PLS A1 System.Dout.1
sets up MyPLS as a PLS driven by axis A1 connected to SYSTEM.DOUT.1.
The output can be a digital output (SYSTEM.DOUT.1 through DOUT.20) or it
can be one of the virtual outputs (SYSTEM.VOUT.1 through VOUT.32).
After the
Common Shared <var> as PLS
executes, the PLS is disabled.
Properties of the PLS are set as:
A single PLS position exists at 0.
The initial output polarity is 1.
PLSREPEAT
is set to 0.
The hysteresis is set to 0.
These properties may be set explicitly, as long as the PLS remains disabled.
You can check which output is associated with a given PLS using
PLSOUTPUT
.
Step 2
Create the PLS data structure and define PLS positions. The number of
defined positions is not explicitly limited. A call to
CREATEPLSDATA
creates an array of
n
positions that stores the position data. The array is 1-
based and an error is generated if you attempt to access an index outside of
the array bounds. For example:
CreatePLSData 4 MyPLS
MyPLS.PLSPosition[1] = 1000
MyPLS.PLSPosition[2] = 1100
As a short form, you can use
PPOS
in place of
PLSPOSITION
:
MyPLS.Ppos[3] = 2000
MyPLS.Ppos[4] = 2200
You cannot change PLS positions when the PLS is enabled. Position values
must be increasing monotonically.
Step 3
Set the polarity.
PLSPOLARITY
defaults to OFF, indicating the PLS state
should be OFF after the first position. Change
PLSPOLARITY
to ON to
invert the state.
MyPLS.PLSPolarity = ON
Change
PLSPOLARITY
only if the PLS is disabled.