LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA error code -1073807253

Solved!
Go to solution

I am trying to remote control the MKS 647B Mass Flow Controller and Aglient 33120A Function Generator for my college capstone project.

I have installed NI-VISA (for RS232 control) and NI-488.2 (for GPIB control). I downloaded the drivers via LabVIEW:

Tools>>Instrumentation>>Find Instrument Drivers...

Using the example provided with the driver for the function generator, I have remote control working via GPIB, but I cannot get RS232 control to work.  I would just work with GPIB control, but the MKS 647B does not have a GPIB port so I have to use RS232 communication.

 

Since I know the function generator drivers work, I have been doing my RS232 testing with the function generator.  I have checked the Parity, Baud Rate, and Data Bits to make sure they all match and they do, however, every time I run the program I continuously get error -1073807253 when trying to initialize the VISA connection between the PC and function generator.  I also get error:

"VISA error code 0xBFFF0072
The resource is valid, but VISA cannot currently access it."

when trying to connect via NI-MAX.

 

 

I have been through quite a few support forums and tried many different solutions, but none have worked.  The only thing I have not tried is a new serial cable, but I'm not sure exactly which one I need so I have put off buying a new one.

 

I have attached the .vi I am using as well as an image of the .vi for quick reference. Ignore the error code in the image, I did not have the function generator attached when I ran it.

 

Does anyone have any thoughts on what could be going wrong? Or could someone send me a link to the serial cable I should be using (I need it to be female DB-9 to USB)?

Download All
0 Kudos
Message 1 of 15
(7,032 Views)

The description in the error code is pretty accurate: "The resource is valid, but VISA cannot currently access it" indicates that the serial port is reserved/in-use by another application.

 

You should check that you don't have any other applications open that are trying to access the serial port - e.g. LabVIEW (if you didn't call VISA Close, the resource stays locked until you completely exit LabVIEW), NI-MAX or any other serial programs.

 

Also - your screenshot shows you're using LPT1...a parallel printer port? You should check in device manager which serial port you are using (it should be something like COM1).


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 2 of 15
(7,025 Views)

Sorry I should have taken the image while the function generator was connected. I am using COM4 which works perfectly fine when using GPIB control.

I have tried running VISA close immediately before the intialization process and got the same error.  I've attached an image of what I tried.

 

I won't be able to get back to the equipment until later tonight (approx 7 hours from now) to test, but I'm fairly certain I have run the program while my LabVIEW program is the only program running on my laptop.

0 Kudos
Message 3 of 15
(7,017 Views)

What about other applications? Have you closed NI-MAX? Were you using any other applications to test the device?

 

Have you tried restarting your computer (to ensure all applications have released the serial port)?


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 15
(7,006 Views)

What drivers does your usb to serial device use. I found some references that the FTDI drivers/chips work best. I have Prolific drivers/chips in the devices on hand, and I'm having problems. I've ordered, and expect, a new device that uses FTDI drivers/chips.

I am working with usb to RS485 right now. http://www.nordfield.com/usb-serial-rs485-adapter

If you find a usb to RS485 that works well please list it as I have a future project that will need a couple of these.

Here is a link to the NIsingle port usb to rs232 convertert which should work... I haven't tried it yet.

http://sine.ni.com/nips/cds/view/p/lang/en/nid/12844

 

Glad to answer questions. Thanks for any KUDOS or marked solutions 😉
0 Kudos
Message 5 of 15
(6,995 Views)

@Sam_Sharp

I'll try restarting my computer and get back to you ASAP.

 

@PatrickLye

I don't have any information on the cable I'm using. It is just something I found in a bin of serial cables.

I found a serial cable (RS232 to USB) online from StarTech that uses an FTDI chip. Do you happen to know what purpose the FTDI chip serves? From what I can find online it seems like the chip is an extra, unnecessary accessory.

Link: http://www.bhphotovideo.com/bnh/controller/home?O=&sku=944274&gclid=CjwKEAiAvauyBRDwuYf3qNyXmW4SJACX...

0 Kudos
Message 6 of 15
(6,979 Views)

Converting usb to rs232. It isn't a straight wire conversion. There are also options for optical isolation depending on what devices you buy. It is best to be optically isolated whenever possible. You would have to get the exact chip part number to get more depth. FTDI is just another chip manufacturer.

http://www.ftdichip.com/

Glad to answer questions. Thanks for any KUDOS or marked solutions 😉
Message 7 of 15
(6,972 Views)
Since its the FTDI chipset that does the conversion from USB to RS232, I don't see why you would think it's not necessary. Determining what driver you are correctly using is just a matter of looking at the Windows Device Manager.
0 Kudos
Message 8 of 15
(6,958 Views)

@Sam_Sharp

I restarted my computer and got a different error.  I attached a new image of my code while the F-Gen is attached as well as the showing the error I get.

The error is "-1073807346: Invalid VISA session"

 

If I open up the Initialize Sub-VI and run that, I get a different error: "-1073807339: Timeout" as the Error Sub-Sub-VI tries to run.

I've found a few forums that say it is likely just an error in the termination character, but I don't see anywhere to change the termination character.

 

@PatrickLye

Thanks for the information on serial to USB convertion. I didn't know that! Definitely very helpful to know when doing RS232 communication.

The drivers that my computer uses by default are <Prolific USB-to-Serial Comm Port Version: 3.6.81.357 [9/4/2015]>, but when using those my computer doesn't recognize the device.  In order to get my computer to recognize the device I had to backdate my drivers to version <Prolific USB-to-Serial Comm Port Version: 3.2.0.0 [7/31/2007]>.

 

@Everyone

Random thought, all the drivers and programs that I'm using say they are compatible with Windows up to Windows 8.  Could the fact that I'm running Windows 10 be causing this problem?

Download All
0 Kudos
Message 9 of 15
(6,933 Views)
Since you will be using GPIB for the function generator, it seems pretty pointless to connect to the pc with a serial port. You could learn just as much trying to communicate to the flow controller.

Prolific drivers could be the problem, especially since there are counterfeit chipsets out there. I don't see how a driver from 2007 could be considered compatible with Windows 10.
0 Kudos
Message 10 of 15
(6,920 Views)