struglling to alternate pumps

MaGoOoDy

Member
Join Date
Jan 2016
Location
Saudi Arabia
Posts
34
i am struggling to alternate between two pumps in my lift station project. ( this is my first project so far )


whenever i test the whole program and it is almost complete only i have found a mistake in the part of alternating the pump, it is not as the control sequence said .

i have attached the part of the program where i program the lead/lag switching, when i toggle the ( 7 days cycle trigger ) then the program stuck in toggling loop.


this the pdf of the program
https://ufile.io/l4zab

this is recording of my screen when i run the program online.
https://ufile.io/fwz1q




do i am making this in proper way ?

guys, how do you handle this alternating ( lead/lag ) between part ?



attached the control philosophy

WhatsApp Image 2017-05-06 at 6.27.46 PM.jpg
 
The needs of your logic can be boiled down to a basic flip flop.

There are at least a dozen different ways to solve it.

The method you are using is probably being foiled by the fact that the trigger bit is true for more than one scan.

I don't have access to programming software right now, but basically, you need to ensure that you only execute a "flip" once and not flip and flop right back to where you are.

Here is a link with many examples of various methods of flip-flops. They are based on Microlgix, so if you are using a SLC, you'll need to substitute ONS with OSR instructions where used in the examples.

http://www.plctalk.net/qanda/showpost.php?p=438416&postcount=12
 
Last edited:
just from a quick glance you need to reset your trigger B3:0/7 I couldn't download video but I assume when you toggle you are leaving that bit on so what happens is

bit is on N7:3 = 0 Pump B is set to run fires one shot on rung 5 n7:3 is set to 1 but if B3:0/7 is still true rung 2 executes rung 0 becomes false on the EQU so ons resets

Rung 4 resets N7:3 to 0 and cycle starts over you need to turn B3:0/7 off
 
You toggling bit stays on and after it there is EQU which makes bits to alternate 0/1. It might work if you move EQU blocks on networks 1 and 3 after ONS.

Why you are setting bits B3.0/6 and B3.0/8?
 
even though if the toggling bit stayed toggled it should be only applied only for one scan since i am using one shot after the compare instruction.
 
The needs of your logic can be boiled down to a basic flip flop.

There are at least a dozen different ways to solve it.

The method you are using is probably being foiled by the fact that the trigger bit is true for more than one scan.

I don't have access to programming software right now, but basically, you need to ensure that you only execute a "flip" once and not flip and flop right back to where you are.

Here is a link with many examples of various methods of flip-flops. They are based on Microlgix, so if you are using a SLC, you'll need to substitute ONS with OSR instructions where used in the examples.

there is no link appear to me in your post ...!!
 
even though if the toggling bit stayed toggled it should be only applied only for one scan since i am using one shot after the compare instruction.

N7:3 change value between 0 and 1, ONS give one shot on network NW0 and 2 every time, when N7:3 changes.
 
Last edited:
i tried to find Flip flop examples to see how could i manage them to choose the lead pump but i don't know how to implement them in my
code ...

help ..
 
Why the bit N7:3 fluctuating in the video? It is the one determining the Lead/Lag and whether the operation is in Auto or manual it should not be changing the decision so fast based on your description of operation and as far is I can tell it is the one causing the whole fiasco.
 
Why the bit N7:3 fluctuating in the video? It is the one determining the Lead/Lag and whether the operation is in Auto or manual it should not be changing the decision so fast based on your description of operation and as far is I can tell it is the one causing the whole fiasco.

Probably because the program needs to update which pump is lead pump. I haven't watched the video.

Is the cycle trigger (B3:0/0) on for more than 1 scan? If so, that would cause what you're describing.
 
Here's how I would do it. This is an example of a flip flop, which was mentioned by OkiePC.

yGYfiwQ.jpg
 

Similar Topics

Hello All, I want to publish my data in sql server in Excel format as daily report. And xl reported pro version seem to be much expensive which...
Replies
1
Views
494
I'm looking for alternate module that I can use in place of Rockwell 5069-IO mainly for safety output card (OBV8S). Looking at the lead time, I...
Replies
2
Views
1,198
Good morning everybody, I hope you are very well. I share with you the information of the PLC LOGO! Siemens and expansions that we have...
Replies
4
Views
1,089
Hello All, Currently I am migrating S7 300 to S7 1500 & I am unable to use DP send & receive data from Master PLC. Which instruction is...
Replies
4
Views
1,640
Hi guys Do you have some experiences with Power Analyzers such as Siemens SENTRON PAC4200?.. I have alternative analyzer installed on machine...
Replies
6
Views
2,055
Back
Top Bottom