newbee

GX IEC Developer to GXWorks2

11 posts in this topic

Hi all,

I am a newbee with GX works2 and I got stuck in the change of developer software. Hope anyone can help me to find a easy way to solve this.

I got a program in GX IEC Developer 7.04 where I have Latch(1) on all D register I am using. PARAMETER - PLC DEVICE - Data register is 0-13312 and SystemVariable are from 3000-13311.

I have not find a way in GXWorks 2 to allow the same. I figure out I need to change variable type in FB to VAR_RETAIN but how do I solve this for Global variable? Do I have do give all the variable fix addresses?

 

Share this post


Link to post
Share on other sites

Are you looking for the place where you assign Latch areas, or where you can assign label areas?

Share this post


Link to post
Share on other sites
On 24.3.2017 at 9:58 AM, kaare_t said:

Are you looking for the place where you assign Latch areas, or where you can assign label areas?

Hi,

I want the unaddressed variable used by the compiler to be a part of latch1. If I don't misunderstand GX Works2 dont allows me to do that? I GX IEC Developer I got the warning as attached.

ice_screenshot_20170504-150723.png

Share this post


Link to post
Share on other sites

Why do you want to latch your label area? That's very, very dangerous!!! You never know if the labelname is assigned to the same variable address at a later time, so that's not allowed (for a reason)!

Share this post


Link to post
Share on other sites
On 24.3.2017 at 9:58 AM, kaare_t said:

Are you looking for the place where you assign Latch areas, or where you can assign label areas?

Hi kaare_t,

Thanks for your reply.

The way latch is used in our system is restoring "tracking info/data" after a powerloss. The system keep track on many element at the same time. Without latch1 all "tracking info/data" is gone after powerloss  and we need to empty the whole system and start all over again. 

After powerloss today we the system continue from before powerloss. 

As far as I can see in GX Works2 I have to specify the addresses to area assigned in latch1 area for the same functionality.  

"Tracking info/data" is variable used by the program each scan. 

Suggestion is welcome :-)

Share this post


Link to post
Share on other sites

I have two A2USHCPU-S1 PLC and I need to copy the program one to another. If you could help me, it's a grate pleasure. If it is possible, I need to buy another A2USHCPU-S1 PLC  and copy the program. 

Share this post


Link to post
Share on other sites

@newbee: Well, the reason you should NEVER latch your "Assigned Label Area" is because each time you compile your project, there is a risk that the automatic assigned variables will change their addresses (that's the whole point of having automatically assigned labels)!!! In other words, the way you describe your process will never work if you change, then recompile your project!! Here's an example:

First compile: Machinevariable1 is assigned to D1000 (automatically)
Second compile: Machinevariable1 is assigned to D1001 (automatically)

The reason this is happening is because the compiler starts at the first available automatically assigned address, and assigns it to the first variable, if something changes before this variable, it will be assigned the next available variable...

I would call this a bug in GX IEC Developer, since you NEVER EVER want to latch your automatically assigned variables!!

Are you 100% sure that the variables you are talking about are automatically assigned variables, or could it be that they are manually assigned? It sounds very very strange that these "tracking info/data" are automatically assigned - this would, as you describe yourself, break any kind of tracking in case of a recompile and/or power loss or CPU reset.

Did you develop this code yourself, or are there other developers/companies involved?

Share this post


Link to post
Share on other sites

@Udaya: You should start a new topic instead of continuing a completely different topic and subject. Start a new topic, and ask for the same. Also include what software you already have in your new topic.

Share this post


Link to post
Share on other sites
On 5/24/2017 at 2:14 PM, kaare_t said:

@newbee: Well, the reason you should NEVER latch your "Assigned Label Area" is because each time you compile your project, there is a risk that the automatic assigned variables will change their addresses (that's the whole point of having automatically assigned labels)!!! In other words, the way you describe your process will never work if you change, then recompile your project!! Here's an example:

First compile: Machinevariable1 is assigned to D1000 (automatically)
Second compile: Machinevariable1 is assigned to D1001 (automatically)

The reason this is happening is because the compiler starts at the first available automatically assigned address, and assigns it to the first variable, if something changes before this variable, it will be assigned the next available variable...

I would call this a bug in GX IEC Developer, since you NEVER EVER want to latch your automatically assigned variables!!

Are you 100% sure that the variables you are talking about are automatically assigned variables, or could it be that they are manually assigned? It sounds very very strange that these "tracking info/data" are automatically assigned - this would, as you describe yourself, break any kind of tracking in case of a recompile and/or power loss or CPU reset.

Did you develop this code yourself, or are there other developers/companies involved?

 

Share this post


Link to post
Share on other sites

It's very sad to say, the developer was unknown person and NAMBA Co had been hired him and setup the system. Unfortunately NAMBA Co. closed and I didn't find any one who worked with them. Latterly system was dormant and nobody touched it. Luckily I had a standby A2USHCPU-S1 PLC and it help me to run the system. I believe that old A2USHCPU-S1 PLC program was corrupted and if I could download the program form the working PLC and reprogram that to old one or upload to a new A2USHCPU-S1 PLC. It will be safe for the future.

I need to learn and do it my self.

Please assist me.      

Share this post


Link to post
Share on other sites

Hi kaare_t

Yes I see the problem now. I am not the one that starting  the development for the system from scratch. The one quit long time a go. I start later. It seems I have to find another way too handle the situation. Out procedure for donwloanding new PLC software is always to rebuild all,  latch /clear and reset CPU with an empty system. This works fine. 

So is it correct to say if I want to keep it like this I have to skip label programming and use var_retain for local variable?

The easiest way I belive have UPS power for the PLC rack. :-)

Thank for your feedback helping me understand the situation. I have to give it a thought to see what to do to got a satisfying solution. :-)

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