How do I send Hex codes with a ML

PLC_Shaggy

Member
Join Date
Aug 2010
Location
Indiana
Posts
12
I have a Micrologix 1200 that I would like to use to send Hexadecimal codes to a Motorola MS4404 barcode scanner.

Like for instance to set the scanner into Host Trigger mode I would have to send 8Ah 08h.

I know there are easier ways to reconfigure the scanner, but I would like to be able to do it with the plc instead of scanning a page of out of the manual.
 
Wait, do you have to send it actual STRINGS? As in your above example "8Ah 08h" would be 7 characters, plus a potential terminating character or two.

If it is just numbers, well, uhh, just send the numbers? There is nothing magical about hexadecimal you know.
8Ah = 138 decimal. 08h = 8 decimal.
 
The only tricky part is putting non-character values into Strings in RSLogix 500. Enter the hex value preceded by a backslash.

The software will take many common hex values and show them as "Control Codes". For example, \08 becomes "^H" and \0D becomes "^M".

I just enter the values in hex with a backslash, rather than trying to remember which control-code they are.

The AWT instruction sends these strings without an Append character, while the AWA includes the defined Append characters for the port.

hex_in_ML_String.png
 
The only tricky part is putting non-character values into Strings in RSLogix 500. Enter the hex value preceded by a backslash.

The software will take many common hex values and show them as "Control Codes". For example, \08 becomes "^H" and \0D becomes "^M".

I just enter the values in hex with a backslash, rather than trying to remember which control-code they are.

The AWT instruction sends these strings without an Append character, while the AWA includes the defined Append characters for the port.

Ah. The backslash is what I'm needing then. I'll give this a shot. Thanks.
 

Similar Topics

So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
427
can the slc500 5/05 send a email and text over Ethernet ?
Replies
3
Views
185
Hello Friends I have took the sample program from AB webpage and modified, but I can only send 127 chars...
Replies
1
Views
181
I have followed the videos & still having issues getting the email out. Does anyone have knowledge or has sent an email notification via gp pro ex?
Replies
0
Views
193
Hi there! I have a question to a (maybe) simple issue that I hope some of you can help me with. I''ve made an FC containing the TCON, TDISCON...
Replies
13
Views
3,190
Back
Top Bottom