![background image](http://html1.mh-extra.com/html/omron/fz4-series/fz4-series_user-manual_1633222284.webp)
4
Using
Tool
282
Using Custom Command
FZ4 User's Manual
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,
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
Acesst 1.0 6251194
Summary of Contents for FZ4 Series
Page 1: ...User s Manual Cat No Z318 E1 02B Vision Sensor FZ4 Series...
Page 38: ...1 Before Operation 36 Setting Operation Mode FZ4 User s Manual 1 CPU 2 CPUs FZ4 11 H11 only...
Page 330: ...4 Using Tool 328 Remotely Operating the Controller Remote Operation FZ4 User s Manual...
Page 566: ......
Page 648: ...8 Appendixes 646 Manual Revision History FZ4 User s Manual...
Page 654: ...652 FZ4 User s Manual...
Page 655: ......