ASCII Write problems - Micrologix 1500

Worsley

Member
Join Date
Sep 2007
Location
London
Posts
25
Good Morning all,

I have what may be a simple problem that is causing some major headaches this morning. I am trying to integrate a Zebra printer into a machine ran by an Allen Bradley Micrologix 1500.

Thus far, I have been unable to get the printer to print by sending ZPLII code strings and here's why:

In my plc program I am sending the following string

^XA^XFE:1.ZPL^XZ

This should call up a pregenerated label format named "1.zpl" and print it. In order to confirm that the printer is receiving the correct information, I hooked the printer RS232 cable into my laptop so that I may use Hyperterminal to observe the string sent by the PLC. Here is what Hyperterminal saw:

AFE:1.ZPLZ

Somehow, the caret's and the x's have been stripped from the string. Why? Is there a "strip carets and x's" button that I missed? HELP?!?
 
Misdemeanor overuse of quotation marks in the fourth degree

I think that the caret is used to represent the "control" character in String data elements in RSLogix 500.

^M = "Control-M" = hex 0D = ASCII Carriage Return
^J = "Control-J" = hex 0A = ASCII Line Feed
^X = "Control-X" = hex 18 = ASCII CAN

Hyperterminal is probably seeing the hex 18 character but not displaying it.

Note that the String element with "^XA^XFE:1.ZPLZ" in it shows as 12 characters, which indicates that each "^X" is being counted as one character, not two.

If you literally wanted "^X" in the string, you use the backslash character to turn off the control-character meaning of the caret.

\^XA\^XFE:1.ZPLZ shows up in RSLogix 500 as 14 characters.
 
Eddie,

Don't take this the wrong way, but I think I love you. ;). You have just put a severely hampered project back on the right track. Your suggestion worked perfectly and I have started breathing again.

Thanks again!

Mark
 
Sorry for the bump of the old topic, but I ran into this same problem. Infact I think I'm using the same setup that Worsley here was, since I had to send the exact same string to a printer using a ML 1500.

But I'm wondering if this is mentioned anywhere in the RSLogix 500 help files or on their knowledgebase? I've tried and searched everything and found nothing. This was my last resort and it worked.

You'd think it'd be something important to mention in the software with the ASCII Write instruction. I don't know where I would have found this information without plctalk.net Even the Tech Connect guy didn't have an answer.
 

Similar Topics

Hi again, Using RSLogix 500 with a MicroLogix 1400 and not sure yet which HMI I will be using. I am using a serial printer connected to one of...
Replies
7
Views
2,509
I'm using serial communication between an AB 1769-L35E PLC and a Nachi robot. 90%+ of the time the ASCII Read and Write commands work perfectly...
Replies
0
Views
1,792
Hey Guys, Thanks in advance for any help. We are converting our Compactlogix L32E application into the 1769-L18ER-B1BB. One major hurdle left...
Replies
8
Views
6,393
Hi Everybody, I need to know, how to programming read and write "Hex Value" to the equipment by port RS-232 "Ascii" (CJ1W-SCU41-V1 Unit ID.1) of...
Replies
0
Views
1,062
Hi All, I wrote some code for a small hydro scheme a couple of months ago. Part of the project was to read data from a grid analyser via RS232...
Replies
0
Views
1,646
Back
Top Bottom