10-18-2021 03:09 PM
I have this working but not in the way I wanted to. I had a spreadsheet parsed down to each hex command for a sainsmart usb relay. Any time I put the hex values through a case structure, they would revert to..something else. "normal view" would show hex, "hex view" would show these strange values. I ended up keeping the whole array as a constant, not the smartest method. What am I doing wrong here?
Oh...the simple comparison also doesn't work, even though they look exactly the same in a probe. Ugh!
Thanks,
Jim
10-18-2021 03:31 PM
The missing piece of the puzzle that is causing all this confusion is the ASCII equivalents and HEX values.
For example,
"3A46" = 0x33, 0x41, 0x34, 0x36
You intend to send 0x3A46 to VISA but instead, you're writing 0x33413436 to VISA because you're treating the value as a string instead of an integer.
Solution - convert the string to an equivalent integer, then covert them to string (of course not readable and gibberish) then pass it to VISA write
10-18-2021 03:49 PM
Where to begin: