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?
Solved! Go to Solution.
"Windows driver DLL’s available"
LV can communicate with DLLs, so you'll need to use this.
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.
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.
How about show the screenshots of your programme so we can figure out what to do?
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.
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
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>.
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.
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.