Owning Palette: Data Manipulation Functions
Requires: Base Development System
Converts binary string to the type wired to type. binary string should contain flattened data of the type wired to type. You also can use this function to specify the byte order, or endian format, of the data in the binary string.
Add to the block diagram | Find on the palette |
type is a normally constructed LabVIEW type. type is not the type string output in the Flatten To String function. | |||||||
binary string is a flattened string that is typically generated by the Flatten To String function. If data includes array or string size? is TRUE, binary string contains header information describing its size. | |||||||
data includes array or string size? indicates whether LabVIEW reads data size information from the beginning of an incoming array or string. If data includes array or string size? is TRUE, LabVIEW reads the size information from the beginning of binary string. If data includes array or string size? is FALSE, LabVIEW detects the size information from the memory size of binary string. The default is TRUE. data includes array or string size? only accesses the top-level data size information. Arrays and strings in hierarchical data types such as clusters always include size information. | |||||||
byte order indicates the endian format of the data in the incoming flattened string. Byte order, or endian form, indicates whether integers are represented in memory from most-significant byte to least-significant byte or vice versa.
|
|||||||
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | |||||||
rest of the binary string contains any leftover bytes that this function did not convert. This function does not convert all the bytes if the size of binary string is not a multiple of the size of type. | |||||||
value returns binary string as unflattened data of the same data type and structure as type. | |||||||
error out contains error information. This output provides standard error out functionality. |
Use the Type Cast function for conversion of data types that does not require already-flattened data.
If you need to unflatten data from a string created by LabVIEW 4.x or earlier, right-click this function and select Convert 4.x Data from the shortcut menu. In Convert 4.x Data mode, this function interprets the data in LabVIEW 4.x data storage layout and displays the icon for this function with a red 4.x on it. LabVIEW 4.x and earlier stores Boolean data in two bytes unless the data is in an array, in which case LabVIEW stores each Boolean element in a single bit. LabVIEW 5.0 and later stores Boolean values in a single byte, regardless of whether it is in an array. National Instruments recommends reworking any application that uses the Convert 4.x Data mode as a long term solution.
Refer to the following VIs for examples of using the Unflatten From String function: