05-27-2021 09:42 AM - edited 05-27-2021 09:43 AM
Hello,
I am trying to connect Extech HD350 to labview via VISA serial port to read the temperature values. I have developed a program and this is not showing me any values. I tried troubleshooting it but got no results. I think i have problems connecting it through MAX ( i will attach the screenshot of MAX). The device is not working when i used USB to UART Bridge VCP driver ( http://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers)
as suggested in the answer
I am not able to install the Visa drivers alternatively as suggested on the page
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019La2SAE&l=de-DE
as in my device manager i do not have " USB test and measurement device" option.
I will attach a screenshot of my device manager.
can someone suggest what i can alternatively try to successfully read the values.
05-28-2021 06:10 AM
Your Device Manager screen only shows the USB Infrastructure from the motherboard of your computer. Those entries have nothing to do with your specific device.
In the MAX screen shot I can clearly see that you have a COM4 device that is actually a Silicon Labs CP210x USB to UART bridge, so most likely this is your device and you are ready to use it. This means that your Silicon Labs driver installation has definitely succeeded despite you claiming otherwise.
Now as to what to do from here, that is a bit of a problem. I don't have a LabVIEW 2020 installation here, so can't check your VI. And there seems no documentation about what commands you can send to the device. So I'm not sure what you can do from here.
05-28-2021 06:18 AM
Do you get any errors when you run your program?
05-28-2021 07:38 AM
Hi,
I will attach the VI using the option save for previous versions and selected version10.0, maybe now you are able to open the VI.
I want to give the command AABB 01 ( in Hex) so as to read data from the device.
I am also attaching the communication protocol for the device, maybe this is where i am going wrong. When i run my VI ( attached) there is no result on the Temperature gauge or display, the program keeps on running without a end or showing any result. I am also attaching a screen shot of open Visa test panel from the MAX.
Also how can i know for sure that my device is successfully communicating with pc/LabView.
At this point i am happy with reading whatever data possible from device, any vi that allows me to do so would work.
05-28-2021 07:41 AM
When i run my VI ( attached) there is no result on the Temperature gauge or display, the program keeps on running without a end or showing any result. I am also attaching a screen shot of open Visa test panel from the MAX.
05-28-2021 07:56 AM
The command you send out will not be correct with this code. If you want to define the commands as string constants in the code and you know the hex code, then you should right click the string control and select "Hex Display" instead of "Normal Display".
05-28-2021 08:04 AM - edited 05-28-2021 08:05 AM
First problem is that you try to send "AABB 01" as a string. But the documentation for the protocol seems to indicate that it is a binary protocol.
So right click on the string constant, select "Hex Display", then right click again and select also "Visible Items->Display Style". A small x should appear on the left border of the string constant. Now enter AABB 01 in there. When you switch back to "Normal Display" you will see gibberish in the string constant, since those character bytes are for non-standard characters in your code page. Switch back to "Hex Display" to make the shown string look more intelligent.
And you do not need to read 46 times 1 character. Instead you can simply connect a constant with 46 to the VISA Read.
05-28-2021 09:13 AM
I am now able to get some value in the display. Your Suggestion's helped a lot.
However the value i am now getting are numerically wrong. I am supposed to get temperature readings but the values i am reading are 8-digit negative values ( -1.34218E+7).
I have connected the device and i expect room temperature values from my program. Maybe someone can advice what i am doing wrong. I have tried explaining what i am trying to do in this picture
05-28-2021 10:07 AM
Several notes:
- Disable the termination character in the Configure Serial port.vi. This can only hurt for a binary fixed size protocol like this device is using.
- Your entire decoding is utterly complicated and inefficient. Better would be to use Unflatten from String with a properly configured cluster constant.
Something like the following is a start. It doesn't cover the entire 46 bytes of data but only up to the 4 floating point. You can extend it accordingly.
The decoding you are doing looks like it should expect little endian format, but the fact that you receive strange data, might indicate that the device is actually sending big-endian format. Try to switch the byte order (in your VI switch the index between 2 and 3) in my VI change the "little-endian" enum to "big-endian, network order".
06-07-2021 04:58 AM
After several attempts to rectify my VI, I decided to switch to your VI as mine was not giving the correct result. I have no idea how you have configured the cluster and I am new to it. Can you help me with some information how to configure it?
I think you added clusters for "type" and the " value" ports