Topic: DMD0004 INIT - Initialize Data |
|
The Initialize Data (INIT) instruction sets the value of each numeric or discrete element to the specified value.
The Initialize Data instruction can have up to 50 rows, with each row containing one element, or one range of elements. If a range of elements is specified. All of the elements within that range will be set to the same specified value. 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 - inserts an empty row before the currently selected row / Remove - deletes the currently selected row.
Move Up / Move Down- moves 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.
Start - identifies the writable element or the first writable element of the range.
End - (optional) identifies the last writable element of the range (leave this field blank if there is only one value be initialized).
Value - specifies the value that each location in the range will be set to.
|
|
Ladder Display:
By default, the INIT instruction will expand vertically to display all of the steps in the instruction. The displayed size of the instructions can be limited to a single line that displays the total number of steps by setting the View -> Options -> Ladder Tab -> Lengthy Instructions... option to 'Display Short Summary'.
The resulting status display will be reduced to the following:
|
|
See Also:INIT - Initialize Data
MAPIO - Map
Inputs and Outputs
REFWRITE
- Write Value Indirectly
STRCOPYR - Copy a Range of Strings
|
|
Rung Example:
|
|