Topic: DMD0074

SUBSCRIB - Translate to Do-more


The Translate to Do-more instruction (SUBSCRIB) copies and converts data that is not directly usable by the controller to a data format that is usable. Typically this is data that originated on an external source. For example: converting BCD data that came from a DirectLOGIC controller, or byte-swapping data that came from a Modbus source.

 

 

Each Translate to Do-more instruction can have from 1 to 255 rows of data blocks to convert. For each of the rows, this instruction will copy each of the Elements from the Source block to the Destination block, converting each of them from the specified format to the native data format of the Destination block.

 

There is no sequencing or stepping regarding the rows in this instruction, every row in the instruction is processed every time the instruction is executed.

 

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
     

  • Edit - brings up the editor for the currently selected row

  • Insert - inserts a new row in the instruction before the currently selected row

 

  • Remove - removes the currently selected row

 

  • Move Up - moves the currently selected row up one row

  • Move Down - moves the currently selected row down one row

 

Parameters:

Note: Use the F9 key (Element Browser) or Down-Arrow key (Auto-Complete) at any time to see a complete list of the memory locations that are valid in the current field of the instruction.

 

Source - designates the beginning address of the block of data to be copied and converted. This can be any readable numeric location.

 

As - designates the data format of the elements in the specified Source block
 

 

Format

Size

Signed

Unsigned

BCD

Real

Byte

Ok

Ok

Ok

n/a

Word

Ok

Ok

Ok

n/a

DWord

Ok

n/a

Ok

Ok

 

Destination - designates both the type of data conversion to do and the beginning address of the block to store the converted data. For example, if the Destination is R100, the target format is Real and the beginning address is 100. The Destination can be any writable numeric location.

 

#Elements - designates the number of Source locations to convert. This can be any constant value between 1 and 255.

 

Reverse Bytes - checking this option will cause the Bytes of each Source Word or DWord to be swapped before the data conversion operation is applied.

 


Status Display:

The status display of the SUBSCRIB instruction is a textual description of the data conversion.

 

 


See Also:

 


Rung Example: