Help with Micrologix ASCII

Join Date
May 2010
Location
Melbourne
Posts
453
Hi all.

I'm having some problems getting a scale to respond to ASCII commands via RS232 from my Micrologix 1100.

The scale is a Trooper Count model from Ohaus, and I have verified the cable connections and also that I can communicate with it via Realterm or Hyperterminal.

All commands sent to the scale have to be ended with a carriage return, and I believe this is where the problem lies.

When sending a command of "P" followed by a carriage return, the scale is meant to send back it's weight status.

All replies sent out FROM the printer are terminated with a carriage return, and a line feed.

Any command not recognised by the scale will be replied with "ES".

When connected to my PC, I am able to connect to the scale in Hyperterminal or Realterm, and type a "P" followed by pressing Ctrl-M or Enter key(which is a carriage return), and the scale will reply with it's weight status.

However, when connected to my PLC, the scale does not recognise the commands being sent to it.

I have tried using the AWT instruction and sending the string "P^M", and even "P\0D".

I have also tried using the AWA command just sending the string "P" and setting up the AWA append characters in the PLC comm's setup as "\d" and "\ff" which I believe appends everything sent with a carriage return, to no avail.

I have verified that the PLC is sending out the correct commands, by connecting it to my PC and checking the results in Realterm and Hyperterminal.

It seems that there is a difference between sending a "P" followed by carriage return from typing directly into the terminal window in my PC, than when using the text box entry in Realterm and pressing the Send ASCII button, and the command being sent by the PLC, even though they seem to look identical to me.

Is there any other way I can send a carriage return in the PLC or anything else I should be checking?

I've been working on this the past couple of days testing every combination I can think of to no avail.

Any advice is appreciated.

PLCtoPC.jpg PCtoScale1.jpg PCtoScale2.jpg
 
I'm sure you checked these but just in case ... re-verify parity, data bits and stop bits are set correctly. Otherwise your note about the termination character settings appears correct.
 
I'm sure you checked these but just in case ... re-verify parity, data bits and stop bits are set correctly. Otherwise your note about the termination character settings appears correct.

Scale's default values are 2400 baud, Data length 7, Parity None, with no option of setting Stop Bits.

I have verified these settings, and have also tried different combinations of baud rate, data length and parity.
 
Can you use RealTerm and kook at the data in Hex or Dec? I would set the PLC to send data to the PC and look at this in NON ASCII format. The human eye can over look things very easily.
Then make sure what you are sending out from the PC matches the PLC output.
 
Well what do you know...

I changed the Parity to Even and Data Length to 8 and now it is working.

I tried changing the Data length the other day but that didn't work. I'm pretty sure it is the Parity setting that is now making it work.

Strange!?!?

Edit: upon further testing it is definitely the Parity setting giving me issues. When both PLC and scale are set to None, there is no response to my commands. When they are both set to Even or Odd, it works!

This really threw me off seeing as the scale's manual states it uses a Parity of None by default.
 
My model is actually the "Trooper Count", which is slightly different. The manual suggests that "NOTE: No stop bit settings are required".

Anyway, it is working now after changing the Parity setting.

Thanks for the replies, your post made me decide to try fiddling around with the comm's settings again!

Now to manipulate the string data being received...
 

Similar Topics

Hello, As my user name implies - I am totally new to the wonderful world of PLCs. I have though been tasked with integrating into our larger...
Replies
7
Views
2,200
Hello everyone, I'm having an issue trying to get a messaging instruction to work. I'm trying to get some data from a Micrologix 1400 to a L83E...
Replies
18
Views
6,179
Hi all Looking for some help please so I was connected to my MicroLogix 1000 threw rslinks had no issue. I download a program now this program...
Replies
46
Views
13,050
I've attached pics, below. I'm in the field right now an am trying to communicate to the Micrologix 1500 through the 1761-NET-AIC (Ugh!) to...
Replies
6
Views
1,938
Hello all. I need some help setting up a MSG instruction to transmit 10 bits of data from a compact Logix processor to a micrologix 1400. I have...
Replies
31
Views
19,984
Back
Top Bottom