LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

24 bit 2's complement hex string to number

Solved!
Go to solution

Hi GerdW

 

Please see the attched 2011 vi. The example numbers are on the frnot page.

 

Thanks

Hong

0 Kudos
Message 11 of 15
(1,555 Views)

Hi Hong,

 

what's the rule to convert your 4-byte numbers to those decimal (?) numbers?

 

How to go from B100.0000 to "1"? And from C31F.0000 to 57d/39h? How to go from 56FE.3A00 to 26607d/67EFh?

Do you have a manual describing that conversion?

 

Using the logic in your VI you would need an input like F7F0.F6FE to get 14607d. How does that fit with D0C7.2000 in your example?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 15
(1,551 Views)

Hi GerdW

 

The hex number is return value from a 485 device. The dicimal number is diplay on ther software that coming wiht the device. 

I do not have manul for the conversion. 

 

Thanks

Hong

0 Kudos
Message 13 of 15
(1,543 Views)

Hi Hong,

 

dare to ask the vendor of that "485 device"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 15
(1,538 Views)

Hong.Zhang@agresearch.co.nz wrote:

The hex number is return value from a 485 device.


What is this device?  Do you have a link to a manual that should describe what the data means?  Because none of  your conversions make any sense.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 15 of 15
(1,523 Views)