Function Blocks and Connections(siemens)

DeepThought

Member
Join Date
Mar 2008
Location
Norwich
Posts
52
Morning all,

I have created some function blocks, however while i can connect ladder logic symbols ie n/c to the inputs, the output side of the block only allows me to connect an address to it is it possible to connect for example a "set coil to the output" directly or must i add a set coil on a seperate rung and use a second address.

Regards

Deepthought
 
Not sure I understand your question fully but you can have inputs directly set outputs (if that's what you're asking) you do not need to set a marker bit first and then use the marker to set the output.
 
Also not sure what you mean to say.
Maybe this helps in understanding:
The inputs and outputs that are part of the "proces image" are just like any other addresses used elsewhere in the program, like Merkers and DBs. You can use an output as a condition for another rung for example. And you can manipulate inputs by setting and resetting for example.
The difference to the Merkers and DBs, is that the CPU automatically reads the physical inputs to the input addresses in the proces image before executing the code logic from OB1, and the CPU automatically writes the output addresses in the proces image to the physical outputs after executing the code logic from OB1.
 
Thanks for the reply i will explain it better if i can,
the function block is created and i have placed the FB in an FC and as its a multi-instance and i have assigned a DB to it.
I now have to make all the connections on the FB placed in the FC.
On the input side i can connect the logic to either by a direct address for example I0.0 or by using the graphical symbols(N/O defaults to showing the address only "--[ ]--" ) or N/C will shown graphically as ( --[/]--).However when i try to connect a coil to the out side of the block eg a --(s) it wont allow it and allows only a direct address eg Q0.0, question is can i add a set coil to it directly or must i use a flag eg M0.0 and then use M0.0 to SET Q0.0 ---(s).
 
Last edited:
You are using the term "multi instance" but it is probably not what you are doing.
You cannot make an FB embedded as a multi instance in an FC. FB embedded in an FB yes. Regular FB calls with individual IDBs for each FB can be placed in an FC, which is probably what you are doing.

Regarding the coil --(S):
Make the --(S) inside the embedded FB.
 
JesperMP
The FB IS an instance block thats been created with a DB associated with it.
I have called the FB(instance block within an FC) so now i have my FB shown as a "BOX" with the input and output connections, due to other reasons I cannot have the set inside the FB all i need to know is there a way that i can connect directly to the output connection of the block "BOX" using a set coil or must it be done on a seperate rung
 
Yes, but just for correctness, it is not "multiple instance".

Anyway, you can not put the (S) immediately on the output pin on the FB.
But you do not have to use an intermediary address. All addresses declared for the FB are available outside the FB, except for TEMPs.
So just leave the output pin empty.
And use the address declared for the output pin in a new rung where you set the address you want to have set.
Try it.

edit:
in STL it could look like this for the runga after the FB call.

A "motor_23".out_status
S Q3.4
 
Last edited:
Hi Jesper

Thanks for the answer i will set the coil elswhere just wondered if it was possible, not sure why you think this FB is NOT multi instance I have declared it as multi instance and use it more than once ( 5 TIMES ) in the FC and set a DB for each call of use.
Thanks again
 
That is not multiple instance.
Not sure what the manual setting of "multiple instance" does to a DB.

Briefly described, multiple instance is when one or more FBs are added to the declaration part of another FB. So when the upper level FB is called, only one common IDB is generated for the FB and all the embedded FBs inside.
 

Similar Topics

Good morning crew! Ok my logic works but I am missing something. When the start button is pushed it should like the red light for 4sec then shut...
Replies
13
Views
427
Hallo, I have Tia Portal V16 and I'm upgrading an older machine. That machine has a component running on rs232. The machine has still the old...
Replies
7
Views
960
Hi Folks I have made a function block that has the EN input enabled. (FBD language) In want to run some code at the top of the function block as...
Replies
9
Views
1,740
Hello. For a FactoryTalk View SE application, I recently upsized the PC monitor to a 46 inch. Now after changing the resolution to make...
Replies
4
Views
1,170
Hi, I'm getting a bunch of these warnings when I build the program in Connected Components Workbench. The program is legacy code. The program...
Replies
5
Views
2,390
Back
Top Bottom