Civet

Simple Project vs Structured Project

3 posts in this topic

Hi all,

What the difference between a Simple Project and a Structured Project?

You can use Ladder, ST and SFC in either project type on a Q Series, but only in a structured project can you use Structured Ladder / FBD.

In a structured project you can create functions.

Is there anything else?

Thanks,

Share this post


Link to post
Share on other sites

GX Works2 Version 1.577B

Series: QCPU (Q mode)

Project Type: Simple Project

Language: Ladder;

                    SFC

Use Label checked ST option appear.

Structured Project:

Use label os checked by default

languages;

Ladder;

ST;

SFC;

structured Ladder/FBD

IL

Not Specify.

this is what i have here.

 

Share this post


Link to post
Share on other sites

A Structured project is the best way to go, It allows you to create functions & blocks you can call multiple times & saves you programming the same code many times.

It actually still creates the equivalent of a single block of ladder, however by using the same instance of a function block it actually passes the values for input parameters to temporary memories (these are actually M & D registers in the higher limits (so don't use them as set in the compiler settings) jumps over the end instruction  runs the code, passes any output variables to temporary memories & jumps back to the main program where the output memory is updated.

For example

A function block with 2 input parameters & one output parameter in code goes:

Load D200 Transfer D4000 (temporary memory)

Load D201 transfer D4001

Call P2000  (pointer to function)

L D4002 T  D202 (move result to D202)

ju P400  (Pointer)

rest of code

.......

FEnd  (End of ladder)

P2000:

L D4000

L D4001

Multiply

Transfer D 4002

Return

End

So it's really like one block of code but as the FEND instruction is the end of what would be the ladder scan, function blocks are code in an area that is not normally scanned but can be jumped to & returned many times.

It allocates the temporary memory addresses and pointers at compile time .

Very useful if you have say many motors or valves with auto/manual & status information in a program, you write the function once then call it for as many you require but use the same instance name i.e. Motor_Control., if you use a different instance it creates a subroutine for every one & increases amount of memory used.

 

 

 

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