Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to interface a fuel level sensor on USB/serial port to indicate the level?

Solved!
Go to solution

Hello!
Im working on a project, which contains a fuel-level sensor (capacitve probe). My task is to connect this sensor to a PC and indicate the fuel-level on a graph. The instrument works with 1-wire communication, but ive built an USB converter for it. So i want to connect it on USB port to the PC and use Labview to access the fuel-level. Its important, that i need to indicate the level continually, because the probe'll build in a bus to observe its fuel-level. I've never used instrument control in LV, thats why im writing now.

Please anybody can help me to build a VI for this?

Thank you very much
With regards.

G. Manhertz

Gabor M.
CLA
0 Kudos
Message 1 of 19
(4,875 Views)

what kind of converter do you use. Maybe that is more important than that it has USB.

If it is usb to serial, you can use it via VISA or even use VISA for USB raw, but than you need more details.

greetings from the Netherlands
0 Kudos
Message 2 of 19
(4,874 Views)

First, thank you for your answer.
The device communicates with 1-wire protocoll, and it has an RCA connector. In that way, i use an RCA-USB converter, so i can connect it to an USB port on my PC.

Can you give me more details about how to communicate via USB with LV?
Regards

Gabor M.
CLA
0 Kudos
Message 3 of 19
(4,873 Views)

As far as I know the rca connector is for audio/video what info is available?

greetings from the Netherlands
0 Kudos
Message 4 of 19
(4,863 Views)

I think the data convert between the device doesnt matter. The only problem for me is the solution of the USB communication with the PC. Im a beginner in port handling with Labview, so can you give some help me to communicate via USB with LV?

Regards

 

p.s: RCA connector is used almost to audio/video dataprogress yes, but a special electronic was made for the probe, which can forward data via an RCA-USB converter to PC. It was strange for me too, but it worked, when the distributor showed me. The converter consists an 1-wire to USB converter IC produced by Dallas. I get a schematics and built the converter. The probe's distributor gave me a program which can communicate with the device via a virtual COM port on their own software. But my company needs an other program, because there ll be more tasks need to be integrated in this project. So there is two way: USB comm or virtual COM communication with the device using LV. Thats why i ask u for help.

Gabor M.
CLA
0 Kudos
Message 5 of 19
(4,862 Views)

So indeed it is a virtual com port and no RCA anymore.

You can use VISA to program the virtual com port. It is for the software identical to a real serial port.

You say that you need more access than available from the serial interface. What exactly do you think you need more?

greetings from the Netherlands
0 Kudos
Message 6 of 19
(4,859 Views)

Thank you for your fast responding.

First I only need to read the serial port and use maybe a tank indicator on the front panel to make visible the fuel-level "all day long" (when the buses ignition is on). The next level is to make traceable online the tank level.
Thank you!

Gabor M.
CLA
0 Kudos
Message 7 of 19
(4,855 Views)

These virtual COM port handling can do with VISA? Please can you help me to describe how the VI must be built? Thank you

Gabor M.
CLA
0 Kudos
Message 8 of 19
(4,843 Views)

Hi Gabor,

 

You can find here an example for serial communication with VISA: http://zone.ni.com/devzone/cda/epd/p/id/2665

If you don't have VISA installed, you can use .NET for communicating serial port: https://decibel.ni.com/content/docs/DOC-8092

 

Regards,

Peter

Peter Vago
0 Kudos
Message 9 of 19
(4,836 Views)

Thank you Peter!

That was very useful! Can i ask you something more?
What i need to do, if i must connect the instrument via USB port. How can i handle it by VISA? Or is there some else method to control it? I read this tutorial: http://zone.ni.com/devzone/cda/tut/p/id/4478 but the USB RAW section is not clear for me.

Gabor M.
CLA
0 Kudos
Message 10 of 19
(4,831 Views)