LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hex String to Cluster Conversion

Solved!
Go to solution

sorry I didn't see your last answer. see the attached VI, hope it's what you need

 


J.D.
French Labview beginner
N'oubliez pas de complimenter les bonnes réponses - Don't forget Kudos for good answers
0 Kudos
Message 11 of 20
(1,530 Views)

OK, so maybe we don't really understand what you nee ! 🙂

 

If you need to extract each character of the hexadecimal string, see attached below...

Message 12 of 20
(1,527 Views)

Thanks for the Reply.

-mfp

0 Kudos
Message 13 of 20
(1,526 Views)

One more Question.

 

Please see the attachment.

How shall i remove that wire error?

 

-mfp.

0 Kudos
Message 14 of 20
(1,506 Views)

Hi Favas,

 

"How shall i remove that wire error?"

By using IndexArray you could index the first array element... (Did you read the error message: you try to wire an array source to a scalar sink!)

Best regards,
GerdW


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

You should use the index array function (in array palette)

 

look at the linked exemple


J.D.
French Labview beginner
N'oubliez pas de complimenter les bonnes réponses - Don't forget Kudos for good answers
0 Kudos
Message 16 of 20
(1,489 Views)

when i use index array to get an element, getting a wrong value.

but when i put an indicator at the substring, getting the correct one.

 

i need the value in hex format itself to fill into the cluster.

what shall i do for that?

 

-mfp.

0 Kudos
Message 17 of 20
(1,478 Views)

Hi Favas,

 

sorry, my fault. (Partly yours, as attaching a VI could have helped...)

 

You take a string subset of two chars. Those two chars form one hex value. To get that value you have to use "Hexadecimal String To Number" instead of "String to U8 array"...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 18 of 20
(1,472 Views)

okay.

thanks for the support.Smiley Happy

 

-mfp

0 Kudos
Message 19 of 20
(1,461 Views)

 


@Favas wrote:

when i use index array to get an element, getting a wrong value.

but when i put an indicator at the substring, getting the correct one.

 

i need the value in hex format itself to fill into the cluster.

what shall i do for that?


 

This is a ridiculously long and winding thread with tons of guesses and ambiguities, as well as weird rube goldberg replies, one marked as "solution" before the discussion even gravitated to a consensus.

 

Can we start from scratch! Don't post code images! Only post actual VIs.

 

Make a simplified version containing the desired data in controls (the data you have) and indicators (the results you want), make the current values defaults, save, and attach the VI.

 

Thanks! 😄

Message 20 of 20
(1,447 Views)