Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

0xBFFF003A (VI_ERROR_INV_SETUP)

In MAX, I get this error.

0xBFFF003A (VI_ERROR_INV_SETUP)
viFindRsrc returned 0xBFFF003A (Unable to start operation because setup is invalid (usually due to attributes being set to an inconsistent state).)

Please make sure VISA is properly installed on this system.

Possible causes for this error:
1. More than one Passport may be attempting to claim the same resource.  You can try disabling Passports to figure out which Passport is causing the error.
2. You have connected multiple unconfigured plug-and-play devices that have the same resource name. For example, the vendor ID and serial number may be the same.

**
I tried disabling all Passports except the Serial one (which I need), and it still doesn't go away.
I reinstalled the latest version of NI-VISA 3.6.
I don't have multiple plug and play-devices witht eh same name.

I'm trying to connect a MKS flow controller through a virtual serial port (com3). I tested the port using Hyperterminal and it works. But I can't get it setup in MAX, because I get this error. The device status is this:
MAX could not open a VISA session to this static device.  The device was not returned from VISA when finding resources, but MAX was able to use VISA to parse the resource name.

I've tried using the VISA test panel and it doesn't seem to interact properly with the device.

Do I need instrument drivers for the flow controller before I can set it up in MAX?

0 Kudos
Message 1 of 9
(10,266 Views)
Most virtual com ports do not support a lot of the functions that VISA uses, such as asynchronous I/O and flushing.  If you make your own VISA calls (either through a VISA test panel in MAX or a development environment) and avoid any calls that aren't supported by the driver for your virtual com port then it may work, but because each virtual com port implements different functionality they are not officially supported by MAX or VISA.
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 2 of 9
(10,248 Views)
Have you re-booted the computer since you installed the usb>rs232 converter? You can try that and then when you open MAX, do a refresh. I've heard of some usb->rs232 devices that don't work with VISA. What is the make and model of the device? Is it a device that provides a single rs232 port or multiple ones?
0 Kudos
Message 3 of 9
(10,247 Views)
Well, I'm using a FTID Serial to USB converter. You can find information on it here: http://www.ftdichip.com/Products/EvaluationKits/US232R-100.htm. Also, I tested the serial cable by performing a loopback test and it works. I've also tried restarting and it doesn't seem to work. I haven't been able to remove that error or use the VISA Interactive Test Panel to control the device.
0 Kudos
Message 4 of 9
(10,240 Views)
Instead of trying to use the test panel, just try to do a VISA write. In the LabVIEW driver, do not do the initialize. You can change the default settings of the com port in windows if it is different than what the instrument requires. The only thing you might want to do before trying to write/read data is set the termination character and that has nothing to do with the com port. That is a VISA property.
0 Kudos
Message 5 of 9
(10,238 Views)
If you search for "FTDI" here on the discussion forum you will encounter results from a lot of users trying to use these chips as well.  It is common for virtual drivers such as these to implement only a subset of the Windows serial API, making them not work properly because NI-VISA tries to call functions which are not implemented.

If you are unable to get this working with the Virtual Com Driver, FTDI does provide another driver, and has LabVIEW examples on their webpage.  This driver will not longer show up as a serial port, but requires DLL calls to communicate with the device.  In doing this you will be restricting your application to work ONLY with the FTDI converter, although this should not be an issue if you will be embedding the converter in your device.  Your code may not be as portable as code using NI-VISA, but at least you should be able to get it to work.

FTDI LabVIEW Examples



I hope that helps!

Jason S.
National Instruments


Message 6 of 9
(10,222 Views)
You may also look at this KnowledgeBase Article, which may address your issue.  It basically reinforces the suggestions the others have made here of avoiding configuring the serial port.


Jason S.
National Instruments
0 Kudos
Message 7 of 9
(10,218 Views)
Thanks for all your help! It's much appreciated. I found some instrument drivers through MKS that used VISA, but avoided configuring the serial port. So I was able to create VISA sessions and read/write to the device without errors as far as VISA was concerened. However, the device (a MKS Flo-Controller 647C) did not respond to those read/writes. It seemed that the drivers didn't work. It didn't even respond back with any errors! I downloaded the FTDI drivers and used them. I used the D2XX dll files and the FTDI supplied library. The device accepts commands in ASCII format, so I used the write string drivers to send string commands to the device. Although Labview again recognized the device and displayed no errors, the device failed to respond to my writes. I've made sure that I'm using the right commands to test the device. I even performed a loopback test using the FTDI drivers and it worked. Is there something I'm forgetting in the string commands that I send to the device? I've read "endline characters" mentioned when sending VISA commands, but the FTDI dll drivers don't use VISA, so that shouldn't be a problem. Does anyone have experience with using Labview and MKS flo-controllers in this situation?
0 Kudos
Message 8 of 9
(10,199 Views)
The "endline characters" as you call them have nothing to do with VISA. Most instruments that use serial communication require that you append some termination character at the end of each command in order for the instrument to know that the command is finished. GPIB specifies the EOI character but serial instruments don't have any general spec. Termination characters are usually a LF or CR or both. Hyperterminal automatccally appends both so you should try that. The manual for the instrument should also tell you what to use.
0 Kudos
Message 9 of 9
(10,197 Views)