From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Intermittent error -VISA Serial Attributes & Set I/O Buffer Size

I have an instrument (a voltage supply- GW Instek PSW 80-13.5) connected to my PC via USB. I am using the Labview instrument drivers provided by the manufacturer to control the instrument. My  PC is able to recognize the port (COM9) it uses no problem, and i am able to communicate with it via NI-MAX (I send an IDN? query and always get a response, no timeouts). So it seems like the overall communication set up is ok there.

 

However,  one of the VIs, Initialize.vi (to open VISA session and set up the interface for communication) gives me errors about 1/3 the time I use it. What makes it hard to debug is that the errors are VERY intermittent and occur in different points in the program. I can run the Initialize.vi once, twice, maybe 3 or even 4 times in a row and NO error; then it will give me an error. Or sometimes the first time I run it I get an error. The location of the error also varies.

 

I have put a screenshot of one type of error below..showing error -107307360 (error at "arg5 of property node") occuring. I get this error about 1/3 of the time the program is run. Not sure how to resolve this.

 

PropertyNodeError.jpg

 

Also, in addition to this error sometimes it gets through that property node setting ok, but then i get Error -1073807300 at VISA Set I/O Buffer Size. (see error below)

SetIOBufferSizeError.jpg

Again, the weird thing is that this error doesn't happen all the time, only part of the time. Because of that I thought it was a timing issue so i woudl step through the program, but it still happened..so not sure what is going on or how I can fix it.

 

Anyway, thanks in advance for any ideas or suggestions!!!

0 Kudos
Message 1 of 6
(3,021 Views)
What sort of chipset is the USB-RS232 converter using? Some work better than others. I prefer ftdi. Check and make sure you are using the latest version of the driver.
Message 2 of 6
(3,012 Views)

@Dennis_Knutson wrote:
What sort of chipset is the USB-RS232 converter using? Some work better than others. I prefer ftdi. Check and make sure you are using the latest version of the driver.

Ok, how do I check this?

 I have the instrument hooked to a USB hub, and that hub is connected to my PC. I do not have an RS232 cable anywhere. This confuses me becuase I thought that given it's just uSB would just show up in labview as USB interface. But when I get the "interface type" from the property node (in first part of program, shown in screenshot), it returns 4 which is Serial. This confuses me..why isn't the interface USB?  Sorry I don't have much background in this, I am used to using GPIB interfaces in Labview..this USB thing is a different beast!! 🙂

0 Kudos
Message 3 of 6
(3,008 Views)
Check in Windows device manager for the driver type.

There is essentially no such thing as 'just USB'. Just like a USB keyboard or mouse uses a Windows driver to emulate the dedicated connections and protocols that used to exist, a Windows driver emulates a virtual serial port. The vendor provided this driver for the chipset inside the instrument. They could have designed the instrument a bit differently so that the USB would emulate a GPIB instrument with a different driver and appear as USBTMC.
0 Kudos
Message 4 of 6
(2,994 Views)

@Dennis_Knutson wrote:
Check in Windows device manager for the driver type.

There is essentially no such thing as 'just USB'. Just like a USB keyboard or mouse uses a Windows driver to emulate the dedicated connections and protocols that used to exist, a Windows driver emulates a virtual serial port. The vendor provided this driver for the chipset inside the instrument. They could have designed the instrument a bit differently so that the USB would emulate a GPIB instrument with a different driver and appear as USBTMC.

 

Ok, thanks. I checked in the Devices. How do I find the driver type? Under driver date is says 4/25/11..it seems like i have the latest driver for the instrument.  

 

If it helps the instrument I am using is this one (GW Instek PSW series - power supply) . 

http://www.gwinstek.com/en/product/productdetail.aspx?pid=38&mid=75&id=1294

 

In the Download tab (far right), it has a link to download the USB driver. WHen I downloaded it, it is a ZIP file containing just an .inf file. Now that I think of it, this realyl confused me (I was expecting an .exe or somethign that would install the driver for me) and i was not sure I had the driver installed correctly (this was months back) but apparently i did something to get it and Windows says it is working properly. And I am able to use it about 60% of the time to set voltage, read current, etc.

 

Not sure how I can update the USB driver (if that is what is needed).

 

Thanks so much for your help!

0 Kudos
Message 5 of 6
(2,984 Views)

oh, and if i go to "driver file details", it just lists this one file under driver files:

 

C:\Windows\system32\DRIVERS\usbser.sys

 

Which I guess is a Windows file?

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