Mag
Hi to all,

I´m relative new to the OpenPLC environment.
Is it possible to write inline commands to the function block input like in the attached Codesys example?

To construct this code with additonal function block can be very confusing.

Kind regards to all.
Reply 0 0
spjosef
Hi Mag,

for me this looks like a mixup of FBD and ST. If you don´t want to use additional function blocks, I suggest using only ST.
This would look like this:
srFunction(S := (B0 OR SEL_MAN) AND Z0,
           R1 := NOT MANUAL AND Z1 OR NOT Q5 AND Z3,
           Q1 => holding)
Reply 0 0
thiagoralves
I believe you might be able to do this using a variable. Try adding a new variable (right click -> add -> var) and then on the expression text field you enter the ST expression you are looking for. It is possible that the compiler will understand that properly and let you go through with it
Reply 0 0
spjosef

I believe you might be able to do this using a variable. Try adding a new variable (right click -> add -> var) and then on the expression text field you enter the ST expression you are looking for. It is possible that the compiler will understand that properly and let you go through with it


Yep, I tried that out, it works. The simulation is a bit different, as the values can only be forced with the debugger. And also the "output-line" of the expression is red, which I am not sure what that means, but I think it doesn´t effect anything.
12.png 

@Mag: I still would suggest choosing only one of the two programming-languages, as it makes a cleaner code.

Reply 0 0
Mag
Hi to all. Thank you for your fast response!
Reply 0 0
mot
Hi to all,

I´m relative new to the OpenPLC environment.
Is it possible to create the IL based on the FBD??
Reply 0 0
Reply