Sign in to follow this  
Followers 0
Thierry

The way to program using GX Works2

5 posts in this topic

Hi all, I am testing GX Works 2 for the moment and it sure has lots of extras compared to GX Developer. But I am wondering how others use GX Works. Since GX Works has structures and function blocks it looks nice to use them as following; - Assign a struct for a motor - In the struct assign variables for the feedback of the contactor (input), run request (input), contactor (output), safety relay ok (input), Fault (output) and so on. Then in the program (lets say a "normal" ladder program) I can create an instance of that struct, lets say "Belt1". In the program I can then call a functionblock and then connect the in- and outputs to that funtionblock using the structure. For example Belt1.RunRequest and so on. The function block will then handle all the functionality. If RunRequest is on and the feedback doesn't come on Belt1.Fault will come on. And so on, you'll get the idea... But how far do you normally go with this? Do you create structures and function blocks for a standard motor, a motor with inverter, a valve? Any advice is welcome. Thanks

Share this post


Link to post
Share on other sites
Yes, you are right absolutely.

Share this post


Link to post
Share on other sites
Create function blocks for things you do over and over. Then add them to the library, making it easy to reuse them on other projects. I created a function block in structured text to scale analog signals, and I use it over and over in my projects. I can also create it as a function, which can save program memory in the long run. If the function only needs one output, create it as a function, then you don't need instance names and it saves memory in the PLC.

Share this post


Link to post
Share on other sites
Crossbow, Are you willing to send me a sample project? I am really struggeling to find a good way to implement a program using this "new" technology. Just asking... Happy weekend

Share this post


Link to post
Share on other sites
What's the confusion? It's a way to write a section of code into a self-contained block. You can also protect this block so others cannot see the code inside. Instead of writing the code to read an analog input module, write it as a function block, and then use the function block for each analog card. Mitsubishi UK has a whole ton of function blocks for various components written for GX IEC Developer. I know GX2 does not implement all of the functions involved, but I have reviewed the blocks for the Q analog modules, and they import nicely into GX2. Download some of MEUK's function blocks and have a look.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0