Function Blocks Gx Works 2

I have recently been teaching myself Function Block programming.

I have a project on the go where they will be ideal, as there is a lot of repeat programming with different variables.

After trial and error, I have written a few that work perfectly and as expected.

But, I would like these FB's available to me in future projects. I have read up on how to save them and even add them to a library but cannot do it.



I'm sure I have missed something but I have tried forever and I can't add them to a library or put them on my PC for later use with other projects.

What's the procedure?
 
The best way is to create a project of the type of PLC, import the FB's you have (is dependant on the plc type generally).
Then create a new user lib
Drag the FB's into the lib
& save the lib it saves it as a sul file (note: do not have any spaces or reserved chars in the filename
you can then install the library into a project.
 
Note: these become write protected when installed in a project so I would maintain the originals, alternatively, just have a project with those in & open up two instances of GXW & drag any you want accross if you need others to have access.
 
Nice one Parky. I still couldnt drag any FB's into the library but I managed to save them and install them into fresh programs (which is what I wanted)
The hours I spent...........lol
 
Yes My mistake instead of drag you just copy & paste you will notice that then in the element selection on the right your FB's will appear in the FB list
1748504635837.png
 
Ah I just re-read your post, what I was refering to was get all your FB's into one program, create a library in that program, copy & paste them into the library, compile then save the library, then when you create a new project you install the library ready for use, note though when you copy & paste into the library it will try to save it as a name with a number but you can re-name it as you want so it does not conflict with the original FB name.
 

Similar Topics

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...
9
Replies
4,856
Views
I have the current program created as a simple project with lots of ladder programming. I guess you cannot create FB's in a simple project. Is...
1
Replies
3,274
Views
Hi, I'm having a play with Siemens LOGO using their free download. I'm just playing with something as I'm trying to learn function blocks. Just...
58
Replies
1,219
Views
How to find out which SFB is compatible with which Simens CPU Model? Is there any manual for this
4
Replies
1,253
Views
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...
13
Replies
1,684
Views
Top