clSerialRead
|
Timeout
|
Integer specifying the maximum time to wait for data in the receive buffer, in milliseconds. If no data is in the receive buffer after the timeout has expired, a timeout error flag will be raised. If this parameter is omitted, the timeout will never occur.
|
|
The string containing the data from the receive buffer.
|
|
ERR_OK
|
The flag set if successful.
|
ERR_FAILED
|
The flag set if failed.
|
ERR_NOTFOUND
|
No open serial device found.
|
ERR_TIMEOUT
|
The timeout occurred.
|
ERR_NOSPACE
|
Too many characters in the receive buffer (>1024)
|
|
To open and configure a serial port, use clSerialOpen.
|
|
|
This set of statements retrieves a serial number of a Dalsa Piranha2 camera by sending a corresponding request through a camera-link serial port. Refer to Dalsa documentation for a list of available commands:
|
|
clSerialOpen (0)
|
clSerialWrite("get_camera_serial\n")
|
wait(100)
|
Print clSerialRead()
|
clSerialClose()
|