Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between viWrite and imgSessionSerialWrite for MSVC

Solved!
Go to solution
Using MSVC++, I've read you can access the serial ports on the card using imgSessionSerialWrite imgSessionSerialRead that are in the niimaq.h. But they are undocumented and unsported. NI's VISA also has viWrite and viRead which alsos for serial communication through the board. NI gives samples using viWrite in VISA, but not for the imgSessionSerialWrite functions. Does anyone know the difference between using one or the other?
0 Kudos
Message 1 of 5
(3,965 Views)

Hi nkimura,

Please post your question on Vision forum.

Also please indicate what hardware you are using.

 

Regards,

Sammy

0 Kudos
Message 2 of 5
(3,926 Views)
Solution
Accepted by topic author nkimura

I am using a PCI-1428, and I will try to move this message after I post this repsonse from NI email support:

 

 

Unfortunately you will not be able to use the VISA commands to communicate with your camera over the Camera Link connection. The framegrabber does not provide a serial port that can be targeted in the traditional sense and therefore cannot be used by VISA or any other typical programs like HyperTerminal.

 

 

Additionally, people can try to use the generic serial commands in the Camera Link standard,

http://www.vision1.com/pdf/CameraLink5.pdf.

 

So I guess I will be attempting to use the low-level imgSessionSerialWrite functions to attempt to control the camera.

Message Edited by nkimura on 08-10-2009 02:36 PM
0 Kudos
Message 3 of 5
(3,918 Views)

Dear  nkimura

 

Do you have an example code for me, how to enable the serial communication using imgSessionSerialWrite/ imgSessionSerialRead commands? 

0 Kudos
Message 4 of 5
(2,874 Views)

Hi Photoniker,

Unfortunately there are no official examples for using the serial functions you describe. With regards to seeing if anyone has example code they could share, I would recommend making a new forum thread as well since this one is quite old. 

And just to address part of your immediate question: You don't need to do anything to enable the commands, you simply need an active IMAQ session with the camera. You will likely need to format the serial commands in the proper way for your camera, but that should be fairly standardized or documented by the camera manufacturer. 

I'd recommend taking a look at the help for those commands to familiarize yourself with the function. 

Charlie J.
National Instruments
0 Kudos
Message 5 of 5
(2,853 Views)