brendan.buchan
Member
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.
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.