1734-232ASC Ascii Write to Printer

bradal

Member
Join Date
May 2006
Location
edmonton
Posts
156
Hey Guys,

Thanks in advance for any help.

We are converting our Compactlogix L32E application into the 1769-L18ER-B1BB.

One major hurdle left is writing information to a receipt printer. In the L32E I simply used some AWT commands and staged them appropriately.

I see now that the AWT is not supported by the L18 and I will need to program to suit. I had no idea that it was going to be this big of a pain.

Right now looks like I need RSNetworx to configure the module and some code within the PLC for actual writing. Is there a simple way to trigger/send information to the Local.X:O.Data register and trigger a write?

Seems like the setup in the manual is geared towards Devicenet reads, which is not what I am trying here.

Any help would be appreciated.
 
If you're just doing a unidirectional ASCII write, it's easier than it looks right now.

You don't need RSNetworx for DeviceNet; all the configuration will be done through the applet in the RSLogix 5000 I/O tree.

The POINT ASCII modules basically look for you to increment the Transmit Control Number in the Output data tag. When they see that number change, they take the data in the "Local:2:O.Data[x]" output buffer and write it out the serial port. The number of bytes sent depends on the Local:2:O.Length value and the size of the output buffer.

The tag you want to increment is called Local:2:O.TransmitRecordNumber.

(Assuming it's the first expansion module, POINT Slot 2, and that you're using Handshake mode instead of Immediate Transmit mode).

I'm not totally sure why there is a .TransmitRecordNumber as well as a tag called ".NextTransmitRecordNumber" in the output data image. I think that the "NextTransmitRecordNumber" may be mis-labeled; It's referred to in the 1734-UM009 User Manual as "Next RX Record Number", and is used by the Controller to let the module know it's ready to receive another incoming string.
 
Last edited:
Man....thank you so much Ken, I figured there had to be a simpler way.

You just saved me a day of completely reviewing the manual :) Not that I avoid the manuals but there is no much irrelevant information that you have to sift through.
 
Hi Ken / Bradal,

I am using the same set up to send data out to a Jet 3 printer, a 1769-L18ER-B1BB with a 1734 232ASC card. Ken, your post has also saved me hours of digging through the manual. I wrote some logic to achieve what I needed but I am having a problem with odd and even number strings (5 characters / 6 characters ). I presume I am missing something fairly obvious.

I take the data from a HMI input, use the DTOS to convert it to a string then copy the string into O:Data[0]. I am currently just reading the data back through a hyper terminal. If I send out 5 or 7 characters in the string, it appears as expected on the hyper terminal interface. If I send out 6 characters, a character is inserted at the start of my string ( an ascii spade character)
My parity is set to none, I am using 7 data bits with 2 stop bits. I have tried altering various settings in the control tags but nothing seems to be working. Can anyone point me in the right direction? Its been a long day...:sick:
 
The ASCII spade character is hex 0x06, so it's likely that your Length value is getting mixed up in there somehow.

Can you post the *.ACD file (ZIP it first) ?

For diagnostic work I strongly prefer RealTerm instead of HyperTerminal, because of its configurability and the power to see the actual data bytes instead of just the text.
 
Hi Ken,

My ACD file is too large for the site, I have attached a screen shor of the logic and the configuration of the card. I can mail you on the zip file if you send me your mail address. Let me know if there is any other info I can send on. Thanks

232ASC Image.jpg 232ASC Image 2.jpg
 
A hint about posting screenshots: try to shrink the window as much as possible when showing ladder logic, and use *.PNG filetype. JPEG frequently makes text hard to read, like in this case.

I think the problem is that you're copying the whole STRING datatype to the Output data file for the 1734-232ASC

A STRING datatype consists of a DINT for the .LEN value, and a SINT[82] array for the .DATA[x] array.

When you copy the whole thing, the first four bytes will be the Length and the data won't actually begin until the fifth byte.

When I use the 1734-232ASC, I manually put the .LEN value into the appropriate byte, then put the .DATA[x] in separately. Of course you have to then also manipulate the handshaking value.
 
Hi Ken,

Thanks for the info. I had a look at the program and you were spot on, the length is the first value being sent out. There are only 6 digits in the string so I am now manually moving each Data[x] value in and the problem is solved.🍻
 

Similar Topics

Does anyone know how to inhibit the 232 module from sending data during PLC power-up? To send data during normal operation, the Transmit Record...
Replies
3
Views
1,911
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
17,076
Hello Friends I have took the sample program from AB webpage and modified, but I can only send 127 chars...
Replies
1
Views
190
Having issues sending numeric display to Vorne 87-705-4D-4CTR scoreboard from 5069-L310ERMS2 with 1734-232ASC. I have Putty up on one of the...
Replies
11
Views
2,561
Hi All, I'm trying to connect a 1734-232ASC to a ViewMarq overhead display and I cannot figure this out for some reason. I have the baud rate...
Replies
2
Views
2,062
Back
Top Bottom