Micrologix 1500 ASCII problems

matt.hoy

Member
Join Date
Aug 2009
Location
Indianapolis, IN
Posts
10
I am trying to use a ML1500 to communicate with a barcode reader via ASCII protocol. It isn't working, so I tried to verify the reading/writing using hyperterminal. I don't seem to get anything in either direction. The write instruction's done bit goes true. The read instruction errors out with a code that says the protocol changed during execution of the command.

Because this PLC has only channel 0, I have to use the default comm button to get online with it via DF1. Then once everything is downloaded, I kill RSLinx. Cancel the default comm button, then I connect with hyperterminal. I clear the buffers on the PLC by jumpering an input that is a condition for the ACL instruction. Then I send a string with hyperterminal. Then I read using the ARD instruction (again by jumpering an input terminal since I can't get online).

After all that I use the default comm button to get back online and see if it worked. (results mentioned previously)

It is almost as if the code is executing, but the buffers are never actually processed. I have tried everything I can think of! Any ideas?
 
It's impossible to guess about your port configuration and logic, so go ahead and post the *.RSS file. Post the firmware version of the MicroLogix 1764-LSP controller as well.

I've used the 1764-LRP on many ASCII applications, but swapping back and forth from DCOMM to User Mode might be a problem, though I've never heard of it doing anything but exactly what you expect.
 
ML 1500 ASCII problem

Thanks for taking a look at this.

(Please ignore the "Cell 1 Leak Tester" file. I uploaded the wrong one.)
 
Last edited:
I think some things need to be changed in the Channel Configuration.

First, the Parity setting. The most common parity setting is None, so make sure that your ASCII device (and Hyperterminal) are correctly set for 8 Data Bits, 1 Stop Bit, and Even Parity.

Second, the Termination character. This is the byte that the MicroLogix will consider to be the end of an ASCII line, so that it will complete the ASCII Read Line (ARL) instruction. If your barcode device appends a carriage return to the string, you will probably use ARL instead of ARD.

In the Termination field you put " /13 ", and I think you need "/d" to get decimal=13, hex = 0x0d, ASCII = Carriage Return.

Last, un-check the Echo checkbox. This will cause the MicroLogix to bounce back every character to the sending device, which is fine in terminal mode when you're using Hyperterminal because it verifies that the MicroLogix is getting the data, but might confuse your barcode device.
 
It works! I think the terminator was the culprit. You saved my bacon! Thanks for sharing your expertise. I am going to put you in for a pay raise. <Wish I could ;-) >
 
ASCII problems continue

For reasons I won't go into here, the original project didn't work out. I now have a different barcode reader that I am trying to integrate into this ML1500 LSP.

It has a single channel 0, which I set to ASCII protocol. I hook up the reader, switch to run, scan a barcode, switch to program, unplug the reader, plug in programming cable, press DCOM button to switch back to default comm, and check the results.

Sometimes I get nothing. Other times, I get garbage that looks like this:
\CF\B9\FA\E9\EChn
or X^J\C2\BE\C9\C9\BC
or \FF^J^B^I\A4\B8\FF

You get the idea. The expected scan should be "4994552".

It seems like maybe everything is bit shifted, so the ASCII gets decoded wrong? I don't know. I have the reader set up to append <CR> to each code.

RSS file attached.
 

Similar Topics

Good morning to all, I need to modify an existing PLC MIcrologix 1500 configured with a Modem on Channel 1 (DF1 Full Duplex) and an...
Replies
7
Views
1,425
Hello, I am a veteran Mitsubishi programmer, but am new to AB. I have a Micrologix 1500. I am receiving a string via RS232 on Channel 1. In...
Replies
3
Views
5,007
I have an application where I need to put a Sick CLX490 in "Sleep Mode" and put it back into "Run Mode" (Laser On) utilizing the ASCII AWT...
Replies
1
Views
2,276
Hello Guys\Gals, I am trying to write to a simple display from my Micrologix 1500 processor's serial port. (LRP, so I have 2 channels, the...
Replies
4
Views
3,084
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...
Replies
3
Views
6,784
Back
Top Bottom