串口通讯程序
* Note: This example is meant to demonstrate the use of the serial interface
* of HALCON. On Unix machines, the output and input is from /dev/tty, i.e., the
* window from which you have started HDevelop. On Windows NT machines,
* this program will only run if you have a device attached to COM1.
*
* Open the serial interface (for reading and writing).
OpSystem := environment('OS')
if (OpSystem == 'Windows_NT')
open_serial ('COM1', SerialHandle)
else
* open_serial ('/dev/tty', SerialHandle)
endif
* Set the parameters of the serial interface (e.g., a chara