Topic: DMD0406 TDOPLS - Load Programmable Limit Switch Table for Table Driven Output |
|
A Load Programmable Limit Switch Table for Table Driven Output (TDOPLS) contains a table with a series of start and stop positions similar to the cams on a shaft. These cam positions are compared to the current count value of the specified Master Register. When the count value falls between any of the positions in the table the discrete output is turned ON or OFF relative to the specified Default Output State. Each table can have up to 64 cam positions; these positions can be entered as constant values directly in the instruction, or as variable values read from PLC memory locations when the instruction is first enabled.
Each PLS table compares the count value of one High-Speed I/O input and will control one High-Speed I/O discrete output. This instruction loads a table of values for a Table Driven Output and enables the process that runs the table. The specified High-Speed I/O discrete output will remain under control of that table of values until a Deconfigure Table Driven Output (TDODECFG) instruction is executed for the Table Driven Output.
Each Table Driven Output has an associated structure which contains an EnableOutput field. If this Bit is ON the current ON / OFF state of the PLS Table will be written to the Table Driven Output. This Bit is automatically set ON when the PLS Table is first loaded, and automatically turned OFF when the Table Driven Output is deconfigured. The ladder logic program can manually turn this Bit OFF to stop the table from writing it's state data to the Table Driven Output without having to use a TDODECFG - Deconfigure Table Driven Output to do so.
A graph of the current PLS Table configuration is displayed at the bottom of the editor which shows each of the entries. Clicking on the graph will place the cursor on the table entry that contains that location.
Table Driven Output Device selects which Table Driven Output this instruction will use. A Table Driven Output can only be selected for use by one Preset Table or Programmable Limit Switch at a time.
Master Register selects the BRX High-Speed I/O channel that will provide the source count value. This can be from the on-board High-Speed I/O or from a BRX HSIO module (BX-HSIO1, BX-HSIO2, or BX-HSIO4).
Initialize .InputValOffset will initialize this field in the PLS Table's associated structure to the value specified when the instruction is first enabled. This value can be changed while the PLS Table is executing. See the full discussion of this value in the section below.
Use Source Register Scaling specifies whether the table entries are raw count values or values that have been scaled the same as the Master Register.
This instruction can source the values for the PLS table by one of two methods: entering the table's values as Signed DWord constants directly in the instruction, or load the table's values from PLC memory when the instruction is first enabled.
Load Raw PLS Data from Data Block: enable this option to have the instruction load the contents of the PLS Table from consecutive locations in a block of Signed DWord memory locations in the PLC: this will disable the ability to enter the values as Signed DWord constants directly in the instruction.
Default Output State specifies the state of the first entry in the table.
This section is enabled if the PLS table's values will be entered as Signed DWord constants directly in this instruction.
(Raw / Scaled) PLS Count Entries: Output (ON / OFF) When - contains a list of cam positions. Any time the Master Register's current count value falls within any of the cam positions the Table Driven Output will be set ON, if the current count value falls outside of all of the cam positions the Table Driven Output will be set OFF.
The On Success and On Error parameters specify what action to perform when this instruction completes. You do not have to use the same type of selection for both On Success and On Error.
If the Set Bit selection is used for either On Success or On Error, the specified BIT location will be SET OFF when the instruction is first enabled and will remain OFF until the instruction completes. Once complete, the appropriate Success or Error bit location ON. The specified Bit location is enabled with a SET (Latch) operation meaning that it will remain ON even if the input logic for the instruction goes OFF.
If the JMP to Stage selection is used for either On Success or On Error the target Stage must be in the same Program code-block as this instruction, you cannot specify a target Stage that exists in a different Program code-block. When the operation finishes, the target Stage will be enabled the same way as a standalone Jump to Stage (JMP) instruction would do it. The JMP to Stage option will only be available if this instruction is placed in a Program code-block.
On Success selects which of the following actions to perform if the operation is successful:
On Error selects which of
the following actions to perform if the operation is unsuccessful:
If either the On Success or On Error selections are set to JMP to Stage, Automatically create the SG box for any NEW stage number will be enabled which will automatically create any target stage that does not already exist.
|
|
Table Driven Output Structure:
Each time a Table Driven Output is created there is an associated structure automatically created by the same name - with a prepended $. This structure will contain member fields that can be used in the Program to interact with the Table Driven Output. Each of these structures contain the following fields:
.EnableOutput: if this Bit is ON the current ON / OFF state of the PLS Table will be written to the Table Driven Output. This Bit is automatically set ON when the PLS Table is first loaded, and automatically turned OFF when the Table Driven Output is deconfigured. The ladder logic program can manually turn this Bit OFF to stop the table from writing it's state data to the Table Driven Output without having to use a TDODECFG - Deconfigure Table Driven Output to do so.
.ResetLevel: not used by PLS Table.
.ResetEdge: not used by PLS Table.
.OutputState (read only) is the ON / OFF state of the Output that will be written to the Table Driven Output if EnableOutput is ON.
.StepNumber (read only) is the step number from the table that is currently active. A step number of -1 indicates the PLS Table is between ON positions or is unconfigured.
.InputValOffset is used to adjust the current count value from the Master Register by a user determined amount before the comparison in the Step is performed. The following are a few examples where this is used:
.Done (read only): not used by PLS Table.
.Event1 - .Event6 - (Read-only): not used by PLS Table.
|
|
Status Display:
The red triangle in the upper left corner of the status display indicates this is a Fully Asynchronous instruction.
The gray triangle at the right end of the input leg indicates the input is edge-triggered, meaning this instruction will execute each time the input logic transitions from OFF to ON.
OutputState / EnableOutput - the current values of these numeric fields from Table Driven Output's associated structure.
|
|
See Also:
TDODECFG - Deconfigure Table Driven Output
TDOPLS - Load Programmable Limit Switch Table for Table Driven Output
TDOPreset - Load Preset Table for Table Driven Output
|
|
Related Topics:
BRX Pulse Width Modulated Outputs
|
|
Example:
|
|