Sending Hex data to RS232 port

Greetings Community!


I am trying to send hex data to a RS232 port, but have not quite figured out how to do it. Sending ASCII works fine, but haven't figured out the trick for hex. The hex string I'm trying to send is 02 50 4F 46 03.

This is my latest attempt, but not working:

serial = CreateObject("roSerialPort", 0, 9600)
sermsg = CreateObject("roByteArray")

Thank you so much for your help!

1 comment

  • 0
    Brooks Whiteford

    Happy to report I was able to resolve this, this ended up working for me:


    s.power_off = CreateObject("roByteArray")'
Please sign in to leave a comment.