LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: How to convert hex string to time stamp?

hi i have 8 bytes of time data with detail of the bits. such as bits 0---3 have values of 0 to 9 and contains 100micrseconds

bits 4--7  have values from 0 to 9 and contains 1 miliisecond

and so on...

 

 

how could i convert that to meaningful time in labview

0 Kudos
Message 1 of 4
(597 Views)

Hello,

 

this could help you, especially recipe 16.

 

https://forums.ni.com/t5/LabVIEW/Complete-String-Conversion-Tutorial/m-p/4245188

 

P.S. please open a new thread for a new problem, don't hijack an old thread

Greets, Dave
0 Kudos
Message 2 of 4
(584 Views)

Hi Farooq,

 


@farooqmardan wrote:

hi i have 8 bytes of time data with detail of the bits. such as bits 0---3 have values of 0 to 9 and contains 100micrseconds

bits 4--7  have values from 0 to 9 and contains 1 miliisecond

and so on...


Do you receive a "hex string" (whatever that means) or do you receive an array of bytes?

Please be specific and provide example VIs with example data!

 

To convert those bytes to "meaningful" data it seems you should use some bit masking functions, like AND/Shift or even Quotient&Remainder. It all depends on the full format specification of those "8 byte time data"…

Again: be specific as possible and provide an example VI with example data included!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 4
(572 Views)

I think this is what you want (but I can't really be sure from your description).

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 4
(537 Views)