07-19-2019 09:13 AM
I have tried this code but still have the case that the input to the case statement looking for 0x6100 is always zero. Does it need some conversion required?
Thanks
07-19-2019 11:36 AM
@lafox24 wrote:
I have tried this code but still have the case that the input to the case statement looking for 0x6100 is always zero.
I suspect the constant you used for the Type Cast or Unflatten From String is an I32 (the default representation for a numeric) when it should be an U16. If you upload your VI, we can check that and other things that are easy to miss.
07-20-2019 03:46 AM
07-22-2019 07:33 AM
@altenbach wrote:
You can use \-codes in the case selector
Assuming we know it is a U16, it is better here to cast the string value to a number and then right-click on the case structure and choose Radix->Hex. At least it makes it a lot easier to read.
07-23-2019 01:40 AM
Oh yes. My post wasn't a recommendation, just a bit of trivia. 🙂
07-23-2019 09:03 AM
@altenbach wrote:
just a bit of trivia.
That is interesting. I never knew that.
Thanks for the tip 🙂