Difference between revisions of "AXY:PLS Software Specification"
m (→PLS Commands) |
|||
Line 129: | Line 129: | ||
− | [[Category:softMC Firmware | + | [[Category:softMC Firmware]] |
[[Category:Motion Control]] | [[Category:Motion Control]] |
Revision as of 08:18, 26 May 2014
Contents
Refer to
Introduction
A programmable limit switch (PLS) is a mechanism which triggers a system output when a specified axis position is reached. The PLS implementation in the softMC has the following features:
- Multiple position specifications
- PLS pattern repetition
- Position hysteresis
- Enabling and disabling of PLS
- The output may be digital or virtual
This article specifies the PLS functionality as it is implemented in the softMC. The functionality is described and the supporting commands are defined.
Definitions
PLS – Programmable limit switch.
PLS – Position specified in the PLS command, at which the state of the output is toggled.
Digital output – Can be mapped to a device that resides on the motion bus, to either one of the drive outputs, or to EtherCAT/CAN I/O block.
(Local is not supported in firmware version 5.0 and later; it is supported only in legacy SERCOS II motion controller.)
Soft output – One of the 32 virtual outputs.
PLS Functional Description
PLS Polarity
The output polarity is determined via the polarity property of the PLS. This property determines the output polarity of the first entry of the PLS position table i.e. in the segment between the first and second entries. If the actual location of the axis is elsewhere, the output polarity will be determined accordingly so when the axis will reach the first segment the polarity will be as indicated.
For example: consider the following PLS whose positions are 10, 25, 30, 50, 65, and polarity is 0, as shown in this figure.
As can be seen, the polarity of the first segment (between 10-25) is as indicated by the polarity (1). Enabling the PLS in any other segment will cause the output to be as indicated in the figure.
Output State
A PLS causes an output (digital or virtual) to be triggered when a specified axis position is reached. The initial state of the output will be determined by the PLS polarity property. When the position is reached, the state of the output is toggled. The state is also toggled each time the position is reached, irrespective of the direction of motor travel.
Multiple positions may be specified, in which case the state of the digital output will be toggled as each position is reached. For example, consider the following PLS specification: positions 100 and 200 are specified, and the initial state of the digital output after enabling is 0. The following table illustrates how the state of output changes with changing position.
Position | Output State |
0 | 0 |
100 | 1 (Toggle) |
150 | 1 (No change) |
200 | 0 (Toggle) |
210 | 0 (No change yet) |
200 | 1 (Toggle again) |
150 | 1 (No change) |
100 | 0 (Toggle again) |
If the axis position were to oscillate around a specified PLS position, the output would be triggered each time the specified position was crossed.
The initial output state is specified implicitly by the user. The output is set to this state when the PLS is enabled.
PLS Position Data
The PLS position data is stored in a data structure that belongs to the PLS mechanism. This data structure is explicitly created, using the CreatePlsData command.
The PLS data has read/write access. The user must ensure that the PLS position data is monotonic (to allow a PLS to be enabled).
Hysteresis
If the axis were to stop on a specified PLS position, the state of the digital output may be continually toggled, due to slight instability in the actual axis position. In this case, a hysteresis value may optionally be specified. The output state will be toggled when the PLS position is reached, and is passed by the hysteresis value. If, as shown in this example, the hysteresis value is 10, then the output will change from Low to High at position 110. It will revert to Low when the position goes down to 90.
Repetition Interval
PLS positions may be continually repeated at a specified interval. Thus if a PLS position of 100, for example, is specified with a repetition interval of 2000, then the output state will be toggled at 100, and again at 2100, 4100, and so on, in the positive direction, and at -1900, -3900, and so on in the negative direction.
The repetition interval must be positive, and it must be greater than the absolute value difference between the least and greatest PLS position values. That is:
Repetition Interval > abs(PLS_Pos_Max - PLS_Pos_Min)
Example:
- PLS Position values: -300, 100, 200
- Repetition Interval: 2000
- Polarity: 0
The output state will be toggled at -300, 100, 200, as well as at 1700 (-300 + 2000), 2100 (100+2000), 2200, and at 3700 (-300 + 2000 + 2000) etc. In the negative direction, the output state will be toggled at -1800 (200 - 2000), -1900 (100 - 2000), -2300 (-300 - 2000), -3800 etc.
PLS Constraints
- The number of PLSes is not be limited by the system. It is understood that there is a direct tradeoff between the number of PLSes defined and the system performance.
- The number of PLS positions defined per PLS is not be limited.
- More than one PLS may be defined per axis.
- PLSes are scanned at the motion bus cycle rate.
Command Set
A PLS is defined using the syntax for variable declaration. The following PLS properties are defined:
- PLS name
- Axis
- Output name
- One or more PLS positions
- Optional initial output state
- Optional repetition interval
- Optional hysteresis setting