Omron FZ4 Series User Manual page 284

Vision sensor
Table of Contents

Advertisement

Description
The numeric value specified by the <Expression> is converted into a character string. A numeric value
cannot be directly assigned to a character variable. It is assigned to a character variable after it has been
converted to a number in character notation in accordance with the specified format using the Str2$
function.
Specify the number of integer digits in <Integer Part>.0 - 8 can be specified. When 0 is specified, it is
taken to mean "all of the digits present".
Example: In the case where 0 is specified for the Integer Part.
If the <Expression> is 99, then it becomes 99
If the <Expression> is 999, then it becomes 999
Specify the number of fraction digits in the <Fractional Part>.0 - 5 can be specified.If 0 is specified,
4
everything after the radix point will be rounded up.
Example: In the case where 0 is specified for the Fractional Part.
If the <Expression> is 99.099, then it becomes 99
If the <Expression> is 999.999, then it becomes 1000
For numeric values that cannot be contained within the digits specified for the <Integer Part> the
specified digits will be the maximum value.(In the case of negative values, it becomes the minimum
value)
Example:
In the case where 2 is specified for the Integer Part and 0 is specified for the Fractional Part.
If the <Expression> is 179.099 then it becomes 99
Rounding is carried out for numeric values that cannot be accommodated within the digits specified for
<Integer Part>/<Fractional Part>.
Example: In the case where the integer 8 is specified for the Integer Part and 0 for the Fractional Part:
If the <Expression> is 99.999, then it becomes 100
Specify the following values for <0 Suppression>.
0: Fill with spaces
1: Fill with zeros
Specify the following values for the <Negative Expression>.
0: -
1: 8
The <Negative Expression> is included in the number of digits of the Integer Part.It follows that even in
numeric values with the same absolute values, the number of digits in the negative number becomes
larger.
Example: In the case where the integer 3 is specified for the Integer Part and 3 for the Fractional Part:
If the <Expression> is 999.999, then it becomes 999.999
If the <Expression> is -999.999, then it becomes -99.999
Example
Convert a measurement value to a character string and output it to the macro console.
RESX$=Str2$(150,3,3,0,0)
RESY$=Str2$(359,3,3,0,0)
RESCR$=Str2$(97,3,0,0,0)
Print RESX$+","+RESY$+","+RESCR$
The results are as follows:In the case where (X,Y)=(150,359) and the Correlation Value is 97.
150.000,359.000, 97
282
Using Custom Command
FZ4 User's Manual

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fz4 series

Table of Contents