PLC outputs on and shouldn't be

sparkie

Lifetime Supporting Member
Join Date
Nov 2014
Location
KS
Posts
1,139
I have a 1756-L62 CLX processor. I recently put a new program on it. I copied all the values of the card to an array, ran logic on them, then copy the array back to the outputs. I have not done anything with any of these outputs.

My question is why in the world would these ouputs be on if nothing was telling them to? I checked in Local.5.Data.O.X and all of the values for the outputs that are on are 1, like you should expect.

Could you this card have retained the value so that when I coped the values from the card into the array the outputs stayed on? The card in question is a 1756-OA16.

I'm pretty confused.
 
Did you copy an input card to your array or an output card. Values can be retained.

Once you set a 1 in an outputs bit box it will stay a 1 until something writes a zero to it. Go into the tag itself and type a zero into the value and if it changes back to a 1 then something is writing a 1 into it.

If you copied an input card into your array maybe the bit for one of the inputs was a 1 and if you copied an output card to your array again maybe one of the bits was already a 1.
 
PBuchanan is onto it I think.

You probably know that this coil:
Code:
--( L )--|
Turns ON a bit.

And this coil:
Code:
--( U )--|
Turns OFF a bit.

So what does this coil do?
Code:
--(   )--|
The quick answer you might get is "it turns a bit on". But that's not quite the whole story. This coil turns a bit on and off. If the preceding conditions on the rung are true, it turns the bit on. If the preceding conditions on the rung are false, it turns the bit off.

Now here's the crucial thing: every tag in your PLC will stay in the state it's in unless acted on otherwise.

This means that if you don't have any logic written which turns the output off, once you turn it on it'll stay that way.

Another way to think of it might be like a DINT tag. If you write a value of 123 to your DINT tag, it's going to stay as 123 unless you write some other value to it. This DINT is made up of 32 individual bits that all retain their state unless told otherwise. Your output is just the same - if you don't have an OTE or an OTU to write a zero to it, it's not going to change!
 
The thing is, I uploaded a new project onto the PLC, so the card itself would have had to have retained the state of its outputs through a power off.

That doesn't particularly seem logical to me either, so I'm not quite sure what is going on.
 
If the project you downloaded to the PLC had those bits set for any reason, and nothing in your program logic writes to them, then they will contain the same data that they contained in the downloaded file.

I have seen strange values appear when I created an array of data while online with a running controllogix PLC. This was many version ago, so things may have changed. I was expanding a tag array to be used as a sequencer and expected them all to contain zeros. But, apparently, the controller just made placeholders for the tags and did not initialize them, so the values they contained were whatever happened to be already in that memory location. This was different than your case but the idea is similar.

If you don't write something to those memory locations, then you cannot guarantee what is going to be there. The download operation did write something to them. Look in your offline file to find out what was written. You can change the values offline and save the file, then download it again if you want your outputs to go to a known state without any logic in the controller that affects them.
 
i didn't specifically write anything into the array, and i didn't set anything to the bits. When I started all the bits in the array were 0's because I checked. I'm not sure what happened here, I'm just glad it wasn't on any sensitive piece of equipment and I'm glad that card isn't hooked up to anything. It is just more or less a placeholder while we get the conveyor system retrofitted and later we are going to make a sortation system.
 
The thing is, I uploaded a new project onto the PLC, so the card itself would have had to have retained the state of its outputs through a power off.

That doesn't particularly seem logical to me either, so I'm not quite sure what is going on.


An output module has no means to retain it's bit status. The program that you downloaded must have set the bits high in the IO image table. Did the outputs remain energized after stopping and re-starting the processor?
 
Is it possible that you copied these outputs within a subroutine that is now disables or removed, if the outputs were 'on' when the subroutine was disabled or removed then they are no longer being updated and retain their last state.

Steve
 
I've had similar issues and found it to be an error on my part. If an output is turned on in a program and not turned off, even if you overwrite the program that output will still be on. There is nothing in the new program to turn it off.

Example, the old program uses O:1/3 and it is turned on when you overwrite the program. The new program does not use O:1/3 so there is nothing to turn it back off. It seems like the overwrite should kill it but does not.
 

Similar Topics

To quickly test a plc output which is wired to a relay do I dob a cable between the output and 24vdc+ source I.e something with 24vdc+ live such...
Replies
6
Views
637
I have a love hate relationship with LED status lights. I like them because they last a long time...BUT... They have a problem with PLC outputs...
Replies
4
Views
821
Engineers and designers, question. Do you typically fuse the PLC outputs ? I see some that are fused and many that are not. I typically fuse...
Replies
3
Views
1,023
Hi group! Repeatedly found answers to some questions in the PLC's programming world, now I decided to ask the question directly) Now I am...
Replies
22
Views
4,137
Hello Everyone! I've Mitsubishi FX2N-80MR PLC. It has relay type 40 outputs. I need one PWM output and two Pulse outputs for servo and stepper...
Replies
1
Views
1,439
Back
Top Bottom