How to set up Photo Eye Sensors for Part Tracking in SIMATIC Manager

Question:

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.

Top Replies

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.

Hello there, a few methods come to mind for achieving this in SIMATIC Manager. One solution could be to use a Timer Block, like S5T#10ms after the detection of both sensors. Once the timer hits the 10 ms mark, an AND logic gate can be used to check that one of the sensors is off and the other is on. If this condition is met, you can go ahead and activate your output coil. Keep in mind that dealing with such fast response times can be tricky, so make sure the rest of your logic is optimized for this kind of process. It might take some tuning but I think this will push you in the right direction.

Hey there! Sounds like an interesting setup you're configuring. For this, you could use a simple two rung ladder logic setup. The first rung could be a simple OR circuit where the contacts of P_1 or P_2 would open if either photodiode turns off. This might activate the coil instantaneously when one photodiode is blocked. For the 10ms delay, you would need a TON (Timer ON Delay) instruction. You would examine if the photodiodes are blocked and if they are, then the coil would have a delay of 10ms before it gets activated. Hope that points you in the right direction!

It sounds like a neat challenge! You can achieve this by using a combination of timers and logical conditions in your program. Try using a TON timer to check the status of each sensor; once one goes off, the timer can run for 10ms, and if the other sensor is still on after that duration, you can activate the output coil. Just make sure to structure your logic so that both scenarios are covered—essentially monitoring the sensors in tandem to ensure your output only activates under the conditions you described. Good luck, and feel free to reach out if you hit any snags!

More Replies →

Streamline Your Asset Management
See How Oxmaint Works!!

✅   Work Order Management

✅   Asset Tracking

✅   Preventive Maintenance

✅   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

To add a comment, please sign in or register if you haven't already..   

Frequently Asked Questions (FAQ)

FAQ: FAQs:

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.

FAQ: 2. What should I do if both sensors detect the part when it is placed horizontally?

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.

FAQ: 3. How can I configure the system to activate the output coil when one sensor does not detect the part and the other sensor remains on, even if the part is turned 90 degrees?

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.

FAQ: 4. What is the significance of the 10ms delay mentioned in the setup?

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.

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  â†’