Studio Logix 5000 v.30.11 - ONS issues

Actually, I have 1 tag called ONESHOT that is an array from ONESHOT.0 to ONESHOT.100

What is the Data Type of ONESHOT? I am not familiar with 1 tag that is 101 bits. Maybe the above is a typo? I see in your screen shot you used ONESHOT.1 That would suggest a data type of DINT or INT. If it was a BOOL array they are created in increments of 32 and the address would be ONESHOT[1]. If is an Array of 100 DINT then the address would be ONESHOT[0].1 so I am confused about your data type.
 
What is the Data Type of ONESHOT? I am not familiar with 1 tag that is 101 bits. Maybe the above is a typo? I see in your screen shot you used ONESHOT.1 That would suggest a data type of DINT or INT. If it was a BOOL array they are created in increments of 32 and the address would be ONESHOT[1]. If is an Array of 100 DINT then the address would be ONESHOT[0].1 so I am confused about your data type.

It's a DINT, my bad, I was thinking of another tag as I was typing this. See picture below. Goes up to ONESHOT.33

dint tag.PNG
 
My $0.02 on periodic tasks:

I don't program tasks periodically, to have to see if they are being called.

I call all tasks every scan, then if it only needs to run occasionally I have the start of that task make that decision, clear any bits that need cleared, set a Skip_Bit for that task and if the task needs skipped and the Skip_Bit for it is set then I do a return.

This way if it is found later that something else needs cleared it can be done inside that task.

I don't have any periodic tasks. What's the purpose of using a periodic tasks, why not run all programs continuously?



I'll go ahead and split up all the branches onto its own rung and have unique ONS bits for each one and remove my timers and see.
 
Based upon what you are saying, it should work, but I would NEVER parallel multiple branches to a single one shot. You're just begging for trouble when you do that. The one shot requires a transition in order to function.

By transition, you mean toggling the inputs behind the ONS, correct?
 
If you ZIP and post your program, folks can have a look at it.

I genuinely think there's something else you're missing in the system, whether from an attached controller or HMI, or in your logic or task execution setup, in a place you haven't looked or are misunderstanding. Carefully examine the way this Routine is executed, whether in the Continuous Task or in a Periodic Task.

Because I've participated in discovering PLC firmware bugs over the course of my career, I don't tell people that it's impossible that their problem is related to a bug.

But the basic boolean instructions in the ControlLogix have been bulletproof for 20 years. It's more likely that I'll be bitten by a rabid penguin on the subway tonight than that the ONS instruction doesn't work.

I agree, I'm sure the error is a programming issue on my end. I'll figure out whether I can post my entire PLC program or not.

Also, What's the purpose of using a periodic task, isn't it easier to make everything continuous?
 
This is what I would do. One ONS per branch and you will likely solve your problem.

Also, make absolutely sure that the address for the ONS is not used anywhere else. I normally try to make my
"OneShot" tag locally scoped to help ensure this.

Yes, I will try this and let everyone know if it works or not.
 
The only reason I can think of is your unlatch logic is unlatching the bit in the same scan cycle. For testing you could put in a CTU or Add instruction beside your latch bit to verify that the rung came true and your one shot passed power to the latch bit. The value of a counter or Add will increment even if the OTL is reset by the OTU.
 
For testing you could put in a CTU or Add instruction beside your latch bit

I do this frequently when I'm chasing a "race condition" or other bit of Boolean logic that I don't understand well, especially when I'm figuring out HMI interface details and timing.

Those Counters or integer registers always get a "KR_" prefix so I can search the program to be sure I've taken them all out when I'm done troubleshooting.
 
Great, I will try this also. If it is getting unlatched in the same scan cycle, how can I make the output unlatch first before getting latched? Would I just move my unlatch rung above the latch rung? The PLC scans from top to bottom, meaning from rung 0 to rung 10 for example?
 
yes, that would help if that is the issue. Another thing to consider is your condition bits. You stated that you made sure they were off before the next one comes on. They also could be going off and coming on in the same scan cycle and not allowing the ONS to see a transition. That's why you needed the pulse timer. The timer allows for multiple scans to ensure the transition. Or you can forget the OTL and OTU and use an old fashion holding circuit. If condition true then hold until reset condition.
 
Also, What's the purpose of using a periodic task, isn't it easier to make everything continuous?

Periodic tasks are useful for functions that are time critical, such as totalization. A periodic task that operates once per second will be far more accurate than would a 1 Second timer pulse driving logic within a continuous task.
 
I never use continuous tasks except for my very first one back around 2001. I make all of the normal tasks periodic. I never had an issue with a oneshot not working right. I have only done less than a dozen Logix5k projects though.
 
I never use continuous tasks except for my very first one back around 2001. I make all of the normal tasks periodic. I never had an issue with a oneshot not working right. I have only done less than a dozen Logix5k projects though.

Interesting. I vaguely remember some discussion about passing oneshots to different periodic tasks. Is the thought that each task gets its own "instance" of the ONS that sits and waits for the task to see it, then clears?
 

Similar Topics

Does anyone know how to set the background colors of instuction blocks (TON, MOV, etc)?
Replies
1
Views
92
Hey Guys, I am looking for a cr@cked version of Studio 5000 Logix Emulator V28 or Rslogix5000 V21, which will work with my current emulator...
Replies
1
Views
230
Good Evening , I have version 28 of Studio 5000 from a few years ago . If I got a new CompactLogix CPU , what is the lowest version of...
Replies
4
Views
436
I have installed Studio 5000 Professional version V36 a time ago and installed today Logix Emulate V36. I have a exsisting PLC program, but...
Replies
4
Views
591
Hi all, I'm going to start programming a 1756-L73 and I'm still waiting for the full Studio5000 to be able to start at it in earnest. But I...
Replies
5
Views
386
Back
Top Bottom