GX works 3 FB calling.

Puntigamer

Member
Join Date
Jan 2020
Location
Graz
Posts
3
Hello

I'm new to PLC programming and I'm programing in ST. Programming envirement is GX works 3. I can't figure out how to jump to subprogram or subroutine, or how to call a Function block, create them. However someone wants to call it. Can someone send me a example program on hwo to do it or just give me a tip.

Thanks in advance
 
First of all, create an FB and give it a name, when you create it, should put two tabs on the tab list at top of editor, i.e. FbPou[fb]Function/FB label setting.
In here you put the in, out, in/out etc. variables i.e.
MyVar_1, DataType Int, Var_Input
MyVar_2, DataType Int, Var_Input
MyVar_3, DataType Int, Var_Output
You can use Var In_out (note this is used as a parameter where values can be changed outside of function and inside for example where you need to use it as an input and output). Then write your code in the body, and register it, you will notice it will appear in the element section in the right hand side under function block so you can drop it in the editor in a program block. Note: there are two ways of using fb's one is call it multiple times and give each one an instance name i.e. when compiled each call to the function will create separate code, or you can give it one instance name and call it many times, this way it only produces the code once for the function and jumps to it. Attached, is a real simple dirty way of how it works.
 

Similar Topics

Hey everyone and anyone that can lend a helping hand. I have a project that I am being asked to add some animations of Solidworks or "3D" models...
Replies
9
Views
296
PLC: Fx5u CPU As Per manual High Speed Input Module can add from Navigation window  [Parameter]  [Module Information]  Right-click  [Add New...
Replies
1
Views
87
Hi all, anyone does have experience in Gx Works 2? Currently I having an issue which is when certain device added from MELSOFT Navigator and...
Replies
1
Views
107
Hi Guys, I want to connect my 1769-L36ERM to a different network domain, is it possible to do it using only the dual ports in the Controller? Or...
Replies
3
Views
202
I'm totally new to PLC's and I've just purchased an FX3U-14MR Mitsubishi Clone. I believe I need to use GX Works Software to program it but I've...
Replies
1
Views
115
Back
Top Bottom