PLC SIMATIC S7 1200 / KOP/SCL question

jimix

Member
Join Date
Apr 2024
Location
Barcelona
Posts
2
HI i would like to know how to get a variable that will store the amount of times a program has been executed. The issue is I have 3 DBs for 1 FB and i need a total amount of times it was executed regardless of which DB is selected
 
You could directly reference a global tag or a tag in a global DB inside the FB. This is the simplest solution. Generally, this is a practice to be avoided, but makes sense here.
You could also pass a tag as an INOUT to all three instances of the FB. Technically more compliant with best practices, but it would be easier to make a mistake if you add more instances later.
 
You could directly reference a global tag or a tag in a global DB inside the FB. This is the simplest solution. Generally, this is a practice to be avoided, but makes sense here.
You could also pass a tag as an INOUT to all three instances of the FB. Technically more compliant with best practices, but it would be easier to make a mistake if you add more instances later.
Hi thanks for the quick reply, im intrigued how the INOUT tag would work, I just started making my way into the PLC world so please excuse my novice point of view.

Sorry for the late reply but as I was typing a reply I was experimenting with the INOUT tag and got it to work. Thank you very much!
 

Similar Topics

I have new Siemens PLC / Simatic S7-1200 Need software download to use the PLC Please advise Thanks Wally
Replies
8
Views
2,255
I have new Siemens PLC / Simatic S7-1200 Need software download to use the PLC Please advise Thanks Wally
Replies
1
Views
645
Hi everyone, I have Siemens S7-1200 1214C AC/DC/Rly CPU with CM 1241 Rs232 module and Enfora GSM 1208. Help me how to send sms using PLC. Thanks.
Replies
2
Views
2,025
I have been tasked with a new controls project involving an S7-1215C PLC and Movicon 11.4 HMI software running on a PC. The two devices will be...
Replies
8
Views
5,485
Hello Dear, I am using a PLC SIMATIC S5 115U CPU 943B my problem that there is no output on CPU (943 B) ⚫️RUN STOP 🔘RUN 🔘STOP 🔘QVZ 🔘ZYK...
Replies
3
Views
2,468
Back
Top Bottom