Author Topic: Hex format outcomm/print  (Read 11081 times)

dan

  • Newbie
  • Posts: 47
    • View Profile
Hex format outcomm/print
« on: March 13, 2011, 09:06:19 PM »
Hi

I need to communicate with a device that needs to receive a Hex format no.

Using T100 with a Outcomm 1,&HA3 I get  F8 00 F8
instead A3.(I'm sending this from T100 to a receiving PC)

Using a PC  to send a Chr(&HA3) -visual basic- I receive a A3, and with the same PC I can control my device

Please let me know

Thank you,

Dan

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Hex format outcomm/print
« Reply #1 on: March 13, 2011, 09:35:32 PM »
chr(&A3) in Visual Basic is to get the ASCII representation of number A3 as a single character. This is only used as part of a string. What is the exact statement you used to send to the device?

More likely, it sounds like you need to send two ASCII characters: 'A' and '3' ?

If you need to send two characters you need to use OUTCOMM twice, by sending the ASCII code for character 'A' (Hex 41) and '3' (Hex 31) one character at a time.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS