From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Error with Visa and USB device

Solved!
Go to solution

Good Morning,

 

I'm currently working on a VI to use visa to get information from a USB device. The device is a check-line digital tachometer.

 

I was able to get the USB drivers and everything together, and the device to show up in MAX, but now I'm getting an error after the visa open block, and I'm not sure why.

 

Any insight would be greatly appreciated, though I dont know what anyone will be able to do, seeing you likely dont have the same one.

 

VI is attached

Download All
0 Kudos
Message 1 of 21
(4,373 Views)

This is a duplicate of this post, with the attached file duplicated as well, kewl!

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 21
(4,368 Views)

Cannot comment on fixing an error when you do not provide the error code. Essential information.

 

p.s. Get rid of the sequence structure. Redundant with the error in/error out connections.

0 Kudos
Message 3 of 21
(4,366 Views)

Sorry, the error is (-1073807343)

 

Not sure why it double posted and double attached, that's really weird.

0 Kudos
Message 4 of 21
(4,357 Views)

Guess I picked the wrong post to respond to. I basically said the same thing about the error code in the other post, will use this one now.  That error indicates that the VISA reference you are supplying is not pointing at your device. Could you provide an image of your front panel? Also, if you go into MAX and select the device you can try communicating with it, there will be an "Open VISA Test panel" where you can try out the settings, and simple command strings to confirm that the hardware and VISA drivers are working.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 5 of 21
(4,353 Views)

Er, your code has code to access a SERIAL port not a USB port.

 

You can't do USB communication with a SERIAL port.

 

Shane

0 Kudos
Message 6 of 21
(4,349 Views)

here is a pdf of the front panel

0 Kudos
Message 7 of 21
(4,342 Views)

Sorry, what I'm interested in is the VISA control. I am guessing that you see the device as a serial COM port, the method a lot of "USB" devices work these days. I still recommend trying to send/receive the command strings through MAX, partly to familiarize you with one of the better tools available when using LabVIEW, also to confirm that there are no hardware issues. As mentioned in my post to the thread duplicate, what the error says it that you haven't told the VISA serial function a valid comm port name (or with other instruments the proper visa alias/name for a valid connections).

 

A note: the sequence structure is redundant. You have connected the error clusters, and visa references, which will force the proper execution order. Generally sequence structures are frowned upon (for a variety of reasons discussed at Great Length in other threads Smiley Wink ) except where a function doesn't have have a means to use LabVIEW's dataflow and must be forced to execute in a specific order. Any vi that receives its input from a previous vi won't execute until all of its inputs are satisfied, meaning until the outputs of the previous vi are valid.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 8 of 21
(4,325 Views)

Sorry, the visa front panel is attached now, it's the USB0 device

0 Kudos
Message 9 of 21
(4,311 Views)

You simply cannot use serial functions for a USB RAW device. It appears you went ahead and used the VISA driver wizard to create this despite what I said here. If you want to continue with this, then you will have to write some very low level code and get very detailed specs from the vendor. This is often difficult to impossible. Don't know why you went this route. Surely the vendor provided a driver for the device that you can use instead. Before you made this step with VISA, did you even look to see how the vendor's driver enumerated the device in windows device manager?

0 Kudos
Message 10 of 21
(4,299 Views)