ASCII Send <cr> to device and read string in ControlLogix

TimeFluxCap

Member
Join Date
Nov 2002
Location
Australia
Posts
321
Hi all

Can someone please point me in the right direction in how to do this problem with a ControlLogix?

I have a TPS transmitter that reads four different readings. I want to pull the info of each instrument out via ASCII.

The TPS people say if you send a ?C<cr> command to the TPS is will return the data in the following format

oxygen,conductivity,ph,orp,temp<cr>

I am new to ASCII comms. The example programs show how to read a continous ascii string or write characters but not how to send a request command and read it.

Thanks

TFC
 
Step 1 is to configure your Ch.0 serial port on the controller for User Mode so you can both send and receive ASCII strings.

I always send a Clear Buffer (ACL)instruction upon the first scan of the controller.

The ASCII Write (AWT) instruction is used to send strings out the serial port. ASCII Write With Append (AWA) sends your line plus an appended character or two (configured in the port configuration).

I like to use the (ABL) "Test Buffer for Line" and "Read Line" (ARL) instructions. You do have to make sure you set the Termination Character in the port settings for the termination character you're using (in your case, CR).


Read up on the ASCII chapter in the User Manual while I tap together a sample.
 
You're probably going to need to do a little bit of troubleshooting with your own PC's serial port.

I am a big fan of HHD Software're Serial Monitor, but you might not want to break out the credit card tonight for a simple application like this.

Like many people, I dislike Hyperterminal for it's weirdness. But it's free.

Try TalTech's Breakout utility for a quick and dirty way to monitor serial data.

http://www.taltech.com/freesoftware/fs_sw.htm
 
Man, can you believe I get sleepy after five rungs ?

Here's a snippet that will get the ASCII string into your controller. It's in v15 of RSLogix 5000.

Finding the commas, parsing out the shorter strings, and converting those to values (hint: STOD or STOR instructions) is another exercise in ASCII string handling.
 
Well Ken once again you have done well by the TFC!


The ASCII instructions work, I had to toggle the Tigger_Query bit to get it to read but I can work on that.

Thanks again!!!!!!
 
Thanks Ken! Got the device to respond and parsed out the string to an INT (using MID and STOD). Now I want to programatically toggle the Trigger_Query, but can't figure it. Using RS logix 5k w a 1769L32E (AB).

TIA
 

Similar Topics

I am working on a project, inside an AB CLX, I implemented the Modbus TCP Client AOI published on AB website, to interreact with a Modbus ASCII...
Replies
7
Views
3,455
Hi All, I am new to this site and I am looking for some help, I am trying to send ASCII characters to a unit that performs a task via a...
Replies
43
Views
16,830
So I have a project where I need to send a bunch of ASCii data over serial to a printer. In the past with an ML1400 I would just use an AWA...
Replies
0
Views
1,689
Hi all, i got some problem about i think some configuaration in mine micrologix1100. I try to write some string (ascii) via serial com to some...
Replies
0
Views
2,263
I have an omron cp1le plc and a sato s84ex printer I need to learn how to send print jobs to it. I know I can use the Serial card option and send...
Replies
3
Views
2,587
Back
Top Bottom