Jump to content

Detecting Register Duplication in PLC Programming with GX Works2


Recommended Posts

Posted

 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?

Posted

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

Posted

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.

  • Like 1
Posted
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.

  • Like 1
Posted
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.

Posted
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.

Posted

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... 

Posted
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.

Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...