Sample script not (properly) working
4 years 11 months ago #29534148
by ilgelme
Sample script not (properly) working was created by ilgelme
Hi,
I am setting up a control system using the FBL2360A to control two motors.
I tested (and modified) your sample script Self Test – as you find in the attachments. Motor 2 works perfectly, exactly as expected. Motor 1 does not: after the instruction SetCommand(_GO, 1, 1000), motor 1 turns to be unresponsive to any other commands.
The only way to stop it from spinning is to send the command SetConfig(_mmod,1,x), in which x can be any of the possible values, also the same current mode. The motor stops during the emergency stop, but it resumes as the system is resumed.
Do you have a clue what’s wrong?
In attach you can find the configuration file.
Thank you,
Simone
I am setting up a control system using the FBL2360A to control two motors.
I tested (and modified) your sample script Self Test – as you find in the attachments. Motor 2 works perfectly, exactly as expected. Motor 1 does not: after the instruction SetCommand(_GO, 1, 1000), motor 1 turns to be unresponsive to any other commands.
The only way to stop it from spinning is to send the command SetConfig(_mmod,1,x), in which x can be any of the possible values, also the same current mode. The motor stops during the emergency stop, but it resumes as the system is resumed.
Do you have a clue what’s wrong?
In attach you can find the configuration file.
Thank you,
Simone
Please Log in or Create an account to join the conversation.
- Gabriel_Isko
4 years 11 months ago #29534149
by Gabriel_Isko
Replied by Gabriel_Isko on topic Sample script not (properly) working
Neither of these will perform well, because of your PID tunings. I would recommend setting your I gain to 1, and your P and D gains to 0.
I am not sure why one motor is working and one isn't, but if one motor is failing and becoming unresponsive, it is most likely entering a fault state and not clearing - probably a LoopErr fault. Make sure both motors increase the hall sensor counters in the positive direction when you give a positive motor command in open loop mode.
A good thing to do would be to test your script while both wheels are in open loop. If it works, you know that you have something wrong with your hall sensor wiring.
I am not sure why one motor is working and one isn't, but if one motor is failing and becoming unresponsive, it is most likely entering a fault state and not clearing - probably a LoopErr fault. Make sure both motors increase the hall sensor counters in the positive direction when you give a positive motor command in open loop mode.
A good thing to do would be to test your script while both wheels are in open loop. If it works, you know that you have something wrong with your hall sensor wiring.
Please Log in or Create an account to join the conversation.
Time to create page: 0.056 seconds