TheWaterboy
Lifetime Supporting Member + Moderator
I have several PLC's all running identical parts of a process in parallel. As part of this process when each one is ready they each need to tell a central common PLC to perform a cleaning process that is common to all of them.
Additionally I need that single common PLC to be able to take commands from only one of these other PLC's at a time, holding off the others until it completes its common task and then notify the others that it is available again.
There is no way to know in advance which PLC will want control ahead of time so a command needs to be sent to the common PLC asking for its availability and then if it is available, lock out the others.
At this time a token passing technique is used but if anything goes wrong in the process, or it gets manually cancelled, or the planets align just right, the token gets lost and both that common PLC and the one that called it get out of sequence and end up offline.
I hope this is clear, I have a couple untested ideas in my head how to make this work but if anyone has done this before I would love to see how you did it.
I intend to use Produced and Consumed tags to allow the multiple PLC's to monitor the common PLC status and availability and a MSG from the multiple PLC's to the common one to ask for its control when needed.
A RND number included in each request being sent from each PLC and echoed in the P/C tags would insure that the PLC that sent the same number actually has control in case of a comm or logic race condition occurs.
All sounds good in my head - sure would like some feedback.
Additionally I need that single common PLC to be able to take commands from only one of these other PLC's at a time, holding off the others until it completes its common task and then notify the others that it is available again.
There is no way to know in advance which PLC will want control ahead of time so a command needs to be sent to the common PLC asking for its availability and then if it is available, lock out the others.
At this time a token passing technique is used but if anything goes wrong in the process, or it gets manually cancelled, or the planets align just right, the token gets lost and both that common PLC and the one that called it get out of sequence and end up offline.
I hope this is clear, I have a couple untested ideas in my head how to make this work but if anyone has done this before I would love to see how you did it.
I intend to use Produced and Consumed tags to allow the multiple PLC's to monitor the common PLC status and availability and a MSG from the multiple PLC's to the common one to ask for its control when needed.
A RND number included in each request being sent from each PLC and echoed in the P/C tags would insure that the PLC that sent the same number actually has control in case of a comm or logic race condition occurs.
All sounds good in my head - sure would like some feedback.