LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read voltage of device that has no driver in LabVIEW?

Solved!
Go to solution

Hi Guys,

I am new in LabVIEW world and I have a question about reading voltage.

I have a device (mantracourt-USB strain converter) and I want to measure and see data by using labview. What can I do? Is it possible to add this device to Labview? 

Thanks you.

0 Kudos
Message 1 of 14
(3,753 Views)

http://www.mantracourt.com/products/signal-converters/usb-load-cell-converter

"Windows driver DLL’s available"

LV can communicate with DLLs, so you'll need to use this.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 14
(3,751 Views)

Thanks for your response but my problem is not to install driver of my device, my problem is how to make Labview read my device. I try to use VISA in labview to read the values but I am not sure that I am creating true VI for device. By the way in labview my device is read as COM 11.

Thanks you.

0 Kudos
Message 3 of 14
(3,675 Views)

As the documentation for that device states:


 

The load cell to USB adaptor will communicate as a simple serial device rather than a ‘native’ USB device.

Once the device is plugged into a PC and the supplied drivers are installed, the device will appear as a Virtual Serial Port to the PC.


 

So yes it is availabel as a COM port as you have found out already and you can use NI-VISA to communicate with the device.

BUT: serial communication is a vendor defined protocol with some common notions but by no means anything that could be considered an official real standard. So in order to communicate with your device over the  NI-VISA functions you will have to get the documentation about the protocol this device supports. In this manual under section C the communication protocol is documented.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 14
(3,665 Views)

How about show the screenshots of your programme so we can figure out what to do?

Once for all!
0 Kudos
Message 5 of 14
(3,662 Views)

Tanks for yor help guys. I am going to attach what I have done and what protocol says. Also when I try to run my VI it doesn't give an error. There is a little problem I want to see what my COM11 says to me in units it doensT matter whatever it is. I just want to see and read the response of my device. Thus, could you help me what ı should do or add to my diagrams or system. Thanks you again.

0 Kudos
Message 6 of 14
(3,655 Views)

double post

Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 14
(3,633 Views)

Please, do not attach images of your code. Attach de code itself instead! You don't want everyone willing to help you, saddle with the extra work of recreating your VIs to start modify them!

 

Also BytesAtSerialPort is definitely misplaced! VISA can be configured to terminate reads on a specific character and when you then call the VISA Read function, it will simply wait until it either sees:

1) an error from the underlaying driver

2) the number of requested bytes has been received

3) the termination character has been received

4) last but not least, the timeout that was configured for the VISA session has expired

 

Since you enabled the termination character already on the VISA Initialisation function and the default termination character on that function is decimal:10 or hexadecimal:0x0A (line feed) you have already enabled termination character mode, but need to wire the constant 13 (carriage return) to the "termination character" input.

 

Throw away the BytesAtSerialPort completely, wire a constant of 20 or higher to the number of characters to read on the VISA Read function.

 

Then go to your front panel and right click on the "string to write" control and select ""\" codes Display" and enter into that control 

!001:SYS?\r

This is the command from the manual to request the last value with the \r part being the escaped string syntax for the carriage return character or as in your manual is stated <CR>.

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 14
(3,626 Views)

Hey,

 

I think it would be a lot easier to go with Yamaeda's suggestion and use Call Library Function nodes to call into the device driver DLL and use their functions instead of doing raw VISA commands yourself.

 

It would probably be easiest to create a library of VIs that wrap the calls you want to make, and then just use those VIs in your code.

0 Kudos
Message 9 of 14
(3,610 Views)

Did you look at chapter 4 of your manual?  There is a table of all the commands the device understands.  Try querying the TEMPerature or something simple.  *IDN? is standard command that is very common for test instruments like DMMs and oscilloscopes.  It is NOT a command that your device understands though.  Read your manual and learn your devices language.  Smiley Wink

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 10 of 14
(3,606 Views)