09-09-2010 10:34 AM
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
Solved! Go to Solution.
09-09-2010 10:37 AM
This is a duplicate of this post, with the attached file duplicated as well, kewl!
09-09-2010 10:38 AM - edited 09-09-2010 10:39 AM
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.
09-09-2010 10:41 AM
Sorry, the error is (-1073807343)
Not sure why it double posted and double attached, that's really weird.
09-09-2010 10:43 AM - edited 09-09-2010 10:46 AM
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.
09-09-2010 10:46 AM
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
09-09-2010 10:49 AM
here is a pdf of the front panel
09-09-2010 11:02 AM
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 ) 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.
09-09-2010 11:50 AM
Sorry, the visa front panel is attached now, it's the USB0 device
09-09-2010 12:05 PM
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?