Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Can someone help me make a VI for the attached Serial Camera?

I have a serial camera that I would like to get images from. I was wondering if anyone could point me to a good VI for this or help me make one for it. The data sheet for the camera is attached. Thanks!
0 Kudos
Message 1 of 16
(5,017 Views)
Hi,

From the information you attached, it looks like you could use the serial communication example VIs that ship with LabVIEW to send and receive information with this device. I would recommend taking a look at the Basic Serial Write and Read VI, which you can find from the NI Example Finder. Once you can write a command and read back a response using this VI, you can expand it to include the functionality you need. The Basic Serial Write and Read VI uses NI VISA (Virtual Instrument Software Architecture) API, which provices an easy to use command set to communicate with a variety of instruments, including serial. The following links should be helpful in learning more about using VISA VIs to build an application to interface to your device.

NI-VISA Overview
http://zone.ni.com/devzone/cda/tut/p/id/3702

Termination Characters in NI-VISA
http://zone.ni.com/devzone/cda/tut/p/id/4256

NI-VISA User Manual
http://www.ni.com/pdf/manuals/370423a.pdf

Best Regards,

~Nate
0 Kudos
Message 2 of 16
(4,995 Views)
That seems like it should work. The only problem I am having now is that the VI seems to be sending ascii characters and not the hex values I would like to send. Anyone know how to send the correct values?
0 Kudos
Message 3 of 16
(4,989 Views)
Never mind...I see the link you posted above. I will give it a try. thanks!
0 Kudos
Message 4 of 16
(4,988 Views)
I still cannot get the camera to work if any one can offer any more help that would be great. I have some dll files that I have attached if that can help.
0 Kudos
Message 5 of 16
(4,873 Views)
Dear electric5,

What specific problems are you running into, and what methods have you tried to get the camera to work? Are you getting errors when trying to run the Basic Serial Write and Read VI? Have you been trying to use these DLLs to make serial function calls? If so, then how?

Please let me know some more information, and then I should be better able to help you troubleshoot your problems.

Thanks!

~Nate


0 Kudos
Message 6 of 16
(4,850 Views)
We are trying to send it the initial AA01(Page 4 of the manual) from the serial read write frunction to recieve the ACK command from the camera. There is not an error but nothing is returned. I am wondering if the serial is sending the data in the correct form. We have not tried anything with the dll files because I do not know how to incorporate them into labview. I posted them because I am aware that it is possible to use them. So we are at the starting point basically. If there is a way to communicate I am still worried about converting the serial jpeg data into an image...but i am not that far yet. Anyways that is about it. If you have any ideas let me know.
0 Kudos
Message 7 of 16
(4,828 Views)
Dear electric5,

I am not positive, but it looks like you need to send the SYNC command to your device first. See content starting on p. 8 of the manual. This may be the reason you are getting anything back.

Also, here is a document on calling DLLs from LabVIEW:

Writing Win32 Dynamic Link Libraries (DLLs) and Calling Them from LabVIEW
http://zone.ni.com/devzone/cda/tut/p/id/4877

I hope this helps!

~Nate


0 Kudos
Message 8 of 16
(4,793 Views)
From their FAQ in the document you provided:
 

Q: I have sent an SYNC command to camera, but it has no response. How can I synchronize with the module?

A: Users should send the SYNC commands one by one continuously until receiving the ACK and SYNC commands from the module. Normally, 25-60 SYNC commands are required. After that, users should reply with an ACK command.

 

0 Kudos
Message 9 of 16
(4,784 Views)
I have tried the above....I oppened the advanced serial read write and set it as the attached ran it multiple times with all the AA 00's and in varying amounts and sitll does not work. Am I doing anything wrong. See attached for setup. and I tested my cable by TX/RX shorting and it works.
0 Kudos
Message 10 of 16
(4,720 Views)