clSerialConnect
Top  Previous  Next

str = clSerialConnect ( integer Mode )

Use this function to control the connection of serial ports on camera-link connectors of the currently selected framegrabber. For dual interface camera-link boards (e.g. BitFlow R64-1-3) this provides switching the on-board serial device (UART) between two cameras. You can also configure the board to bypass the on-board UART and reroute the serial port signals on a camera-link connector to an external serial device (usually the host PC's communication port)

Parameters
 
Mode  
 
An enumerated Integer specifying the connection mode. Must be one of the following values:  
 
M_UART1=0 – the on-board UART connected to the serial port of the main camera-link connector.  
M_UART2=1 – the on-board UART connected to the serial port of the auxiliary camera-link connector.  
M_EXT1=2 – serial port the main camera-link connector connected to the external port through the I/O connector.  
M_EXT2=3 –serial port the auxiliary camera-link connector connected to the external port through the I/O connector.  

Error flags
 
ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  
 
ERR_NOTFOUND  
 
   Serial connection control is unavailable.  

Remark
 
If the on-board UART is bypassed and the serial port signals are rerouted to a PC's communication port, you have to use regular communication functions (such as serialOpen and serialWrite) for a camera control as opposed to camera-link serial functions (clSerialOpen, clSerialWrite). The latter must be used when one of the UART connections are selected.  

Remark
 
This set of statements switches the camera-link signals to the external serial device and communicates with a camera through the PC's serial port, assuming that an I/O cable is connected to COM1:  
 
clSerialConnect(U_EXT1)  
serialOpen(1)