06-22-2009 02:24 PM
Hi!
I am trying to read information from a PCB by using RS232 and a DB9 port. The PCB recieves data packages of 5 bytes and I have five different comandos (1 byte each) to send. The comandos need to be in Hex code, how do I do to send these? do I need to send the comands together and how do I do that? I have tried a couple of variations but nothing works.. |
06-22-2009 02:32 PM
Have you done a search for hex and serial? There must be hundreds of posts on this subject.
The quick answer is that you have several ways. You can use a U8 array and the Byte Array to String, you can use a single U* and typecast it to a string, you can use a string set for Hex Display (right click and select).
06-22-2009 02:44 PM
Hi!
Thanks but I'm just wondering if it is ok to send the different comandos all at the same time together in one string with Hex display, or do I need to send five different VISA write comandos?
06-22-2009 02:56 PM
That depends on the instrument. The VISA Write does not care. If you have to have separator between the commands (i.e. a CR or LF) then add that.