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

Mas01

Member
Join Date
Oct 2020
Location
Leicester, England
Posts
1,109
See picture.

I want to add a rung (magenta) into the existing code.

Can't figure out how to do this. I select a -||- , right? When I drag/drop it, it doesn't go in the right place.

Should be a piece of cake, but I must be doing the wrong thing!

Thanks

adding a rung.png
 
Not familiar with TIA Portal, but I would presume you need to add the branch first. Those icons between the ?? and ADD look like 'start branch' and 'end branch' to me.
 
Place the cursor at the start of the 1st rung.
Then select the 5th icon in the list of basic instructions at the top of the editor window.
That starts a new branch. You can then drag and drop instructions into that branch.

edit: In the right-hand side in the list of instructions you can also see the 'open branch' and 'close branch' instructions.
To close a branch it is easier to just drag the end of the branch to where it must be connected.
 
Last edited:
place the cursor at the start of the 1st rung.
Then select the 5th icon in the list of basic instructions at the top of the editor window.
That starts a new branch. You can then drag and drop instructions into that branch.

Edit: In the right-hand side in the list of instructions you can also see the 'open branch' and 'close branch' instructions.
To close a branch it is easier to just drag the end of the branch to where it must be connected.

Awesome!

yes.png
 
A good point is you have two ladders on one segment (rung) not good practice & in some IDE's will not compile, either put them on seperate rungs or use the SR instruction just select the Icon ?? with box round it then type in SR this will give you the SR latch relay which is the same as seperate S&R & gives you the two pins for the SET/RESET makes more sense
 
Ahh... The is it to be or not to be that is the question marks Is this a seal in contact or is it some other contact, if a seal in DR is right, if not then wrong.
But I bet DR is right, if so I'll treat myself to a beer & toast DR 🍻
 
The only reason I can see to use S/R instructions here depends on how these processors handle different instructions on the first scan. I know that Rockwell PLCs do a "pre-scan" when they transition to "run" and they do different things with latch/unlatch coils vs regular coils. Do the S7 processors do something similar?
 
Dear oh dear I have got a lot to learn....but with the avuncular nature of drbitboy, parky, mk42 et al, I will get there no doubt. Every day's a school day for me.

The part in magenta is another way of setting the output to TRUE. The associated comment needs updating too.
 
Last edited:
Haven't notice it on siemens. Siemens scan code from left to right and then to down.



Only time when I had issues with difference with SR and S and R commands was codesys. It depended of programming language how it would behave (Scan order) and I needed to change programming language to other that blocks output worked as expected.
 
I know that Rockwell PLCs do a "pre-scan" when they transition to "run" and they do different things with latch/unlatch coils vs regular coils. Do the S7 processors do something similar?


I've never heard of anything like that on the S7 side.


Every tag has a defined start value. 0 for M/I/Q and temp tags in an OB/FB/FC (although the I turn to the real status on first scan). Each tag in a DB has a per tag defined start value, which includes the STATs of an FB.


There is also the option for some of the data (depends on CPU type, but 10-30%) to be retentive, which means it remembers the value between power cycles.
 
The part in magenta is another way of setting the output to TRUE ...
... 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
 
Last edited:

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
566
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,507
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,103
Back
Top Bottom