Help - Search - Members - Calendar
Full Version: 1769 ASCII Module Programming
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
sa747sp
Can anyone please offer some advice on how to program the 1769 ASCII module.

I want to send a batch request amount in litres from a PV Plus unit to a remote instrument over RS232 Comms. I am totally confused with this piece of code and any help would be most welcome.

Software is Logix 5000 on Compact Logix L32

Many thanks
paulengr
QUOTE(sa747sp @ May 3 2009, 08:26 AM) [snapback]81764[/snapback]

Can anyone please offer some advice on how to program the 1769 ASCII module.

I want to send a batch request amount in litres from a PV Plus unit to a remote instrument over RS232 Comms. I am totally confused with this piece of code and any help would be most welcome.

Software is Logix 5000 on Compact Logix L32

Many thanks


The handshaking may be the part you are struggling with as this particular card's method is different from the others I've seen. You may also want to look at the Point I/O tutorial on this web site (www.mrplc.com) as an example of how to do this with a different ASCII card. Follow the user manual (literature.rockwellautomation.com) since the installation manual is pretty useless.

What you do is to put the data you want into the output data. See page 3-6 for simultaneous mode. Alternate mode is not much different. When you put the data in, there are two possible formats. You can either specify the exact number of bytes with the length parameter or set the length parameter to 0 and then it transmits everything up to the "delimiter" which is a special character. For instance if you are sending lines of ASCII terminated by a carriage return (decimal 13), then you could make 13 the delimiter and always leave the length at 0. Finally, once the data is loaded, change the transaction ID. I suggest you just increment it to be safe. Be sure to trim it to 8 bits too (make the reserved fields 0). The easiest way to keep all the bits and parts lined up is to use a UDT and then copy everything over using a copy instruction.

Once you've loaded in your string, monitor the input block. The TS bit should be set and the transaction ID should match the one you loaded into the output buffer when everything is set up correctly. Then you are free to load another string.

Note that you CAN load the string and the transaction ID with a single copy command but make sure you use the synchronous variety so you don't run into problems with partial data transfers. For that reason I prefer the safe approach...always copy over the string data first, THEN update the transaction ID once the copy completes.

As to string usage in general, it is really ugly manipulating strings in ladder. You are probably better off doing it in structured text (ST) if you don't mind learning a slightly different PLC language. String manipulation in PLC's in general is kind of ugly anyways. It is always easier with PC languages since most of them were developed around string manipulation and text terminal interfaces and take to it like ducks to water.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.