155k views
5 votes
Can someone create a ladder diagram on openPLC (I just don't have the program on my computer) with the following description?

[START]
|
|-----[Ultrasonic Sensor]----[LCD Display]
|
|-----[Fluid Level <= 3cm]--|-----[Fan ON for <15 sec]--[Red LED ON]--[Blue LED ON]
| | |
| |-----[Fan ON for >=15 sec]--------|
| |
| |-----[Fan OFF]--[Green LED ON]--[Red LED OFF]--[Blue LED OFF]
|
|-----[Fluid Level > 3cm]--|-----[Fan OFF]--[Green LED ON]--[Red LED OFF]--[Blue LED OFF]
|
[END]

Also here is a description of the Arduino setup:

Ultrasonic Sensor: Measures the distance to the fluid surface in the tank. LCD Display: Shows the current fluid level in the tank as "Target Distance: x cm" Multi-colored LEDs and Fan (Pump): If the fluid level is less than or equal to 3 cm: Fan (Pump) is ON if it has been on for less than 15 seconds. Green LED is OFF. Red LED is ON. Blue LED is ON (indicating flow rate). If the fluid level is greater than 3 cm. Fan (Pump) is OFF. Green LED is ON (indicating the target distance is being displayed). Red LED is OFF. Blue LED is OFF. Fan control based on fluid level: The fan is activated when the fluid level falls below 3 cm The fan is deactivated after being on for 15 seconds or when the fluid level rises above 3 cm. LEDs display status: Green LED: ON when the target distance is displayed, and the fan is OFF. Red LED: ON when the fan is ON. Blue LED: ON when the flow rate is displayed (fan is ON)

1 Answer

3 votes

Final answer:

The student is seeking a ladder diagram in openPLC based on fluid level controlled outputs for a fan and LEDs, reacting to an ultrasonic sensor's input. Without access to openPLC, it's not possible to create the actual ladder diagram, but an outline of the required logic has been provided.

Step-by-step explanation:

Creating a ladder diagram for the described scenario in openPLC involves representing the logic for controlling a fan and multi-colored LEDs based on the input from an ultrasonic sensor measuring fluid levels. The sequence needs to display different behaviors depending on whether the fluid level is below or above 3 cm, and whether the fan has been on for less than or greater than 15 seconds.

Ladder Diagram Logic Outline

  • If the fluid level is ≤ 3 cm and the fan has been on for less than 15 seconds, turn the fan on, and light up the Red and Blue LEDs.
  • If the fan has been on for 15 seconds or more, or the fluid level is > 3 cm, turn the fan off.
  • Whenever the fan is off, turn the Green LED on and the Red and Blue LEDs off.
  • The LCD Display should show the current fluid level as "Target Distance: x cm" regardless of the fan's status.

Unfortunately, since you do not have access to openPLC, I'm unable to create the ladder diagram software representation for you, but this logical outline should guide you in constructing the ladder diagram once you have access to the software.

User Nikhil Bhandarkar
by
8.0k points