LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hex convert to decimal

  • Hi, Im trying to read DYN-200 torque sensor. My value from the read buffer is quite weird it show 2D30 2E30 302D 302E

IMG_20230410_105338.jpg

0 Kudos
Message 1 of 13
(1,401 Views)

How are you communicating with this sensor? Which Modbus library are you using? You might want to share the code so that we can understand better.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 13
(1,392 Views)

Hi, i dont have the code..

 

but this sensor got three kind of communication mode.Im currently doing the mode 0 which will provide torque and speed value.

 

mode 2 only provide torque value

i will send the picture.

 

Screenshot_2023-04-10-11-17-55-17_e2d5b3f32b79de1d45acd1fad96fbb0f.jpg

Screenshot_2023-04-10-12-27-30-45_e2d5b3f32b79de1d45acd1fad96fbb0f.jpg

Screenshot_2023-04-10-12-27-36-23_e2d5b3f32b79de1d45acd1fad96fbb0f.jpg

Screenshot_2023-04-10-12-27-42-22_e2d5b3f32b79de1d45acd1fad96fbb0f.jpg

  

0 Kudos
Message 3 of 13
(1,374 Views)

I am new to labview. For mode 0 need to use modbus library? 

 

0 Kudos
Message 4 of 13
(1,373 Views)

Based on the screenshots of the user manual you shared, Mode 0 of HEXactive upload protocol is meant for the upper machine designed by the company. 

Since you mentioned that you don't have any code, I guess you are using the NI-VISA Interactive Panel right now. NI-VISA sends and reads the data in the ASCII format, thus you should use the Mode 2 of ASCII Active Upload Protocol instead. In page 6 of the manual, it states that:

A piece of its data format such as: 2B 30 2E 30 30 30 31 0D

This aligns with what you are seeing currently.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 5 of 13
(1,313 Views)

So you get a raw string of six bytes, which consists of three 16bit values. The first is toque (U16), the second is speed (I16) and the third is a checksum. Once you can read these size bytes into LabVIEW, the rest is trivial.

 

0 Kudos
Message 6 of 13
(1,303 Views)

So for mode 0, im not able to use NI-VISA to read the value?

 

For mode 2, it only sends torque value. I test it out and is able to receive the torque value. 

0 Kudos
Message 7 of 13
(1,274 Views)

I uses VISA-Ni to read but get random value

0 Kudos
Message 8 of 13
(1,273 Views)

@abcdefgjdjejd wrote:

I uses VISA-Ni to read but get random value


You need to be significantly more specific.

0 Kudos
Message 9 of 13
(1,198 Views)

thanks for replying me, I planned to use modbus 

0 Kudos
Message 10 of 13
(1,168 Views)