Output the tag data via the serial interface

Overview

Output the data adding tag via the serial interface.

Specification of this example


Behavior
Output the data adding tag (ex. <SEARCH></SEARCH>) via the serial interface

How to try this example
1.Click the link below, then the folder containing zip file automatically opens.
refFile

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 tag data is output via the serial interface.
Example: <SEARCH><X>9999</X><Y>9999</Y></SEARCH>

How to implement

Scene data
Unit No.
Processing Item
0.
Camera Image Input
1.
Search
2.
Macro
The Macro Program below segment is to be set in '2.Macro'.
Macro Program
*MEASUREPROC
    X& = UnitData(unitNo - 1,"X")
    Y& = UnitData(unitNo - 1,"Y")
    TAG$ = "<SEARCH>"                      '(1)
    TAG$ = TAG$ + "<X>"+ str$(X&) + "</X>"
    TAG$ = TAG$ + "<Y>"+ str$(Y&) + "</Y>"
    TAG$ = TAG$ + "</SEARCH>"
    SendString "SerialNormal" TAG$         '(2)
Return

The macro program is in refthis link.
Explanation
(1)Set the tag data.
(2)Output the data via the serial interface.