Output the hexadecimal number via the serial interface
Overview
Output the hexadecimal number via the serial interface.
Specification of this example
Behavior
The numerical value is converted from the decimal number into the hexadecimal number, Output the data via the serial interface.
How to try this example
1.Click the link below, then the folder containing zip file automatically opens.
File
2.Right-click and hold on the zip file, and drop it on working window of FJ system. The images and scene data in zip file are loaded on the program automatically.
3.Re-measure the image. The decimal number data "9999" is converted into hexadecimal data "270F", and the hexadecimal number is output via the serial interface.
How to implement
Scene data
Unit No.
|
Processing Item
|
0.
|
Camera Image Input
|
1.
|
Macro
|
The Macro Program below segment is to be set in '1.Macro'.
Macro Program
*MEASUREPROC
NUM& = 9999 '(1)
SENDDATA$ = Hex$(NUM&)
SendString "SerialNormal" SENDDATA$ '(2)
Return
The macro program is in
this link.
Explanation
(1)The numerical value is converted from the decimal number into the hexadecimal number.
(2)Output the data via the serial interface.