TIA Portal v18: Adding a rung - should be easy right?

... which will NEVER work the way it is coded with the set/reset.

And when you talk about ladder, say the outputs either assign ("set") the value of a bit (discrete tag) to 1 (not TRUE), or assign ("reset") the value of a bit to 0 (not FALSE); rungs states are either TRUE or FALSE. It may seem to be a semantic point, I know, but trust me, you will thank me later when you are the hero who diagnoses a subtle problem someday cf. here.

Uncle drbitboy

Cheers for this, drb. I liked the video and have subscribed to the channel. Good clear explanations.
 
Last edited:
To be honest, there is no need for the latch (S/R) the code you posted assumes that the enable (visibility) of the button bit will be true until one or both those or all three of those bits driving the set are true until they go false just use thos e bits onto an out instruction I assume you reset the enable bit or the gate sensor goes false after the button is pressed & the data is stored.
you need to get your head round the flow of the logic it is a common mistake learners make by set/reset loads of bits in a program where they are not required. It makes the program messy, & difficult to find problems.
It seems obvious that the button only needs to be enabled while those bits are on, as your reset is essentially just the not contacts then there is no need for the set/reset as the button enable bit will be true while the logic driving it is true.
As UI have said before either think about the logic & a better way is to use a variable as a sequence variable. i.e. rather than set/reset bits as the sequence use the var, benefits are one variable that tells you the step (i.e. step 1, Step 2.... & so on). It is also useful for driving text lists for the HMI so at a particular step number it displays a text message for the operator. for example:
Step 10 (Var = 10) displays "Press Save Button to Save the value"

No SR.png
 
To be honest, there is no need for the latch (S/R) the code you posted assumes that the enable (visibility) of the button bit will be true until one or both those or all three of those bits driving the set are true until they go false just use thos e bits onto an out instruction I assume you reset the enable bit or the gate sensor goes false after the button is pressed & the data is stored.
you need to get your head round the flow of the logic it is a common mistake learners make by set/reset loads of bits in a program where they are not required. It makes the program messy, & difficult to find problems.
It seems obvious that the button only needs to be enabled while those bits are on, as your reset is essentially just the not contacts then there is no need for the set/reset as the button enable bit will be true while the logic driving it is true.
As UI have said before either think about the logic & a better way is to use a variable as a sequence variable. i.e. rather than set/reset bits as the sequence use the var, benefits are one variable that tells you the step (i.e. step 1, Step 2.... & so on). It is also useful for driving text lists for the HMI so at a particular step number it displays a text message for the operator. for example:
Step 10 (Var = 10) displays "Press Save Button to Save the value"

Brilliant - another beer incoming...🍺
 
I don't suggest you change your steps on this one as you have already spent time on it but perhaps next time think about using a seq. var rather than setting & reseting bits. there will be times when you need them though
 

Similar Topics

hello every one. i'm new to tiaportal, i have created new project and HMI screen the program works fine with PLC-sim, but when i try to cntrol the...
Replies
9
Views
414
My PLC (S7-1200) and HMI (KTP-1200 Basic) has been delivered on-site to the customer. To be able to do "off-line" updates to the code, I am using...
Replies
4
Views
223
hi everyone. i hope you guys are doing great. i am trying to built communication between aveva intouch hmi 2023 and tia portal v18. i dont have...
Replies
1
Views
567
Hi, My PLC hardware has been delivered to customer site - many thanks for the invaluable help on this forum! I was looking into see if it's...
Replies
12
Views
2,511
Tia portal v18 issue,online icon greyed out but plc comms must be established as.blocks showing and no offline copy on laptop.
Replies
7
Views
1,105
Back
Top Bottom