LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Date and time to hex strings

Hi  all.........In my work I shall send data and time info....to the hardware in hex string.......with parity(odd)......date format is  DDMMYY and time format is HHMMSS......each has 6 bytes. each of this ASCII byte into Hex. and ORing with 80 H or Ox80 ....and then appended to form a hex. string. This string should be send to hardware .....it's in real time... whenever we want to set the date and time of hardware just click one button....and set time and date.....
---I am able to form the combind string but it comes with 24 bytes......I want only in 12 bytes and one parity byte totally 13bytes.......means one ascii value into one final hex. byte.....then only it's possible to get 12 bytes.......hope got my question......!!!.....this data should be send over rs 232 comm.........

Thanks

Ravi

Message Edited by Ravi0709 on 10-18-2007 04:18 AM

0 Kudos
Message 1 of 5
(3,425 Views)
Hi Ravi,

try the attachment.
This gives you the 12byte string (or U8 array) containing "DDMMYYHHMMSS" values...

Maybe you should attach your example too, it could be a small error in choosing the wrong datatype when doing the calculations (U16 instead of U8?) Smiley Wink

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(3,406 Views)
Hi.........

Thank you very much...............I didn't try in this way ...........I used date/time seconds......then converted into string......it's really simple..........I will inform you the result after my trail with hardware.......

Thank you.............


Ravi
0 Kudos
Message 3 of 5
(3,403 Views)
Hi Ravi,

is your "." key broken? Smiley Very Happy
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(3,398 Views)
Maybe he's practicing Morse code, or emulating an old-style telegram. Smiley Very Happy
0 Kudos
Message 5 of 5
(3,374 Views)