04-04-2012, 04:24 PM
Scan From String
string scan.pdf (Size: 66.49 KB / Downloads: 36)
format string specifies how to convert the input string into the output arguments. The default is to scan the string according to the
default format for the data types of the outputs. Formatting a time stamp as anything other than time returns an error. Right-click
the function and select Edit Scan String from the shortcut menu to create and edit the format string.
A space in format string matches any amount of white space, such as spaces, tabs, linefeeds, and form feeds.
This input accepts a maximum of 255 characters.
input string is the string path, enumerated type, time stamp, or numeric data to scan.
initial scan location is the offset into the string where the scan begins. The default is 0.
error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before
this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error
occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error
status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use
error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next
node.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that
no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a nonzero error code. If status is FALSE,
code is 0 or a warning code.
source specifies the origin of the error or warning and is, in most cases, the name of the VI or function that produced the
error or warning. The default is an empty string.
Scan From String Details
If you set format string to return numeric values in the output parameters, LabVIEW ignores white spaces in the input string.
If you wire a block diagram constant string to format string, LabVIEW uses format string to determine the number of outputs and the data
type of each output at compile time. If the types you wire to the outputs do not match the types determined by format string, you must
change the output types before the VI can run.
If you do not directly wire a block diagram constant to format string, LabVIEW checks for type mismatches at run time. If you want to scan
values that have data types other than double-precision, floating point, you must wire the data types to default 1..n.