5069-SERAL to WeighHead setup help

Chris90

Member
Join Date
Jun 2020
Location
UK
Posts
10
Hi all, have a project which requires reading a weigh head weight over ASCII. Never really touched ascii so struggling a bit. The weigh head is in cyclic mode so I’m just reading the received data and looks like I’m getting data but not sure it’s at all sensible. First question really would be how do I set up the start and end delimiters according to the manual?

0224EC70-1055-4617-B739-97F4DFCB39B2.jpg 75DEA232-5531-4493-91C1-031A7A0658C7.jpg 3DC4F4E0-B39C-40BA-B185-05074D4898E1.jpg
 
The termination/deliver character should be carriage return a.k.a. <CR> a.k.a. ASCII code 13 decimal = 0x0D hexadecimal.

The $(24H) initial character of each sample is the dollar sign character '$'

The input SINT data shown have neither of those characters, so I suspect the is a problem with the serial communication. It could be a mismatch in baud rate, stop bits, parity bit configuration. If this is RS-485, it could be that the signal wires are backwards.
 
Thanks, just confirmed and it should be 232, confirmed baud rate etc but getting nothing at all so will have to trace it from the weigh head (it goes fibre from the unit to a converter in our panel as shown attached), all provided by weightron

Just to confirm, with the weigh head set to cyclical (as opposed to remote commands), I should just be able to read straight away without transmitting anything / setting up the ascii transmit parameters?

46E7414D-76FA-496C-B629-3DCDD762DCFE.jpg
 
Just to confirm, with the weigh head set to cyclical (as opposed to remote commands), I should just be able to read straight away without transmitting anything / setting up the ascii transmit parameters?


Yes, it may get messy at startup as the buffer/UART will be full, so the code may need to throw some initial data away, but once the buffer is emptied and data are being read by the PLC as fast as they are coming in, then yes.
 
Thanks,I’ve swapped the wires and I have activity now and data looks sensible (weigh head is reading 0).I just need to manipulate the data now

IMG_5257.jpg
 
I just need to manipulate the data now


I noticed in the middle attached image of the original post that you can configure the PLC serial port to detect both "Start" and "Termination" delimiters. I suggest you put '$$' (or '$24' i.e. single dollar sign) as the former and '$r' as the latter and see what shows up in that SINT array Local:1:IO.ASCII.RxData. You might be able to convert directly to a DINT using STOD or to a REAL using STOR instructions.
 
Here is an example of how to transfer data from the .RxData array to a string.

https://literature.rockwellautomation.com/idc/groups/literature/documents/um/5069-um003_-en-p.pdf#page=123


  • Note the use of the CPS instruction
    • I would use CPS on the Transaction ID so the 5069-SERIAL cannot update data while it is being copied.
  • You may need to fiddle the CPS parameters and/or the string length if the Start and Termination delimiters are in the .RxData array.
    • It seems you can exclude them from .RxData using the Exclude option of the delimiter configuration.
 
that's great thanks very much for your help :) yes i have logic to act on transaction ID, as well as alarming if transaction ID hasn't updated in x seconds.
 
Dumb question. What model? don't they have ethernet communication?

I have not seen an optical fibre RS-232 system. They gotta be expensive, imo. and the cost of the 5069-SERIAL.
 
you'd have thought in this day and age they'd have ethernet but they do not (n). The model is a d440is. Other third party devices we are communicating on modbus TCP/IP.
 

Similar Topics

Hi, I am using AB 5069-L306ERS2 CPU. My system should achieve SIL-2. I have safety door switches connected to AB 5069-IB8S module, and I want to...
Replies
1
Views
110
Hi everyone, Kind of new at this, so we recently upgraded our 1769-l32e to the newer 5069-L320erm, i converted the file over and Verify the...
Replies
8
Views
402
We are in the process of upgrading a controls system. The existing system is a SLC500 with some IO cards and a 1747-SDN module communicating to a...
Replies
5
Views
547
Hello, I have a laying out a system that will have a CompactLogix rack and I had a question on the power for the inputs and outputs. I was...
Replies
1
Views
377
I want to factory Reset my 5380 (5069-L310) I have here in home lab. Reason being I want to make a Internal How-To video for Setting the IP...
Replies
2
Views
541
Back
Top Bottom