how to assign a data block to function block

Looking at his last posts it's a S7-300. So for a S7-300:

when you make the call for the FB in LAD or FBD you will see red questionmarks above the FB. Write the number of a not existing DB, example DB1, instead of the '??'.

Simatic Manager will generate the DB for you.
 
Hello
Thanks both of you I try with S7 300 from siemens I make data block but the dont know how to assign it to FB.I try many option,open it from FB1
but not working as they show in manual
plzz help me about that
thanks again
usman
 
There are two types of datablocks. an instance DB assigned to a particular FB and a global DB. A global DB you make by yourself and you can use the values anywhere you want.

To make an instance DB, first you make the FB. Add the FB to the Blocks folder. Open the FB. Assign any variables in the declaration portion at the top of the block. These will become the "pins" on the FB when you call it from another block. Close the FB.

Open OB1 or whatever block you want to call the FB from. If you're using ladder logic, insert a network, open the FBs folder in the left window, and drag it onto the network. it will show up with three red ??? on the top. Make you assignments to the input/output pins. Type a new DB number in place of the three red ???. When you hit return it will ask if you wish to create the instance datablock. Tell it yes and the datablock will be created.
 

Similar Topics

I have 32 masters in a linear topology network chain. I would prefer to use AL1xxx series from IFM. They do support device level ring if that...
Replies
15
Views
944
On my HMI-1200, I'm trying to assign the image of a floppy disk ("save" icon) to a function key. I couldn't find one in the default drop-down...
Replies
5
Views
538
Hi everybody. I got some problems about how to perform this task Now, I got an FB where I have this code snippet that looks like: L P##DBD_134...
Replies
5
Views
1,086
Good Morning, I'm not sure if this is a stupid question, but I've been working with FTView ME for quite some time now and I can't solve this...
Replies
9
Views
1,459
Hi I have a few Movimot motors on profinet, where i need to change the profinet name on the motor. I have been true this before, where i deleted...
Replies
7
Views
2,342
Back
Top Bottom