Implmenting IF condition in FBD

musman

Member
Join Date
Nov 2014
Location
Munich
Posts
20
Hello, I am writing a POU in FBD using CoDeSys. I want to implement an IF condition in one network of FBD editor to jump to another network if result of IF condition is true.

I do not know how to implement IF condition in network and how to assign the result to JUMP label?
 
You don't explicitly insert an 'IF' statement in FBD, it's more of an implied function when using a combination of AND, OR, NOT, etc. When you place an AND block and connect variables to it, you'll read it as "IF variable1 AND variable2, THEN...".

Insert a jump in FBD using the C-L button, or by pressing Ctrl+L
 
You don't explicitly insert an 'IF' statement in FBD, it's more of an implied function when using a combination of AND, OR, NOT, etc. When you place an AND block and connect variables to it, you'll read it as "IF variable1 AND variable2, THEN...".

Insert a jump in FBD using the C-L button, or by pressing Ctrl+L


What I want is that if result of IF condition is TRUE, then my program should JUMP to another network rather than going to next network However, what I am facing is that even if output of AND is false, my program is JUMPING to the other network instead of going to next Network... What should I do to correct it?
 
sample.jpg

What I want is that counter should reset after CV equals PV..and AND condition should then go to label: con
 
Just place your 'control' variable on counter.Q. Or place counter.Q on the RESET input. Then, network 3 and everything currently downstream of the counter.Q can be deleted.

One other thing..
The AND statement currently in network 4 looks like you're trying to compare counter.Q to 1, to see if it is true and if so, jump to 'con'. The AND statement examines each input to see if it meets certain conditions, ie true for bool, var=# for byte/word/dword, not comparing the two inputs against each other.
 

Similar Topics

I have a question about process interlock naming. I want to hear opinions, as well as if there is a relevant standard. When naming specific...
Replies
3
Views
666
Hello: Question for SCADA/HMI experts. One of our customers is responsible for planning and selection of key technologies for manufacturing...
Replies
12
Views
2,961
We have a repair hole that carriers come into. As they come in they pass a RFID reader and each carrier has a tag. The repair hole can hold 5...
Replies
2
Views
1,950
Hey Folks. At our plants we've been talking about monitoring the current on motors through the VFD parameters to gather a bit of historical /...
Replies
17
Views
3,738
All, is it possible for a compactlogix to have an overflow fault if the destination of calculation is REAL, the variables are REAL but being...
Replies
1
Views
1,358
Back
Top Bottom