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: 

How to connect Labview to a USB sensor without existing driver software?

Solved!
Go to solution

Hello,

 

I am currently trying to use an Omega PX409 USBH pressure transducer to display a reading in Labview. The transducer is USB connected, and the software that Omega provides shows a reading and therefore indicates that the transducer is connected to the computer. However, it is not being recognized by NI MAX or Labview. Although NI VISA driver wizard recognizes the USB connection, it does not allow me to install the INF files it generates onto my computer. I am quite stuck about how to proceed in order to write a driver that will display the data in Labview. Any help would be appreciated!

 

0 Kudos
Message 1 of 13
(6,454 Views)

It looks like it would show up as a Com port within Windows.

 

Have you downloaded the software and manuals listed here?  http://www.omega.com/pptst/PX409-USBH.html

 

Particularly read the manual that comes with it.  ftp://ftp.omega.com/public/DASGroup/products/USBH/Omega%20USBH%20Transducer%20Command%20Reference%20...

 

Read that  manual and program by using VISA Read and Write functions

0 Kudos
Message 2 of 13
(6,439 Views)

Take a look at the command reference ftp://ftp.omega.com/public/DASGroup/products/USBH/Omega%20USBH%20Transducer%20Command%20Reference%20...

 

The USB Connection appears to the PC as a Virtual Serial COM port. To communicate with the USBH transducer, the PC must be running a terminal program (such as HyperTerminal), and have the latest FTDI drivers installed (see FTDI Drivers section).

 

The serial port connection settings are:

*USBH: PX409-*USB

Bits Per Second: 115200  

Data Bits: 8

Parity: None

Stop Bits: 1

Flow Control: None

 

In addition, for HyperTerminal, the checkboxes in “ASCII Setup”, “Send line ends with line feeds” and “Echo typed characters locally” should be checked for best appearance. See the “USBH HyperTerminal Setup” section for more details.

 

Note: When a USBH transducer is connected to the computer’s USB port, there will be a 5-7 second delay before communication can begin with the transducer. This is due to the time it takes for the USBH transducer to be enumerated by the PC, and for the transducer’s firmware to boot and initialize. The first time a transducer is connected to any PC, or if the driver is updated, the time delay will be much longer, due to the extra processes that the PC must employ to install the USB driver for each COM port.

 

Are you getting that far?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 13
(6,434 Views)

Yes, I have updated the FTDI drivers and am able to communicate with my device via Hyperterminal. How can I incorporate Labview into this?

0 Kudos
Message 4 of 13
(6,398 Views)

Whatever you write to/read from the COM Port in hyperterminal can be done using VISA Write/Read, as other posters have said. If you could give some examples of the commands you'd like to send, we can show you a mockup.

0 Kudos
Message 5 of 13
(6,392 Views)
Solution
Accepted by topic author malsko15

@malsko15 wrote:

Yes, I have updated the FTDI drivers and am able to communicate with my device via Hyperterminal. How can I incorporate Labview into this?


Okay, you have your hardware tested and working, half the battle is won.

 

Serial comunications are fairly straight forward in LabVIEW using VISA.

 

Here is a small example of how to write and read from a serial device.

 

SerialCapture.PNG

 

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 13
(6,383 Views)

I think I'm almost there! One last thing: what is the "write buffer" input for the VISA Write function mean? I'm not sure what to put in there and the vi cannot run without it. 

0 Kudos
Message 7 of 13
(6,375 Views)
It's the command you send to the sensor. If it's expecting, for example "start\n" before it started acquiring, you need to send that via VISA write. If it acquires automatically and you only need to read you can do without it.
0 Kudos
Message 8 of 13
(6,372 Views)

@malsko15 wrote:

I think I'm almost there! One last thing: what is the "write buffer" input for the VISA Write function mean? I'm not sure what to put in there and the vi cannot run without it. 


The Write Buffer is where you type the command you want to send to the instrument.

 

I am guessing you want to automate this, so you just need to feed it strings with the commands you want to send.

 

Oh, and sorry about that example, it is an old one I used before so ignore the lables like "String Data from PC" that would actually be data from your instrument, not the PC

 

 

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 9 of 13
(6,365 Views)

Hmm, I'm a bit lost again. Labview isn't providing an output from the instrument that I connected using VISA. I have tried using the same commands that I used in Hyperterminal, but there is no output and no error message. How exactly is Hyperterminal coming into play here, except for how I used it to check the connectivity of my sensor? Also, thanks so much for your help thus far!

0 Kudos
Message 10 of 13
(6,353 Views)