Hello everyone, I need assistance with achieving this task in SIMATIC Manager. I have a setup with two photo eye sensors (P_1, P_2). When the part is placed horizontally and both sensors detect it, nothing happens. When the part is turned 90 degrees and neither sensor detects it, nothing happens. However, if one sensor does not detect the part and the other sensor remains on (even when the part is turned 90 degrees), I need the output coil to be activated. Essentially, if P1 is off and after 10ms P2 is still on, or if P2 is off and after 10ms P1 is still on, then the coil should be turned on. I appreciate any assistance with this.
If you're talking about tracking without explicitly mentioning it in your post, do you mean tracking it for future use or is it used immediately, like when one sensor detects something and the other doesn't? If I'm understanding your post correctly, here is the simplest explanation.
Apologies for the incorrect wording; tracking did not begin initially. Further along the production line, there is a station where a component needs to rotate 90 degrees. This rotating table is equipped with two sensors that must both deactivate during the rotation process.
When working with Simatic Manager, you are essentially utilizing STEP7 V5.x, also known as "STEP7 classic." In simpler terms, if P1 is deactivated and P2 remains activated after 10ms, or if P2 is deactivated and P1 remains activated after 10ms, the Coil should be activated using IEC timers. This code accurately reflects the instructions for activating the coil without any additional comments on tracking.
In both mine and Jesper's designs, it is crucial to incorporate the rotation feature in the logic to activate the check only when the component is in motion.
When P1 is OFF and P2 is still ON after 10ms, there may be ambiguity in the language used. @parky's solution interprets "after 10ms ... still" as the duration for which both P1 has been continuously OFF and P2 has been continuously ON, and vice versa. While there is an edge case where this code may not work, it is likely safe to disregard it. On the other hand, @JesperMP's solution interprets "after 10ms ... still" as the duration for which P1 has been continuously OFF during any single moment (scan cycle) when P2 is ON. Consider the state indicated by "after" and the state(s) indicated by "still." It may be helpful to visualize the scenario with a drawing. Additionally, the 10ms interval is relatively short; what is the typical scan cycle interval over which this logic will be assessed, and what is the longest interval?
You might want to introduce some timers into your program logic for the desired 10ms delay. Essentially, you could set up timer operations that are initiated when one eye no longer detects the part. If the other eye sensor is still detecting the part after the elapsed time (10ms), then you can have your program activate the output coil. Constants will also be required for the timers. This proved effective in my similar scenario. I hope that this approach could be a possible solution for you.
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: 1. How can I set up Photo Eye Sensors for Part Tracking in SIMATIC Manager? - To set up Photo Eye Sensors for Part Tracking in SIMATIC Manager, you can create a logic that activates an output coil when one sensor is off and the other sensor remains on after a specified time delay.
Answer: - If both sensors detect the part when it is placed horizontally, you can set up the logic to ensure that no action is taken in this scenario.
Answer: - You can achieve this by implementing a logic that checks the status of both sensors and activates the output coil if one sensor is off and the other sensor remains on after a specified delay, regardless of the part's orientation.
Answer: - The 10ms delay mentioned in the setup allows for a brief period to elapse after one sensor is off while the other sensor remains on before activating the output coil, ensuring the stability and reliability of the system.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.