Hi there, I need help with setting up logic for an analog pressure sensor input on a PLC. I want to establish various timing conditions based on the sensor's readings, which I will refer to as Stage 0, Stage 1, Stage 2, and Stage 3. Each stage will have its own TONOFF timer with unique setpoints. My goal is for the timer to repeat until the pressure sensor transitions to the next stage, but I also want the timer to complete its cycle before moving to the next stage. Please refer to the image attached for clarification. Thank you.
Is it necessary to turn on for 2 seconds and then off for 100 milliseconds?
When using a pulse timer for a blast of compressed air, it is necessary to activate it for 2 seconds and then turn it off for 100 milliseconds. This cycle will be eventually adjusted to 6 minutes, but during testing, I wanted to speed up the process and avoid waiting.
Two Output Enable Timers (OTEs) are both writing to the same bit (TimerDone_1). While this may not have any impact since the bit is not currently utilized, it should be noted as a potential issue. Additionally, no timers will be activated in the 0.01-sized+ gaps within the limits for AnalogInput0Scaled. By using < and >= operators, the same breakpoint can be applied to each pair of lines. It might be more efficient to consolidate each timer into a single Timer ON delay (TON) with a preset time of T#Xs100ms and an eXamine If Open (XIO) instruction on its output. Then, utilize the >= .ET T#Xs0ms instruction for generating a 100ms pulse at the end.
To optimize efficiency, consider utilizing a single timer in the following code snippet: XIC ton0.DN MOV T#1s100ms timetotal >= AnalogInput0Scaled 18.0 ADD MOV T#2s100ms timetotal >= AnalogInput0Scaled 21.0 MOV T#3s100ms timetotal. Additionally, incorporate XIO ton0.DN TON ton0 timetotal 0 and -timetotal ton0.ET timeleft <= timeleft T#100ms OTE air_pulse for enhanced functionality.
Hello! It sounds like you're designing an interesting system. To prevent timer overlap, I suggest utilizing an "interlock" logic where the completion of each stage's timer triggers the activation of the next stage. For instance, once the Stage 0 TONOFF timer has completed its on/off cycle, an output or internal bit can be set. This set bit would then be part of the 'permissive' for the Stage 1 timer to start its sequence and so forth. This way, you can ensure each cycle completes before the next one begins. Additionally, ensure each setpoint overlaps slightly with the next to avoid any intermittent sensor readings interrupting the cycle. Hope this helps!
It sounds like you're setting up a pretty intricate process! For your PLC logic, I suggest using a state machine approach to manage your stages. Each stage can trigger its own timer (TON) based on the current pressure readings, and you’ll want to implement a condition to check whether that timer has completed before allowing the transition to the next stage. Using a latch or holding bit can help ensure the timer runs to completion before moving on. Additionally, make sure to incorporate debouncing for your sensor input to avoid false readings that could complicate the transitions. Good luck with your setup!
That sounds like an interesting project! To effectively set up the logic for your PLC, you could use a combination of comparison instructions to monitor the pressure readings and trigger the appropriate TONOFF timers for each stage. Make sure to also incorporate a way to reset the timers when transitioning between stages, so they complete their current cycle before moving on. It might be helpful to create a state machine to manage the transitions cleanly, ensuring that the conditions for each stage are clearly defined. Don't forget to validate your logic with some test runs to make sure it behaves as expected!
✅ 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: Answer: The purpose is to establish various timing conditions based on the sensor's readings and control different stages of a process or system.
Answer: Answer: Four stages are being defined: Stage 0, Stage 1, Stage 2, and Stage 3.
Answer: Answer: Each stage has its own TONOFF timer with unique setpoints, and the timer repeats until the pressure sensor transitions to the next stage while completing its cycle before moving to the next stage.
Answer: Answer: The logic is designed to wait for the timer to finish its cycle before transitioning to the next stage, ensuring proper sequencing and control based on the sensor readings.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.