ASCII Command ML1100

toarts

Member
Join Date
Apr 2010
Location
San Jose, Calif
Posts
30
Hi Everyone,

I'm trying to communicate to an external device using ASCII Read and Write commands with ML1100. I was Write an ASCII command to get the device to start and stop.

2nd phase is to write the ASCII AWA/AWT and get the output from the external device. However, when I execute the AWT/AWA,I am receiving the ASCII I sent out rather that the response from the ext device.I've attached the the program for review if anyone can give me some ideas.

Thanks,
 
This looks like a good Query/Response code example.

But the String you're using with the AWA is ST17:3, which is a zero-length, empty string, so it cannnot have sent any characters out the port except the termination characters.

Run the program you're testing, then save it and post it.

What are the characters you are sending, and what do you expect to see as a return string ?

If you're receiving the same string that you're sending out, that tends to make me think that you have the TX/RX wires crossed and the port is receiving its own transmitted bytes. Unplug the end device and see if it still happens.
 
Hi Ken,

Thank you for replying to my post. I've got the RX/TX wired correctly bcoz I was able to send a ASCII start/stop command to the external device and the device responded to it the command. Attached file I am debugging. I will try your scenario, unplug the external device and see if I get same response

Thanks again.
 
BTW, I am sending ASCII R01 "Number of cycle" and I am expecting a reply like 01, 02 and on depending on what the device set to.

Thanks again.
 
Correction, after unplugging the cable from the PLC, 1st scanned I am getting R01 which the ASCII command I sent out, 2nd scanned I am getting ^J^M^J, 3rd scanned and so on, nothing, I am guessing the buffer got emptied.

Thanks
 
Let's take a bit of a step back. I think the program can be simplified.

Does the protocol you're using have termination characters, like Carriage Return, in it ? It makes a difference in the ASCII Read Line and ASCII Write with Append instructions.

RSLogix 500's STRING data type display will show many unprintable ASCII characters as "Control Characters", with a caret and a letter

^J = 0x0A (hex) = 10 (decimal) = Line Feed (ASCII)
^M = 0x0D (hex) = 13 (decimal) = Carriage Return (ASCII)

In the Port configuration or in the ASCII Radix for an Integer file, the same values will be shown with a backslash and the hex value.

The default Append characters for the Channel 0 port are "\d" and "\a", which are again Carriage Return and Line Feed.

So if you send out a three-character STRING like "R01" with an AWT instruction, just those three characters go out.

If you use an AWA instruction, the "Append" feature sends out five characters: "R01^M^J"

Simplify your code to just two rungs, each with an internal coil B3:0/x and just one ASCII instruction: AWT and ARD. Toggling these bits manually (I prefer to open up a Custom Data Monitor for them) will allow you to carefully control and examine the data going in and out of the Channel 0 serial port.
 
Last edited:
Try this example program: it's been whittled down to just six rungs and it transmits three characters, then expects three characters back. No termination or append functions are used.

You'll have to switch it from SLC-5/05 to MicroLogix 1100; I don't have a MicroLogix handy.
 
With the file open in RSLogix500..on the left hand side double click Controller Properties and then in the drop down list select your controller type.

HTH
 
Hi Ken, Please see responses below.
In the Port configuration or in the ASCII Radix for an Integer file, the same values will be shown with a backslash and the hex value.

The default Append characters for the Channel 0 port are "\d" and "\a", which are again Carriage Return and Line Feed.
Default configuration, channel 0 \d and \lf

So if you send out a three-character STRING like "R01" with an AWT instruction, just those three characters go out.
yes

If you use an AWA instruction, the "Append" feature sends out five characters: "R01^M^J"
yes 5 characters goes out.

Thanks,
 

Similar Topics

I have been working on a PLC project that requires sending ASCII commands/queries to an external pressure transducer using the Micro 850 PLC...
Replies
12
Views
2,847
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,799
I am using a RF Card Reader with an Idec FC5a-D12S1E Plc. I am use to using modbus, but in this application I am using the RXD command since the...
Replies
0
Views
1,403
Hi folks, I am using Vijeo Designer V6.0 to send ASCII string commands to printer. The printer is an inkjet printer that prints on boxes. I have...
Replies
0
Views
4,188
Hi, We couldn’t find anything specific, so am starting a new thread. I’m trying to migrate a config from a ML1400 to a micro820 & am experiencing...
Replies
1
Views
109
Back
Top Bottom