Studio 5000 How to get a bit to swap states every scan.

ezbz

Member
Join Date
Feb 2015
Location
Washington
Posts
12
I want to know how to make a flip flop rung that will change states every scan. This is for a fast sequencer. Is there a special bit similar to a first scan bit that I can use?
 
Bit := NOT Bit; ?

Or if the bit is bit zero of a DINT,

Dint := Dint XOR 1; ?

I’m suspicious of this being a troll question.
 
Last edited:
I want to know how to make a flip flop rung that will change states every scan. This is for a fast sequencer. Is there a special bit similar to a first scan bit that I can use?


Please clarify what you mean with "similar to first scan bit"?
First scan executes only once as the name indicates, on first scan so similar to it would be like........how?
 
I'm thinking a counter with it's own CU bit normally closed in front of it. Use the Counters ACC.0 bit, it will toggle 1/0 every other scan.

Code:
XIO MyCounter.CU CTU MyCounter 2147483647 0

MyCounter.ACC.0 = odd/even bit, changing state every scan.

Edit: or an unconditional add, adding 1 to itself, same concept with bit 0.
 
Last edited:
Please clarify what you mean with "similar to first scan bit"?
First scan executes only once as the name indicates, on first scan so similar to it would be like........how?

He’s referring to just watching a System bit that just alternates continuously, scan by scan.
 
XIO BIT OTE BIT


That's how I program a "Every Other Scan" bit for testing and and how I used to count scans per second on SLC's by a counter, then multiply the ACC count by 2.
 
There is no "every other scan" bit built into the ControlLogix operating system.

It is trivial to create one with a single rung or a single structured text statement, simply inverting the value of a Boolean tag.

Every_Other_Scan.PNG
 

Similar Topics

I'm using one TON (called SystemTimer) throughout a program that I change the .PRE given different conditions. I'm porting an IDEC ladder over to...
Replies
8
Views
317
How can I achieve the same functionality in Studio 5000? Image 001.png for the old RSLogix500 program Image 002.png for conversion to Studio...
Replies
6
Views
2,520
Hello, I'm trying to look up a way to tell if the PLC has had any edits changes or download via a bit or GSV... My hope is to display a date and...
Replies
1
Views
1,387
Hi guys, I have a question regarding studio 5000 with processor 1769-L33ER V33.011 and Factorytalk View SE V12. I have an home-made pop-up...
Replies
3
Views
1,570
Hello All. I am new to automation so please excuse my explanation. I am working on a request where I need to reset 2 alarm bits (AlarmError1_Alarm...
Replies
2
Views
1,472
Back
Top Bottom