Step7 newbie

Tsørensen

Member
Join Date
May 2004
Posts
25
I have some program code in an FB block I have to use several times (20 times), the code’s input/output comes from 20 identical db block (whit different values in the variables).

How do I do this easiest?
 
Just a sugestion

One way to do this may to put your data into an array. When you go to acces your FB use pointers to point to the Data in the array.
 
Hi Tsørensen (",)

You can use your FB as "Multi-instance", if you place your FB's in the Declaration as STAT, then you can pick the FB's in the Overview folder under "Multiple instances"
In this way you will only have 1 large DB for the FB where put all your other FB's.
 
Steffen,

that's exactly what's explained in the thread Paul has pointed to. It's THE way to deal with multiple calls to FB's.

Kind regards,
 

Similar Topics

Hi everyone, I am new here in this Siemens world.Any Ebook, Tutorial or guide to learn siemens step7 programming TIA portal, WinCC?
Replies
6
Views
1,553
Hi all, 1. It seems from my reading that timer addresses in Step7 have to be just these certain addresses in order to get the resolution...
Replies
1
Views
3,988
This is the first time I am working with Simatic Manager Step7 as I started my siemens journey with TIA which is pretty easy and do a lot of stuff...
Replies
3
Views
130
When you download a DB, the values get overwritten by what is in the "actual" column in offline DB. Does this happen at the start of the PLC...
Replies
6
Views
141
Hello Inside a FB, I´m trying to transfer a string from a DB to a IN_OUT var that was define as a UDT. The problem is that i can´t determine the...
Replies
4
Views
127
Back
Top Bottom