News:

  • December 05, 2024, 04:42:45 AM

Login with username, password and session length

Author Topic: ASCII In (AIN)  (Read 2672 times)

omarfelipe

  • Newbie
  • *
  • Posts: 7
ASCII In (AIN)
« on: July 25, 2014, 09:00:55 AM »
I am familiar with the print instruction and that is what we usually use in our system as means of communication. We never request info from our device so I am new to this. I'm just using Hyper terminal to test this right now. Is the AIN as simple as it looks? Do I need some special command to send something through Hyper Terminal to the PLC.
If my data destination is v400 and I send letter A will it store in v400 or v401.
I can manipulate the data later I just want to know how to obtain it first.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3581
  • Darth Ladder
Re: ASCII In (AIN)
« Reply #1 on: July 25, 2014, 09:51:39 PM »
Each V-memory location is 16 bits, or two bytes.  Each character is one byte, so each register holds two characters, so your character will end up in either the high byte or the low byte of V400.  You can see this if you look at V400 in a Data View and select Text as the display mode from the pull-down in the upper left.  With some devices on the other end, the bytes are in reverse order within each word and you have to unravel them.  Sometimes there is also an option whereby you can control the byte order from the sending device, then it's already correct by the time it hits the PLC.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

omarfelipe

  • Newbie
  • *
  • Posts: 7
Re: ASCII In (AIN)
« Reply #2 on: July 29, 2014, 10:08:59 AM »
excellent just the clarification I needed thanks