Topic: DMD0307 STRPUTB - Put Bytes Into a String |
|
|
|
The Put Bytes Into a String (STRPUTB) instruction will copy bytes of data from memory locations in the controller and place them in the specified String.
This instruction is not intended to operate on Strings containing ASCII text. The primary use of this instruction - and its companion instruction Get Bytes Out of a String (STRGETB) - is in creating protocol drivers, where the data is not ASCII text but 16-bit, or 32-bit, or floating point numbers.
|
|
Element References:Note: Use the F9 key (Element Browser) at any time to see a complete list of the memory locations that are valid in the current field of the instruction.
Put Into String - designates the String to receive the bytes of data. This can be any of the system-defined Short Strings (SS0 - SS127), or system-defined Long Strings (SL0 - SL63), or any user-defined Strings.
Start at Index - designates the location in the String to begin placing the bytes of data. This can be any readable numeric location or a constant value from 0 to the maximum number of characters in the string.
Length in Bytes - designates the total number of bytes of data to copy and place in the string. This can be any readable numeric location or a constant value from 1 to the maximum number of bytes available in the string.
From Starting Element - designates the first location in the controller where the bytes of data are copied from. This can be any readable numeric location.
|
|
|
|
Status Display:The Status display of the Put Bytes Into a String instruction will only display as many of the characters of the Put Into String as will fit within the borders of the instruction, typically this is about 50 characters.
|
|
|
|
See Also:
|
|
|
|
Rung Example:
|
|
|