Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I dynamically change the IMAQ serial baud rate?

I know I probably won't be able to get an easy answer to this question, but...

How do I dynamically change the IMAQ serial baud rate?

 

I am helping to develop and test a new camera that supports multiple baud rates (over CameraLink) and I'd like to test that the baud rates communicate properly.  Is there a way to test this through IMAQ without having to change out my ICD file before each test?

 

Thanks,

Bruce

0 Kudos
Message 1 of 4
(3,928 Views)

Hi Bruce,

 

What API are you wanting to do this in? I can think of a few possible options...

 

If you are using a language that can call C DLLs easily, you could call into clallserial.dll or clsernat.dll (using the well-defined cameralink serial DLL interface) and do your testing that way.

 

If that isn't convenient, I think there is an attribute (might not be in the public header/LV interface) for setting the attribute. The attribute id is 0x3FF60453. I'm not sure what limitations there are to when it can be set (it is possible it was just made hidden since the camerafile normally controls it). The values for the baud rate come from the cameralink specification and are below:

 

 

#define  IMG_UART_BAUD_RATE_115200  1

#define  IMG_UART_BAUD_RATE_56000   2

#define  IMG_UART_BAUD_RATE_38400   3

#define  IMG_UART_BAUD_RATE_19200   6

#define  IMG_UART_BAUD_RATE_9600    12

#define  IMG_UART_BAUD_RATE_7200    16

#define  IMG_UART_BAUD_RATE_4800    24

#define  IMG_UART_BAUD_RATE_3600    32

#define  IMG_UART_BAUD_RATE_2400    48

#define  IMG_UART_BAUD_RATE_2000    58

#define  IMG_UART_BAUD_RATE_1800    64

#define  IMG_UART_BAUD_RATE_1200    96

#define  IMG_UART_BAUD_RATE_600     192

#define  IMG_UART_BAUD_RATE_300     384

#define  IMG_UART_BAUD_RATE_230400  230400

#define  IMG_UART_BAUD_RATE_460800  460800

#define  IMG_UART_BAUD_RATE_921600  921600

 

 

Note that the baud rates >115200 are supported only on the new PCIe-1433 and the NI-1483 FlexRIO adapter module.

 

Eric

 

#define  IMG_UART_BAUD_RATE_115200  1
#define  IMG_UART_BAUD_RATE_56000   2
#define  IMG_UART_BAUD_RATE_38400   3
#define  IMG_UART_BAUD_RATE_19200   6
#define  IMG_UART_BAUD_RATE_9600    12
#define  IMG_UART_BAUD_RATE_7200    16
#define  IMG_UART_BAUD_RATE_4800    24
#define  IMG_UART_BAUD_RATE_3600    32
#define  IMG_UART_BAUD_RATE_2400    48
#define  IMG_UART_BAUD_RATE_2000    58
#define  IMG_UART_BAUD_RATE_1800    64
#define  IMG_UART_BAUD_RATE_1200    96
#define  IMG_UART_BAUD_RATE_600     192
#define  IMG_UART_BAUD_RATE_300     384
#define  IMG_UART_BAUD_RATE_230400  230400
#define  IMG_UART_BAUD_RATE_460800  460800
#define  IMG_UART_BAUD_RATE_921600  921600#define  IMG_UART_BAUD_RATE_115200  1
#define  IMG_UART_BAUD_RATE_56000   2
#define  IMG_UART_BAUD_RATE_38400   3
#define  IMG_UART_BAUD_RATE_19200   6
#define  IMG_UART_BAUD_RATE_9600    12
#define  IMG_UART_BAUD_RATE_7200    16
#define  IMG_UART_BAUD_RATE_4800    24
#define  IMG_UART_BAUD_RATE_3600    32
#define  IMG_UART_BAUD_RATE_2400    48
#define  IMG_UART_BAUD_RATE_2000    58
#define  IMG_UART_BAUD_RATE_1800    64
#define  IMG_UART_BAUD_RATE_1200    96
#define  IMG_UART_BAUD_RATE_600     192
#define  IMG_UART_BAUD_RATE_300     384
#define  IMG_UART_BAUD_RATE_230400  230400
#define  IMG_UART_BAUD_RATE_460800  460800
#define  IMG_UART_BAUD_RATE_921600  921600

 

0 Kudos
Message 2 of 4
(3,905 Views)

Eric,

 

Thanks for your help, but I was trying to find a solution that is within the framework of the NI-IMAQ driver and functions.  I am using LabVIEW to access to framegrabber and I was hoping to keep it that way.  I have used the clallserial.dll to communicate with the framegrabber in LabVIEW (so that I can communicate with the camera from multiple applications at the same time) but I was trying to access the board "cleanly" using the IMAQ functions.

 

Thanks,

Bruce

0 Kudos
Message 3 of 4
(3,902 Views)

That is nice that the 1433 can handle 921k baud rates.  We currently sometimes send serial data to the camera using the aux serial port on the camera (when we want to send MBs of data to it, such as calibration data) and have the additional bandwidth for this would be helpful.

 

Bruce

0 Kudos
Message 4 of 4
(3,901 Views)