Guide on determining object direction with 2 sensors using Siemens Logo 8 PLC

Question:

Hello, I am new to working with a Siemens Logo 8 PLC and I am seeking guidance on determining the direction of an object as it completes a full cycle between 2 input sensors. Please refer to the attached images showing the cycle in the upper right corner for loading and unloading. Any assistance on this matter would be greatly appreciated. Best regards, Geert.

Top Replies

I am not able to locate the attachment. Is the distance between the sensors less than the size of the object, or can the object move past one sensor before reaching the next one?

Hello Melkske and Geert, I am unable to see any images attached. It seems similar to a quadrature encoding system, in which detecting the transition from 0 to 1 on the first scan cycle when both sensors are at 1 determines the "downstream" sensor. This assumes the object's length in either direction of motion is greater than the distance between sensors. The key concept here is "transitioned." In PLC programming, timing is crucial; when an event occurs is more crucial than what the event actually is. A PLC program's logic is continually assessed in discrete events known as scan cycles. Consider all potential combinations of input states from the two sensors (referred to as LEFT and RIGHT) in a single scan cycle: - LEFT is 0; RIGHT is 0: No object in front of either sensor - LEFT is 1; RIGHT is 0: Object in front of left sensor but not right sensor - LEFT is 0; RIGHT is 1: Opposite of the previous scenario - LEFT is 1; RIGHT is 1: Object in front of both sensors The information from a single scan cycle alone is insufficient to determine the direction of motion accurately. Within LOGO!Soft, there is an AND-EDGE block that detects a rising edge transition. This block changes its output based on specific input conditions, helping identify direction of motion. For instance, if each sensor is connected to its own AND-EDGE block, and both sensors are connected to a common AND-EDGE block, the output can provide insight on the object's movement direction. The assumption here is that the scan cycle time is always short enough to avoid both sensor inputs transitioning from 0 to 1 simultaneously. This edge-detecting function is also known as an edge detector or one-shot. In summary, proper utilization of AND-EDGE blocks can help determine the direction of motion based on sensor inputs in a PLC program.

Hello Geert, you could use a simple memory bit. Assuming sensor 1 is the loading point and sensor 2 is the unloading point, when an object passes sensor 1, set the memory bit; when it passes sensor 2, reset it. The state of the memory bit will then give you the direction of the object movement: if it's set, the direction is towards sensor 2 (unloading), if it's reset, it's moving towards sensor 1 (loading). This is a simplistic approach, but it should work given the cyclical nature of your process. Hopefully that helps!

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 determine the direction of an object using 2 sensors with a Siemens Logo 8 PLC? - To determine the direction of an object using 2 sensors with a Siemens Logo 8 PLC, you can track the sequence of sensor activations as the object moves between them. By analyzing which sensor is triggered first and then second, you can determine the direction of the object.

FAQ: 2. Are there specific programming functions or blocks in Siemens Logo 8 PLC that can help with object direction detection?

Answer: - Yes, in Siemens Logo 8 PLC, you can utilize functions such as AND blocks, timers, counters, and memory bits to create a logic sequence that determines the direction of an object based on sensor inputs. By programming the PLC to interpret the sensor data, you can accurately detect the object's direction.

FAQ: 3. What considerations should I keep in mind when setting up the sensors for object direction detection with Siemens Logo 8 PLC?

Answer: - When setting up sensors for object direction detection with Siemens Logo 8 PLC, ensure that the sensors are properly positioned along the object's path to detect its movement accurately. Additionally, consider the timing and logic sequence required to interpret the sensor data correctly and determine the object's direction reliably.

FAQ: 4. Can you provide a step-by-step guide or example program for determining object direction with 2 sensors using Siemens Logo 8 PLC?

Answer: - Yes, we can provide you with a step-by-step guide or example program for determining object direction with 2 sensors

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  â†’