- Forum
- Roboteq Motor Controllers
- Controller Configuration & Operation
- SDC2130 - Disable Closed Loop at startup
SDC2130 - Disable Closed Loop at startup
8 years 4 months ago #29530509
by DCON
SDC2130 - Disable Closed Loop at startup was created by DCON
Hello,
I'm driving a motor in closed loop using a script and commands.
I want to avoid any movement at startup until the controller receive a scripted command.
I've tried to set _MVEL to min, to set _MS or to set EX_ but the motor still goes to the default position command.
Do anybody have any idea to solve my problem ?
Thanks
I'm driving a motor in closed loop using a script and commands.
I want to avoid any movement at startup until the controller receive a scripted command.
I've tried to set _MVEL to min, to set _MS or to set EX_ but the motor still goes to the default position command.
Do anybody have any idea to solve my problem ?
Thanks
Please Log in or Create an account to join the conversation.
8 years 4 months ago #29530510
by TechSupport
Replied by TechSupport on topic SDC2130 - Disable Closed Loop at startup
Write a script that will set the controller to open loop mode. Then have it wait x time and then configure back to closed loop mode.
setconfig(_mmod, 1, 0)
wait(10000) ' waits 10 seconds
setconfig(_mmod, 1, cc) 'cc = mode. 1: speed, 2: position relative -refer to manual.
You will need to start the script upon power up. Set script to autostart in your configuration.
setconfig(_mmod, 1, 0)
wait(10000) ' waits 10 seconds
setconfig(_mmod, 1, cc) 'cc = mode. 1: speed, 2: position relative -refer to manual.
You will need to start the script upon power up. Set script to autostart in your configuration.
Please Log in or Create an account to join the conversation.
8 years 4 months ago - 8 years 4 months ago #29530512
by DCON
Replied by DCON on topic SDC2130 - Disable Closed Loop at startup
Thanks. But I've still have a problem.
The motors are configured in closed loop.
After implementing mmod commands in the script, the motor still goes to the default position at startup, and after only, it seems to execute the script and goes to open loop mode.
The controller is shutten down by a on/off switch so at each startup the last conf (closed loop position) will be runned.
A "Default Max Speed value" would solve my problem ...
The motors are configured in closed loop.
After implementing mmod commands in the script, the motor still goes to the default position at startup, and after only, it seems to execute the script and goes to open loop mode.
The controller is shutten down by a on/off switch so at each startup the last conf (closed loop position) will be runned.
A "Default Max Speed value" would solve my problem ...
Please Log in or Create an account to join the conversation.
8 years 4 months ago #29530513
by TechSupport
Replied by TechSupport on topic SDC2130 - Disable Closed Loop at startup
It would likely be better to have the controller set for open loop by default, and then have your script go into the closed loop mode. This way you are guaranteed to have no motor movement upon power up.
Please Log in or Create an account to join the conversation.
8 years 4 months ago #29530516
by DCON
Replied by DCON on topic SDC2130 - Disable Closed Loop at startup
Sorry i've made a mistake in my previous message :
The motors are configured in open loop and not closed loop.
Since my script change the conf to closed loop, the controller with restart the next time configured in closed loop.
The motors are configured in open loop and not closed loop.
Since my script change the conf to closed loop, the controller with restart the next time configured in closed loop.
Please Log in or Create an account to join the conversation.
8 years 4 months ago #29530518
by TechSupport
Replied by TechSupport on topic SDC2130 - Disable Closed Loop at startup
You can always have a digital input switch activate your script once your controller has been turned on. This way, while the digital inputs is low, the controller will power up in open loop mode; no motor movement at all.
Then when your digital input goes active high (momentary push button is fine, set to activate "Run Script"), then the script will convert the configuration into your closed loop parameter.
If your PID parameters are tuned, then the motor should still be at rest, therefore no movement until a command is given.
Then when your digital input goes active high (momentary push button is fine, set to activate "Run Script"), then the script will convert the configuration into your closed loop parameter.
If your PID parameters are tuned, then the motor should still be at rest, therefore no movement until a command is given.
Please Log in or Create an account to join the conversation.
Moderators: tonysantoni
- Forum
- Roboteq Motor Controllers
- Controller Configuration & Operation
- SDC2130 - Disable Closed Loop at startup
Time to create page: 0.070 seconds