![background image](http://html1.mh-extra.com/html/omron/fh-1-series/fh-1-series_user-manual_742686754.webp)
WWW.NNC.IR
Macro Reference
752
Vision System FH/FZ5 Series
User’s Manual (Z340)
in the <negative> parameter).
Example: Specify the following parameters: Number of digits in the integer part: 3, number of digits in the
decimal part: 3
When <expression> parameter is 999.999, the changed numerical character string is "999.999"
When <expression> parameter is -999.999, the changed numerical character string is "-99.999"
If 0 is specified in the <fixed> parameter, the expression in the <expression> parameter is rounded off to the
nearest whole number and converted to the numeric character string.
If a smaller number than number of decimal places in the <expression> parameter is specified in the <fixed>
parameter, the expression in the <expression> parameter is rounded off to the nearest number that can be
expressed with a <fixed> number and converted to the numeral character string.
Example: Specify the following parameters: Number of digits in the integer part: 2, number of digits in the
decimal part: 4
When <expression> parameter is 10.12345, the changed numerical character string is "10.1235"
If a larger number than number of decimal places in the <expression> parameter is specified in the <fixed>
parameter, zeros are filled to the lower digit places of the converted numeral character string until the digit
place number reaches to the <fixed> parameter.
Example: Specify the following parameters: Number of digits in the integer part: 2, number of digits in the
decimal part: 5
When <expression> parameter is 10.123, the changed numerical character string is "10.12300"
If an incorrect data type is specified for a parameter, a "Type mismatch" error will occur.
If a non-existent number, numerical value, or combination of data types or values is specified for a parameter,
an "Illegal function call" error will occur.
If a value outside the range -2147483648 to 2147483647 is specified as an integer parameter, an "Overflow"
error will occur.
If a value outside the range -1.0E30 to 1.0E30 is specified for a double precision real number parameter, an
"Overflow" error might occur.
If a value is assigned to the return value variable or the variable is not used in an expression, a "Syntax error"
error will occur.
If the format is written incorrectly, such as writing the macro function name incorrectly, omitting a comma, or
omitting a half-width space, a "Syntax error" error will occur.
Usage Cautions
• None.
Example
Outputs the measured correlation value, measured position coordinates X and Y (Position X and Position Y)
with the search processing unit (Processing Unit number 5) to the system status console window. The
correlation value, measured position coordinates X and Y can be gotten with External Reference Data
numbers 5, 6, and 7 respectively.
Rem Get the measurement result of the processing unit.
GetUnitData 5, 6, X#
GetUnitData 5, 7, Y#
GetUnitData 5, 5, CR#
Rem Convert the measurement results to the numeric character strings in the specified format.
RESX$ = Str2$(X#, 3, 3, 0, 0)
RESY$ = Str2$(Y#, 3, 3, 0, 0)
RESCR$ = Str2$(CR#, 3, 0, 0, 0)
Rem Use the Print function to output the strings to the value to the system status console window.
Print RESX$ + "," + RESY$ + "," + RESCR$
Содержание fh-1 series
Страница 8: ...WWW NNC IR 6 Vision System FH FZ5 Series User s Manual Z340...
Страница 14: ...WWW NNC IR 12 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 22: ...WWW NNC IR 20 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 48: ...WWW NNC IR Initializing the Controller 46 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 68: ...WWW NNC IR Editing Scene Groups 66 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 132: ...WWW NNC IR Useful Functions for Operation 130 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 172: ...WWW NNC IR Saving Scene Groups in External Memory 170 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 254: ...WWW NNC IR Basic Knowledge For Macro Customize Functions 252 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 650: ...WWW NNC IR Macro Reference 648 Vision System FH FZ5 Series User s Manual Z340 Related Items None...
Страница 881: ...WWW NNC IR...