STRING CPS Confusion

Bob O

Member
Join Date
May 2003
Location
Posts
1,873
I very rarely work with STRINGS and can't remember the last time.
I've attached a l5k file that contains four rungs where I'm simulating getting a string from an RTA gateway [I type a random string in] and then CPS to a string element based on the index number.
If the TriggerTON PRE is set to 0 or even 100 I get unexpected results and I don't like having the timer in there to begin with.


Testing on CompactLogix V 24.02


Where am I going wrong?


Thanks,
Bob O
 
I don't have Logix5000 at home but the L5K was short enough.



I had trouble with string returns from RTA devices. I believe there is a couple of scan times between the RTA device writing the .LEN and it writing the character array of the string.


I found that I had to wait until both .LEN was not equal to zero and there was nonzero data. After copying the string I had to totally clear the receiving string. It's not enough to just set the .LEN to zero. Create an empty string and copy it in to the receiving string.
 
Instead of moving a zero into the .LEN of the Read string, why not just CPS a "blank" string (no data, zero length) into the Read string after the storage CPS?

The problem could be with how the RTA driver communicates: it could (and this is pure speculation on my part) confirm that the data was received correctly by asking the PLC for the value in the Read string. If you alter the Read string prior to it knowing that the data is good, it will resend it, causing you to think that "new" data has been sent, rather than "the same old data".

**IF** that is the case, then CPS the Read string to a Storage string when Read ≠ Storage, and do the rest of your increment logic:

PLC_Net.jpg
 
Thanks.
I don't have the RTA device. I'm just simulating it's string by typing info into the tag RTA_Read to test the CPS.
I'll try the above suggestions.
 
No luck. It just seems as it takes the processor time to do the CPS.
I even installed a patch KB1059819 that pertains to RSLinx Enterprise (which I'm using) and NULL character in a string not clearing. I thought it was a long shot, and it was.


Thanks Again,
 
try this:

RTA-Logix3.png



What I normally have is RTA_tag is declared as SINT[84] and barcode is a string ( see below):

RTA-Logix4.png
 
Last edited:

Similar Topics

Hello Inside a FB, I´m trying to transfer a string from a DB to a IN_OUT var that was define as a UDT. The problem is that i can´t determine the...
Replies
4
Views
72
As the title says, I'm using CCW with a PV800 (and Micro850). I've made a scheduler in which a user can choose a month, day (1-31), hour (0-23)...
Replies
15
Views
452
Hello, So i managed to read the string coming from control logix and put a string display in PanelView 800. Now I am struggling to do the other...
Replies
1
Views
115
Does anyone know why my one string is displaying this way? It is causing issues with my HMI displaying it.
Replies
4
Views
237
Hello Guys, I am using 1769-L36ERMS PLC by Rockwell which doesn't let me MOV or COP literal text into string datatype? i very well know the...
Replies
13
Views
350
Back
Top Bottom