
NNZ (Customer) asked a question.
LS XGB (XEM DP32H2) not retaining values
I am having an issue with counters in the PLC and various settings that are set from the HMI resetting to 0 on a power cycle. I have set the variables to Retain, the "Retain Area Setup" check box to retain values is checked, and reset for the counters are disables with always false bits. Am I missing something? I have tried with both the %M & %W memory types with no luck.
I created a test project with a retained local variable at %WD401 address. My variable keeps its value when i power cycle the XEM CPU. Can you try with the HMI disconnected to make sure the HMI is not over writing the value?
I have already disconnected the HMI and tested it. I had thought to check that just to make sure that it wasn't resetting things for some reason. I have double checked that the resets for the counters only show up in the 1 location and have the always off bit preventing them from being triggered. I may just try clearing the PLC and reloading the program, but had hoped to not have to resort to that.
Try an empty project with just the retained variable with address $WD401. Put a value in it while in monitor mode. Power cycle the CPU to see if the value stays.
Thank you for the input. I did try an empty project and had the same results at first. I then noticed that when inserting the function block that the counter has the "Retain" check box in it. When that check box is checked it appears to work. No where in any of the documentation that I have looked at did it say anything about this.
Thank you for the help.