DonNH Posted August 7, 2023 Report Posted August 7, 2023 Another simple problem I believe . . . I'm turning on a motor, keeping it on for a specified time, then shutting it off. The thing is, I have to use a function block to turn on the motor (ARCL connection with mobile robot). So, I'm setting variables MotorOn to activate the timer once the initial function block is complete , and Timer_done to activate the function block to turn off the motor. This works fine, unless I try to stop the motor before the timer has expired, by turning off the Start_motor switch. In that case, Timer_done never becomes True, so the motor continues indefinitely. Seems like there should be a fairly simple way to activate the Motor_Off function block when the Start_motor switch is turned off.
b.k.n. Posted August 7, 2023 Report Posted August 7, 2023 I would use a normally closed contact of the Start_motor put ahead of the Motor_Off function...?
DonNH Posted August 7, 2023 Author Report Posted August 7, 2023 I thought I had already tried this (added as an OR branch), but I just did it and it works. Looks wrong when monitoring as the rung activates as soon as the connection is made between the PLC and AMR, but that's correct.
Crossbow Posted August 7, 2023 Report Posted August 7, 2023 You can use TP instead of TON so you always get the same length output no matter how long Start_motor stays on (or doesn't).
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now