Changing values

mulderm

Member
Join Date
Jun 2003
Location
Netherlands
Posts
298
Hello,

I have make a little program for the PLC5 using RSLogix5,
see attached file.
Problem is that when one of the Equal-block is true,
the words N7:221 and N7:222 have changing values.
In this example n7:221 change from 8224 to 19532 and
n7:222 change from 8224 to 19488.
How can this happen?
I want that in these example N7:221=19532 and N7:222=19488 are
on the end of the scan, because they are transmitted to Excel!
And when the 3 EQU-blocks is false then N7:221 and N7:222 = 8224

Greetings,
mulderm
 
Last edited:
In the processors I am familiar with any communication of values to the monitoring software occurs at the end of the scan. In that case you would see constant values for these locations.

Maybe others can verify that possibly the PLC5's communication is independent of the scan and can sometimes show the values which exist between the execution of these rungs when one of the EQU blocks is true.

Either situation (communicating synchronously or asynchronously to the scan) could be confusing to someone not familiar with the method. Many would assume that they are looking at a value in an instruction at the moment that particular instruction is executed. I don't know of any system where that would be the case.

As a check of your logic, place a rung between 1 and 2 which copies the values from N7:221 and N7:222 to other registers. Also add another rung after the last performing a similar copy but to different registers. Monitor these to see truly what is happening.
 
As I suggested, add the monitoring rungs to copy the values. Assuming there are no more rungs which change these registers, the copied values on the last rong would be the value at the end of the scan. Obviously the values BETWEEN your current two rungs will be 8224. The values after the second rung will depend on the value in the EQU comparisons.

I was concerned that, as opposed to most other system I have worked with, that you are sometimes seeing the value as it exists between the two rungs. This could only be true if the communication to RSLogix 5 is happening asynchronously to the scan instead of after the end of the scan.

The other possibility is that N7:220 is changing value rapidly causing the final MOV's to intermittently execute or not execute, but I would assume that you would see that also.
 
Kim - we understand that, within one scan, the values are changed then, possibly depending on N7:220's value, changed again. The issue is that typically the viewing of the values from within a programmin package involves communication which takes place at the end of the scan and therefore reflect values as they exist at that time. Mulderm is reporting that, when N7:220 is at one of the trigger values; he is seeing N7:221 and N7:222 with fluctuating values. I suggested that the PLC5 and RSLogix 5 somehow communicate asynchronously to the scan or possibly the N7:220 is not actually static but is changing rapidly (though this also should have been seen.)
 
Sorry, after reading this a bit closer I see what he is saying. I agree with you that it appears that the communication is happening asynchronoulsy. Maybe it would be better if he changes his logic to:
If EQU set N7:221 and N7:222 as he has done.
Change rung 1 to If Not EQU set N7:221 and N7:222 to another value.

That way the values should remain constaint as long as N7:220 does not change.
 
I set up exact logic on a PLC5 and did not see the values changing
as you described. If you are connecting across a network, you might see the changing values but as mentioned. The values at the end of the scan would be correct. What you can do is add a branch with an output OTE (B3/32) around the MOV block and then add a XIO of B3/32 in front of the FLL block. This would then disable the FLL when the EQUAL blocks become true.
 
I have seen this happen on a panel view display.PLC logix had written to same address in different parts of program, as yours does. Kim and Mark are right change your logix.
 
That´s what I mean, Mickey.
Sorry for the language problem.
I have changing my program like Mark say´s.
The problem is over now!
Thank you for the information and help.

A nice christmas!

mulderm
 
With a PLC5, the HMI is ususually connected via DH+ or RIO. RIO data going through the internal regular block transfers occur synchronously to the program scan (ie PV550 as rack 3, O:030 thru O:037 are synchronous transfers). Other programmed block transfers and DH+ reads intitiated by the PLC program or external devices are asynchronous. These block transfers are queued in the order they're requested and can execute at any time during the program scan. I haven't looked at your code, but would suggest that you use dedicated addresses for the values in question. It sounds like one of your addresses is being used as a "scratch pad" for an intermediate calculation. Change that code so the address you're reading is only written to at the end of the calculation, and you'll be okay.
 

Similar Topics

Dear Experts, I'm just started working with GEO SCADA and I need your valuable help. Currently, I'm trying to edit the alarm limits on MIMIC...
Replies
0
Views
212
Hi, all! I have a 1768-L45 CompactLogix PLC with a couple of 4-20 temperature transmitters connected to it. I have the temperature scaling...
Replies
6
Views
486
Be gentle, itÂ’s a first post & IÂ’m learning along the way. Have checked out this forum and search engines for answers, hopefully someone can...
Replies
2
Views
1,357
Hi again Looking to write date or time values to the RTC in my MicroLogix 1400 In the ladder logic I am using a CPW instruction as per the 1400...
Replies
13
Views
3,240
Hi, I'm working in so machine basic v1.5 and I'm wondering if it is possible to change the start time and stop time in a schedule block with a...
Replies
0
Views
1,258
Back
Top Bottom