Sign in to follow this  
Followers 0
vanquangtk

Detecting Register Duplication in PLC Programming with GX Works2

13 posts in this topic

 I have a program in GX Works2, and I need to check if any registers are duplicated in double-word instructions. For example, in commands like DMUL D1 D3 D5 and ADD K1 D4 D4, changing the value of D4 could potentially affect D5. Is there a way to detect all such issues?

Share this post


Link to post
Share on other sites

use the cross refrence 

Share this post


Link to post
Share on other sites

Better to use 'device list.

All registers used including double registers will be marked with an asterisk.

Blank ones are free to use.

1 person likes this

Share this post


Link to post
Share on other sites

Ctrl+D will show device list, type in the word you want to start with and done...

Share this post


Link to post
Share on other sites

Thanks, guys, but I don't intend to use new words. My intention is to check the current program for any mistakes involving duplicated words.

I need to find all instances of double words in use. However, the device list only shows that words have been used, without indicating whether they are used as single or double words

Share this post


Link to post
Share on other sites

In the PLC memory registers are not combined in any way if they used as double word, they are in memory as single registers. So since they are not defined as double word, you cannot filter them that way. The only way I see is still use device list and see registers used same amount of times and if you see the difference you can search for that one to verify.

1 person likes this

Share this post


Link to post
Share on other sites
On 10/31/2024 at 10:32 AM, vanquangtk said:

 I have a program in GX Works2, and I need to check if any registers are duplicated in double-word instructions. For example, in commands like DMUL D1 D3 D5 and ADD K1 D4 D4, changing the value of D4 could potentially affect D5. Is there a way to detect all such issues?

ADD K1 D4 D4 can NEVER affect D5.

Cross reference should show you all of the places an address was used, including 32-bit and 64-bit usage.

1 person likes this

Share this post


Link to post
Share on other sites
On 10/31/2024 at 10:32 AM, vanquangtk said:

 I have a program in GX Works2, and I need to check if any registers are duplicated in double-word instructions. For example, in commands like DMUL D1 D3 D5 and ADD K1 D4 D4, changing the value of D4 could potentially affect D5. Is there a way to detect all such issues?

Cross reference should show you all of the places an address was used, including 32-bit and 64-bit usage.

Share this post


Link to post
Share on other sites
1 hour ago, Crossbow said:

Cross reference should show you all of the places an address was used, including 32-bit and 64-bit usage.

It only shows the locations and all details of an address, which is inconvenient because there are so many addresses to check. What I want to know from an address is simply whether it’s used as 32-bit or 16-bit throughout the program.

Share this post


Link to post
Share on other sites

Does Device List do that?  It should show all addresses and if they were used input or output.  It's in the Find/Replace menu next to Cross Reference.

1 person likes this

Share this post


Link to post
Share on other sites

Double word D5 from your example takes D5 and D6. D4 would not affect double word D5 in any way. If you pull your device list about of times D5 and D6 used should be the same. If it is off than single word used somewhere else. But unfortunately you cannot filter device list just to show you what you want. You can copy device list to excel and filter in excel... 

Share this post


Link to post
Share on other sites
On 11/7/2024 at 3:34 AM, Crossbow said:

Does Device List do that?  It should show all addresses and if they were used input or output.  It's in the Find/Replace menu next to Cross Reference.

Yes, it show all addresses but don't help much in my case.

Share this post


Link to post
Share on other sites
23 hours ago, SergeyBorchshev said:

Double word D5 from your example takes D5 and D6. D4 would not affect double word D5 in any way. If you pull your device list about of times D5 and D6 used should be the same. If it is off than single word used somewhere else. But unfortunately you cannot filter device list just to show you what you want. You can copy device list to excel and filter in excel... 

Sorry for my mistake; I should have typed D6 instead of D4. In fact, I listed all instructions that use double words to create a list of devices, then checked all instructions related to those devices.

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