Capturing transitions (Positive and Negative)

quadPLC

Member
Join Date
Feb 2010
Location
Milwuakee
Posts
51
Hey guys,

I am trying to set up something that seems so simple in theory, but is making tons of headaches in reality.

I have a value that I want to watch both positive and negative transitions on. We will call it "saving". If saving goes high, I want to fire "saving_state_change" for one scan. But if it goes low, I want to fire the "saving_state_change" for one scan. These scans are used to reset a reference count.

I have tried most permutations but, from what I see, you can only get one or the other to work (whatever evaluates last). Is the solution only to use two separate "save_state_change" variables?

I am doing this in SIEMENS Total Integrated Automation v11 with an S7-1200 PLC.

Thanks in advance, guys!
 
If saving goes high, I want to fire "saving_state_change" for one scan. But if it goes low, I want to fire the "saving_state_change" for one scan
If if the value change regardless of direction your do "A" once?

What's hard about that, I must be missing something.
 
Compare the current state to the previous state. If they are not equal, then it has changed, either high or low, it doesn't matter. So one scan, move the current value into a storage bit. The next scan, compare the current value with the stored value, then once done comparing and setting a bit true if they are not equal, move the current value into the storage bit to be ready for the next scan.

It works with INT, REAL, BOOL, BITS, etc.
 
you need 2 variables, 1 for the 'value' and a second for a 'value image'
Compare the 2 values for not equal if true then fire your 'saving state change'
immediately afterwards move the 'value' to 'value image'
the comparison will thus be true for 1 scan only on change of 'value'.
 

Similar Topics

Hello. I actually still have a customer that has a 486 running a DOS program controlling a press. My task, convert it to an AB PLC and PV+. I am...
Replies
24
Views
1,848
is it possible to capture a value while its constantly changing then taking its highest reading? I have a nozzle that sprays for 10 seconds. I...
Replies
14
Views
3,449
Hey all, First time poster looking for a little help. I have a Kinetix 6000 drive that I am capturing faults for in RSLogix but I need some help...
Replies
0
Views
966
Hello PLC Experts, I want to do a logic where in an analog value will be captured per second or in any time possible and move that value into a...
Replies
2
Views
1,617
Processor: Schneider M241 Software: SoMachine 4.3 I am trying to capture the RPM of a shaft using a prox sensor. The shaft has two cams on it...
Replies
8
Views
2,521
Back
Top Bottom