Excellent tutorials. Thank you. I am doing all of them. For this tutorial I have 2 suggestions: 1. Use CounterPV within the IF/ELSIF statements instead of Counter01.PV (This way the operations of A, B, C change the preset value) 2. Use smaller PV values in the test of the logic so that you do not need to flip the switch so many times to validate the logic. (IE: 12, 14, 16 instead of 50, 175, 300) After the logic is proven to be correct, adjust the numbers back to the higher values as desired.
@endprg64773 жыл бұрын
Спасибо. Всё наглядно.
@TohidAlizadeh2 жыл бұрын
🙏👍
@LearnSomethingHelpful3 жыл бұрын
Nice video Tohid
@darkaster1345 жыл бұрын
Hi, could it be possible to have more than one effect if entering the if? For example: IF (A ) THEN (B , C:=FALSE) or something like that
@TohidAlizadeh5 жыл бұрын
Yes, it is possible.
@akperera26632 жыл бұрын
Hi Are you doing the ST programming training session online
@TohidAlizadeh2 жыл бұрын
No, I don't.
@victorponce10654 жыл бұрын
Hello, how can the functions be used in CFC?
@kalyanikadkol40065 жыл бұрын
Hello Tohid, Thanks very much for such an informative tutorial! However, in this case, the Full continues to become true when CV=10 although the PV of the counter gets updated in Counter01.PV depending on the selection between A, B and C. What should be done to update the code such that the CV now considers the new PV whenever the conditions are true and not the PV value initialized in the variable declaration? Your inputs are valuable! Many thanks, Kalyani
@TohidAlizadeh5 жыл бұрын
Thanks for your comment. I believe that you should not do anything and the counter should consider the new PV. I will have a second look at it and let you know if this is not the case.
@kalyanikadkol40065 жыл бұрын
Thanks very much for having responded to me! What I meant is if the PV is updated, the CV should consider and turn the counter's output with respect to the new PV, isn't that how it is supposed to work? What happens with the code is that the PV gets updated, but the CV continues to turn the output on for PV = 10. Can you please help me understand how the counter operates? Thanks again for your time!
@IsmailRosli5 жыл бұрын
@@kalyanikadkol4006 Same, encountered the same issue. Do you happen to find out how to fix it?
@KhairulBasarAbuAbdullah Жыл бұрын
@@TohidAlizadeh Corrected: Counter01(CU:=LS1,Reset:=Reset,PV:=CounterPV); IF A THEN CounterPV:=5; ELSIF B THEN CounterPV:=3; ELSIF C THEN CounterPV:=2; END_IF Full:=Counter01.Q;
@elhassanemargoum79555 жыл бұрын
Hi Tohid Thank you for this videos I want to know how to program an if statement with multi conditions (if a:=1 & b:=1 then c:=1 else ...)
@TohidAlizadeh5 жыл бұрын
Hi there, I think you can use parentheses to do so: IF (a = 1 AND b = 1) THEN c := 1; ELSIF d=1 THEN . . .