Error #-1073807339 (Visa)

Labview doesn’t work. We set the port to the correct baud rate, wired the camera, turned everything on, etc. The java CMUCAM2 program from 2005 works–we can grab frames, control servos, etc. When we try to run the camera GUI in Labview, we get this error:

http://img454.imageshack.us/img454/2595/error1kx.png

-1073807339

VISA Read in query for result from serial port.vi->CMUcam2.vi->CMUcam2 GUI.vi

This code is a generic timeout error, meaning data was not received in a timely manner. This could be caused by a number of things, like:

  1. Connecting the CMUCam2 to both the RC and the PC at the same time.
  2. Serial Cable isn’t connected securely.
  3. CMUCam2 isn’t powered [enough].
  4. … any number of reasons that might cause data not to be transmitted correctly to the PC

Please double-check your connections and your setup.

-Danny

Also make sure that any other application that might be using your serial port (IFI Loader, HyperTerminal, etc.) is shut down before starting LabVIEW.

What is this VISA everyone keeps talking about? I only have Master Card!

Seriously, this is getting way too complicated and our team is about to give up on the camera again. It’s 3-400 $ in the KOP that could have been spent on something better.

I’m sorry you feel that way, the camera this year has already been proven to be a very valuable resource.

-Danny

Might this be caused by a slow USB to serial adapter? Is there any way to change the time out period in Labview?

Doubtful, but I’m not an expert in USB to Serial Adapters.

Sure, but since the “Query for Result from Serial Port.VI” file contains the actual VISA read, we need to modify the calling source within the CMUCam2.vi file just a smidge. Follow these steps (I assume the CMUCam2 demo app is located in c:\CMUCam2, modify these instructions accordingly):

1. Open LabVIEW.
2. Click the “Browse” button under “Open”
3. Select the “CMUcam2 demo.llb” file within c:\CMUCam2 directory.
4. Double-click on the “CMUCam2.vi” in the list of VIs.
**5. ** Press CTRL-E to get to the block diagram
6. The second conditional block is the main driving block - cycle through the conditions and look for calls to “query for result from serial port.vi”, the icon will be a green VI with the words “Query Serial” on it. As input this VI has a timeout - just extend the timeout from 1 second (1,000 ms) to 10 seconds (10,000 ms) or whatever you want. There are several calls to “query for result from serial port.vi”, so you might need to edit them all (I count 9 conditions with calls to “Query Serial” that you need to update the timeout).
**7. ** Save the file.
8. Re-run the main application.

Good luck!
-Danny

Our team had this exact same problem. We had to install the Labview VISA drivers to get it to work. That was kind of a pain because the VISA driver download was something like 140 MB and included drivers for way more stuff than just a serial port. There may be an easier way to get the serial port to work with the camera code provided, but we sure couldn’t figure it out. I don’t remember the exact link, but just go to ni.com and search for “VISA”. Their search engine is very good. If you can’t find it, e-mail me at drk@current.net and I’ll ask our programming guys what the exact address was.

/* Daniel */

You’re absolutely correct, VISA is a Virtual Instrument Software Architecture (VISA) capable of programming, configuring, and troubleshooting a wide range of instrumentation systems (that, coincidentally enough, can use a serial interface among others). VISA is an industry standard, and NI-VISA is our implementation of it - there are several other well-known implementations, but NI-VISA is probably the most popular. It would do you well to learn how to use VISA, as I am sure you will probably enter into a field that may require its use one day. There are also a lot of Colleges and Universities around the world that are moving to using LabVIEW and communicating with traditional instruments via VISA, it wouldn’t surprise me if you found LabVIEW in your better College labs.

-Danny

We bought the IFI recommended adapter from Radio Shack (Model 26-183), problem solved. I talked to a few other people who had the same problem, one programmer said she switched to a laptop with a built-in serial port and it worked.

Now our camera is happy.