The motor in this circuit drives a door closed, and the upper proximity switch should report the closed position about 2 s after the motor starts. That switch never changes state in the simulation. No motor component or stepper model will fix it. Two things fix it: a set/reset latch that holds the motor output on, and a stop signal from one of two sources. On real hardware that source is the door-mounted sensor. In the simulation it is a 2 s on-delay timer that stands in for the travel time.
Where does the door-closed signal come from in this circuit?
Follow the signal around the loop. The close command enters a PLC input. The program energizes the motor output. The motor moves the door. The door reaches the sensor. The sensor drives a second PLC input, and the program drops the motor output. Every hop except one is electrical. The motor-to-door-to-sensor hop is mechanical.
The simulator's electric motor is a load symbol that spins when energized. It has no linkage to a door object and no position to report. A proximity switch in the circuit only changes state when the simulator actuates it, either manually or from a linked actuator position. Rotating the motor therefore never reaches the sensor, and the loop stays open at that hop. A stepper would have the same problem, because it also has no door attached. The missing piece is a signal source that closes the loop after the travel time.
| Hop | Carrier | Real machine | Simulation |
|---|---|---|---|
| Close command to PLC | Digital input | Pushbutton or sequence step | Pushbutton symbol |
| PLC to motor | Digital output, relay or contactor | Gearmotor | Motor symbol, visual only |
| Motor to door to sensor | Mechanics | Door travel actuates proximity switch | Absent, replace with 2 s on-delay |
| Sensor to PLC | Digital input | Proximity switch input | Timer output, or timer contact driving the input |
Does the motor output energize and stay on after the start button releases?
Take the first reading at the motor output while you press and then release the close button.
- Output never turns on: the command is not reaching the output. Check the input address in the program against the wiring, and check that a stale door-closed condition is not holding the reset active.
- Output turns on only while the button is held: the program uses a direct assignment instead of a latch. Replace it with a set/reset (RS/SR) block or a seal-in contact. On a small logic module such as a Siemens LOGO!, use the latching relay function.
- Output turns on and stays on: the latch works. Go to the next check.
Make the latch reset-dominant. With a set-dominant block, a held close button overrides the end signal, and the motor keeps driving against a closed door.
Is the end position a real sensor or a simulated 2 s delay?
This decides where the reset signal comes from.
| Condition | Reset source | Role of the timer |
|---|---|---|
| Simulation with no mechanical model | On-delay timer output, preset 2 s, started by the motor output | Replaces the travel time and acts as the end switch |
| Real door with proximity switch | Proximity switch input | Optional supervision timeout, set longer than measured travel |
| Real door, no sensor installed | Timer alone | Open-loop only. Door position is never confirmed, so fit the sensor |
On a real machine the sensor belongs on the door or its frame, not on the motor. The door reaching the switch is what stops the motor. When the timer is kept as supervision, its expiry before the sensor responds means a jam or a sensor fault. Treat it as an alarm, not as a normal stop.
How fast must a real gearmotor turn to close the door in 2 s?
If the mechanism needs a fixed number of output-shaft revolutions for full travel, the required output speed is:
n [rpm] = revolutions_for_full_travel / travel_time [s] * 60
| Assumption | Travel time | Required output speed |
|---|---|---|
| 1 revolution for full travel | 2 s | 30 rpm |
| 2 revolutions for full travel | 2 s | 60 rpm |
Count the revolutions on the actual door linkage before you select the gearbox ratio. Even at the correct speed, the sensor still stops the motor, not the clock. Load, friction, and supply variation shift the real travel time.
How do you build the 2 s on-delay and latch?
- Add a set/reset latch for the motor output. Connect the close command to Set.
- Add an on-delay timer (TON). Drive its input from the motor output or latch bit, and set the preset to 2 s.
- Simulation: connect the timer output to Reset. If the circuit shows the upper proximity switch as a separate contact, drive a relay from the timer output and use that relay's contact as the switch.
- Real hardware: connect the proximity switch input to Reset. Move the timer to an alarm branch, with a preset longer than the measured travel time.
- Add a separate door-closed memory if later steps need a steady signal (see the pitfall below).
Structured-text equivalent. The names are placeholders; map them to your own addresses:
Why the separate memory matters: when the timer resets the motor latch, the timer input goes false. The TON then clears its output on the next scan, so the raw timer output is only a one-scan pulse. Any step that waits on it will miss the pulse. Latch the pulse into a door-closed bit and clear that bit on the open command. That bit also blocks a second close command from restarting the motor against a closed door.
Does the cycle stop cleanly and re-arm?
- Press close once and release. The motor output must stay on without the button held.
- Watch the elapsed time. The motor output must drop when the timer reaches 2 s (simulation) or when the sensor switches (real hardware).
- Confirm the door-closed bit, or the simulated end-switch relay, turns on and stays on after the motor stops.
- Press close again while the door is closed. The motor output must not energize.
- Hold the close button through the full 2 s. The motor must still stop, which confirms the reset dominates.
- Issue the open command, then close again. The timer must restart from zero and stop the motor after 2 s again, which confirms the cycle re-arms.
FAQ
Why does the proximity switch never trigger when the motor runs in FluidSIM?
The motor symbol has no mechanical link to a door or a sensor, so its rotation cannot actuate the switch. Replace that mechanical hop with a 2 s on-delay timer, or actuate the switch manually during the simulation.
Why does the motor stop as soon as I release the start button?
The output is assigned directly from the button instead of being latched. Use a reset-dominant set/reset block or a seal-in contact, with the end signal wired to Reset.
Why does my timer end signal disappear immediately after the motor stops?
The timer runs from the motor output, so dropping the motor clears the timer input, and the TON output resets on the next scan. Store the timer output in a door-closed memory bit and clear that bit on the open command.
What gearmotor speed closes a door in 2 seconds?
Use n = revolutions / time x 60. One output revolution in 2 s needs 30 rpm, and two revolutions need 60 rpm. The door sensor, not the travel time, should still stop the motor.