Topic: DMD0005 MAPIO - Map Inputs and Outputs |
|
The Map Inputs / Outputs (MAPIO) instruction maps real-world I/O to specific elements in situations where the I/O may move but they are mapped to fixed element addresses. When the instruction is enabled the values of the Source variables are copied to the Destination variables.
When used as intended it will map Discrete Inputs (X) to internal Bits (C) and Analog Inputs (WX) to Numeric elements (N), and then internal Bits (C) to Discrete Outputs (Y) and internal Numeric elements (N) to Analog Outputs (WY).
There will typically be a pair of Map Inputs / Outputs Instructions: one at the top of scan for mapping the Discrete and Analog inputs to internal memory, and one at the bottom of the scan for mapping internal memory to Discrete and Analog outputs.
This instruction can be used to move any element to any element, but its primary purpose is as an instruction for mapping real-world I/O to internal memory. The System Tasks $tTopOfScan and $tBottomOfScan are the recommended code blocks to place this pair of instructions. Row Editor Keys:The following functions are used to add or remove rows, edit existing rows or reorganize the rows in the instruction.
Ok closes the editor, saving any changes / Cancel closes the editor, discarding any changes.
Insert adds an empty row before the currently selected row / Remove deletes the currently selected row.
Move Up / Move Downmoves the currently selected row up one row or down one row respectively.
|
|
Parameters:Note: Use the F9 key or click the 'three dot box' at the right edge of the parameter field to open the Default Element Selection Tool (the Element Picker or the Element Browser) or use the Down-Arrow key (Auto-Complete) on any parameter field to see a complete list of the memory locations that are valid for that parameter of the instruction.
Source specifies the input
locations.
Destination specifies the output locations.
|
|
See Also:
MAPIO
- Map Inputs and Outputs
REFWRITE
- Write Value Indirectly
STRCOPYR - Copy a Range of Strings
|
|
Rung Example:
|
|