ASCii Line Feed Data

PLChristian

Member
Join Date
May 2021
Location
Wisconsin
Posts
27
I am using an AB1769-ASCII card and a 1796-L24ER controller to read data from a scale. The data I am currently receiving is all Line Feed data ($l). How do I convert this Line Feed data into usable values?
 
Baud Rate?

Are you sure that the baud rate, parity, and stop bits are all correct? If they aren't you'll get junk. Junk consisting of a bunch of line feeds would be a surprise but this is the first place to start.
 
Can you post the code where you are extracting the Ascii Characters?
From reading this post and the one you did yesterday i don't think you are extracting the characters from the line buffer. It seem like you are looking at the Module input data that is created when adding the module.
I've done exactly what you are trying to do but the data will come from the scale as a string in several different formats. Depending on which one you choose you will extract and delete several characters to just get the weight .
 
That buffer handling logic is good for controllers with a built-in RS-232 Channel 0 serial port, but is not necessary for the 1769-ASCII module. That module looks for termination characters (which should be <CR> <LF> for this device) and places the data into a SINT[x] Input tag.

I believe that our new member PLCristian has another active thread that describes in more detail the scale/balance device and includes a link to its user manual.

I realize that "I set the serial parameters correctly" may be true, but ideally the actual settings should be shown.

The most common serial framing in industrial automation is 9600 or 19200 bits/second with "8/N/1" framing with 8 data bits, No parity, and 1 Stop bit.

All RS-232 frames have a Start bit, so "8/N/1" makes a total of 10 bits per character. The 1769-ASCII supports both 10-bit and 11-bit serial framing.

Corrected: The 1769-ASCII defaults are 7/N/2, which comes from a null set of flags inside the microcontroller, rather than from the actual industry standard of 8/N/1. Don't assume that other devices will use 7/N/2 framing just because it's the default setting in RSLogix 5000.

Another default setting for the 1769-ASCII is "include delimiter", which puts the delimiter bytes into the Data[x] tags. That might explain why 0x0A = Line Feed shows up in the CompactLogix tags, but does not explain why it's the only thing that shows up or why 0x0D = Carriage Return does not.

Ideally, that thread with details should be where new posts are made, including screenshots or complete details on the serial settings for both the 1769-ASCII and the A&D Balance device.


http://www.plctalk.net/qanda/showthread.php?t=129303
 
Last edited:

Similar Topics

Hello all, as you probably are all aware I have been trying to interface an A&D GX4002A balance to a 1769-L24ER-QBFC1B controller by the use of a...
Replies
7
Views
1,476
Hi, I need to send a command from a S7-300 with a CP341 in ASCII format (RS485). I can get the command to send fine, what I need to do is add...
Replies
1
Views
6,251
Hi all, I'm trying to use the "Test ASCII Buffer for Line" Instruction in a AB SLC500, and are having some trouble. What I am having trouble...
Replies
5
Views
5,550
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
93
I have an L24ER-QB1B with a 1769-ASCII card in slot number 4. I'm looking to send data to this zebra printer after every completed sequence. I'm a...
Replies
2
Views
439
Back
Top Bottom