LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA port query

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 

https://forums.ni.com/t5/LabVIEW/LabVIEW-VISA-COM-Device-How-to-use-Hex-protocol-to-receive-Data/td-...

 

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.

0 Kudos
Message 1 of 22
(3,076 Views)

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.

 

 

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 22
(2,986 Views)

Do you get any errors when you run your program?

0 Kudos
Message 3 of 22
(2,980 Views)

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. 

0 Kudos
Message 4 of 22
(2,972 Views)

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.

Download All
0 Kudos
Message 5 of 22
(2,970 Views)

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".

Message 6 of 22
(2,955 Views)

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.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 7 of 22
(2,952 Views)

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

0 Kudos
Message 8 of 22
(2,937 Views)

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.

 

Anemometer.png

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".

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 9 of 22
(2,926 Views)

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

0 Kudos
Message 10 of 22
(2,863 Views)