SBL1360 random Motor stall

5 years 5 months ago #29530537 by TechSupport

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

5 years 5 months ago #29530540 by kitepowersolutions
Updated firmware make no improvement

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

5 years 5 months ago #29530542 by TechSupport
I would suggest keeping the controller by default in open loop so that start up motor does not move. As for putting your controller into closed loop mode, I would suggest doing either of the following.

Use a digital input switch with action to start script when it goes high (momentary switch button is fine).

In script set to auto-start, set up a wait statement for x period of time so that it will wait x time before it tells the motor to go into closed loop mode. Depending on the mode you are setting to, the motor may move. In speed mode, the command is 0, so it should not move. In position mode, it will go to the home position as directed by the feedback.

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

5 years 5 months ago #29530543 by kitepowersolutions
Here is the script I have been running; it defults to open loop unless there is a sufficient difference between pulse input and feedback, would this have the same effect and a independent digital input, I would need to have a external logic controller that determines if my control input is changing and then sent a signal to the Roboteq controller DIn

setconfig(_BRUN,1)
setconfig(_ECHOF,1)
CHOOSE_MODE:

POSITION=GETVALUE(_FEEDBK) 'READ INTERNAL FEEDBACK VALUE
TARGET=GETVALUE(_CMDPLS,1) 'READ INTERNAL COMMAND FROM PWM INPUT
LOOPERROR1=ABS(TARGET-POSITION) 'CALCULATE MAGNITUDE OF ERROR
WAIT (50)
POSITION=GETVALUE(_FEEDBK) 'READ INTERNAL FEEDBACK VALUE
TARGET=GETVALUE(_CMDPLS,1) 'READ INTERNAL COMMAND FROM PWM INPUT
LOOPERROR2=ABS( TARGET-POSITION) 'CALCULATE MAGNITUDE OF ERROR
'CALCULATE MAGNITUDE OF ERROR
ERROR=((LOOPERROR1+LOOPERROR2)/2)
IF ERROR > 100 THEN ' IF OUT OF POSITION BY MORE THAN THRESHOLD VALUE GO TO POSITION TRACKING MODE
SETCONFIG(_MMOD,4)
SETCONFIG(_cpri,1,1 ) 'SET OPERATION TO CLOSED LOOP POSITION TRACKING
goto CHOOSE_MODE
ELSE
SETCONFIG(_MMOD,0)
SETCONFIG(_cpri,1,0 )
SETCOMMAND(_GO,0)

END IF
wait(50) 'IF CLOSE ENOUGH TO TARGET POSITION DELAY 100MS THEN RE EVALUATE
goto CHOOSE_MODE

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

5 years 5 months ago #29530545 by TechSupport
What I meant is that the controller configuration should be defaulted to open loop, this would eliminate any chance of the motors moving up on power up. If it is left in the closed loop position, there is a gap period upon power up prior to the time it reads from the script, so there is a chance of motor movement.
The following user(s) said Thank You: slloyd

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

5 years 5 months ago #29530546 by kitepowersolutions
I believe my defualt is open loop thats certainly how it is set in the configuration menu; also this problem occurs after the system is already running although it is pretty random.
I find if I leave it on long enough moving or at a standstill eventually it stop in a position and not restart, and just a tiny amount of external force will unstick it!

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

5 years 5 months ago #29530547 by TechSupport
The problem may be the loop in itself. If the controller is already started with open loop, there isn't a need to determine which mode to be in and repeat.

What you may need to do is to terminate the script after the controller goes into closed loop mode.

The line to add is just

Terminate

This will terminate the script.

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

5 years 5 months ago #29530548 by kitepowersolutions
It needs it to keep determining the mode because I need it to go to different positions and brake, I found that I can't get the brake to come on unless I am in Open loop mode, hence the loop and the need to constantly switch between the two modes.
If I was to terminate the script how would I get it to restart?

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

5 years 5 months ago #29530549 by TechSupport
You can use a digital input switch as mentioned.

Wire up 5V across switch and other wire of switch goes into digital input of your choice. In the settings, set as active "High" (sees 5V) and action "Run Script".

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

5 years 5 months ago #29530550 by kitepowersolutions
what triggers the switch?

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

Moderators: tonysantoni
Time to create page: 0.128 seconds