vanquangtk Posted October 31, 2024 Report Posted October 31, 2024 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? Quote
Ron_S Posted November 1, 2024 Report Posted November 1, 2024 Better to use 'device list. All registers used including double registers will be marked with an asterisk. Blank ones are free to use. 1 Quote
SergeyBorchshev Posted November 4, 2024 Report Posted November 4, 2024 Ctrl+D will show device list, type in the word you want to start with and done... Quote
vanquangtk Posted November 5, 2024 Author Report Posted November 5, 2024 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 Quote
SergeyBorchshev Posted November 5, 2024 Report Posted November 5, 2024 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 Quote
Crossbow Posted November 7, 2024 Report Posted November 7, 2024 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 Quote
Crossbow Posted November 7, 2024 Report Posted November 7, 2024 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. Quote
vanquangtk Posted November 7, 2024 Author Report Posted November 7, 2024 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. Quote
Crossbow Posted November 7, 2024 Report Posted November 7, 2024 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 Quote
SergeyBorchshev Posted November 8, 2024 Report Posted November 8, 2024 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... Quote
vanquangtk Posted November 9, 2024 Author Report Posted November 9, 2024 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. Quote
vanquangtk Posted November 9, 2024 Author Report Posted November 9, 2024 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. Quote
Recommended Posts
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.