6/3/2022 12:37 AM | |
Joined: 9/21/2006 Last visit: 5/25/2023 Posts: 247 Rating: (65) |
The issues you will run up against include:
To detect a program code change, you can use the GetChecksum: Read out checksum instruction to monitor the current PLC code checksum and detect changes. An issue here is knowing what the previous checksum was when the memory areas are part of the program, so your "previous checksum" value may change due to a downloaded program change. One way around this would be to store the previous checksum in a file on the PLC's memory card using the File handling instructions. Warning: the SD card can support a large but finite number of writes, so don't try writing to the file every scan. To store the count, you run into the problem that the normal memory areas can be changed as part of a program download. Again, the solution is to store them in an area that the program does not write to, such as the memory card. You could use file handling instructions (see above for link) to store the counter. |
Follow us on