Motion on Power On

6 years 2 months ago #29529411 by BG
Motion on Power On was created by BG
I'm running a MBL1330N in closed loop position tracking with a pulse input as the command and an analog input as the feedback. When I have the motor commanded to a specific angle via the pulse input, then disconnect power to the controller and reconnect power after a few seconds wait, the motor will attempt to go to the zero position briefly before going to the commanded position. Or if there is no commanded position via the pulse input, it will go to the zero position.

Is there any way to prevent this motion at power on? Ideally, it would not move at all or go immediately to the commanded pulse location.

Please Log in or Create an account to join the conversation.

6 years 2 months ago #29529412 by Griffin Baker
Replied by Griffin Baker on topic Motion on Power On
You could wire up a switch on a digital input and set it for deadmans switch. When the switch is active, it would stop the motors from moving, and then resume a command when the switch is unlatched.

Outside of that, perhaps you would need to write a microbasic script.

Please Log in or Create an account to join the conversation.

6 years 2 months ago #29529415 by BG
Replied by BG on topic Motion on Power On
I have been running a script to control the motion, however, this power on motion occurs before the script becomes active. If I remove the script from the scenario, and potentially any weird programming issues I have, and only rely on a Pulse input for command I have a similar problem.

Pulse input is the only command in the command priority list. Digital input 3 is set to be a deadman switch when active level is high. Mode is closed loop position tracking. With an active pulse signal I can toggle the deadman switch and cause the motor to move from the commanded pulse input position to the zero position. I would expect it to hold at the commanded position when the deadman switch is released. Instead it travels back to the zero position. The deadman switch does inhibit commands from moving the motor, but the motor always moves to the zero position.

Please Log in or Create an account to join the conversation.

6 years 2 months ago #29529416 by Griffin Baker
Replied by Griffin Baker on topic Motion on Power On
Right, the deadmans switch issues a motor command to go to zero and hold so that explains why it moves.

Here is a different approach to what you are doing. You can set up the controller to be for open loop so that when powered on, the motors won't go anywhere. Then in your script you can enable it to become a closed loop mode.

setconfig(_mmod, 1, 4)

The thing is that when the controller goes into the closed loop mode, it looks at the feedback for the home position first.

Please Log in or Create an account to join the conversation.

6 years 2 months ago #29529419 by BG
Replied by BG on topic Motion on Power On
Thanks Griffin, I followed your advice with the open loop mode and having the script change the mode to closed loop position tracking and have the result I was looking for.

Please Log in or Create an account to join the conversation.

6 years 2 months ago #29529420 by Griffin Baker
Replied by Griffin Baker on topic Motion on Power On
Glad to hear that it worked.

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.107 seconds