
sparkie (Customer) asked a question.
Suggestion for Productivity Clock Set Initiate
So I just used the PLC clock set initiate function. For those not familiar with it, you set three system tags to their respective 24h clock values, then set the Initiate Clock Set bit, the PLC will then reset the clock and unset the Initiate Clock Set bit. The thing is, the PLC should be writing something like 0 or -1 to these values (as you can't have a negative time) to indicate that the process is done.
I'm not sure if there was a reason to hold those values, but it just seems like something you would want the clock set routine to take care of.
It seems like insetting the bit is a sufficient indicator of completion. But if you wish you can use the falling edge of the bit to set these locations to your chosen value.
Thanks for the reply. Hope you have been enjoying your retirement :).
I did try using a falling edge bit. I had the same thought, but it seems like the processor will first set the Initiate Time Set bit to 0, and then actually copy the values over to the processor clock. This creates a race condition where you can end up with part or all of the values set to whatever you choose. Additionally, there seems to be a delay timer where the clock cannot be reset again, which is also fine, but the Initiate Time Set bit should probably be ignored and automatically set to 0 until the clock set delay timer is done and it is possible to reset the clock again.