[Solved] Potential issue with Position Tuning in IONmotion

Questions about using encoders with the Roboclaw product line
Post Reply
GeeklyGrey
Posts: 42
Joined: Thu Oct 08, 2015 11:41 am
[Solved] Potential issue with Position Tuning in IONmotion

Post by GeeklyGrey »

Was working with IONmotion on my Win 7 Laptop.
Decided to do comparative tuning and testing with changes to settings between my motor1 and motor2.
Roboclaw 2x15A firmware version 4.1.14
IONmotion 1.6.4

Loaded values from Roboclaw which have been working reasonably well up to now.
These values were derived from a previous running of IONmotion and simplified to rounded integers.
Speed 2000, accel/decel 3000, QPPS 2000
Position settings PID 5000,0, 32200
Set MaxPos on 5000

Selected PIV tuning on motor1 and ran the autotune. It produced some values which were reasonably similar to the original values when the level slider was moved to the left.

The strange bit occurred when I tried to move the motor1 slider down to zero, and then to the top value.
Regardless of how fast I moved the slider (fast as possible to try for smooth action) the movement of the motors was rubbish, coughing, spluttering, very slow movements etc.
BUT on the same settings Motor2 worked smoothly and quickly. Note here that I did NOT run the autotune on motor2.
Attempts to move the motor1 speed slider resulted in very slow, lumpy movement somewhat similar to what happens if you click on the slider and then use the up/down keys. About 20 clicks top to bottom but rough.
After about 20 minutes of attempting to understand what was happening and adjusting settings, I got the wonderful microsoft blue screen and ram dump.
After starting the computer again and restarting IONmotion - settings were still available and motor1 ran WELL. I am reasonably comfortable with the results obtained, but not with the strange effect on IONmotion.
I have not run the autotune function again since.

I do not have a solution but think there is something not right with the tuning system.

In addition I would like to suggest that the speed slider coding be adjusted to allow the slider to be moved fully one way or other with the mouse button held down, and that no motion be initiated until the mouse button is released. That way we can easily get some meaningful movement curves.

I am finding that I get much simpler control by just changing the MaxPos value from 500 to 5000 to 500 etc.
Result is nice clean movement between 250 and 2500 without touching the slider at all. Nice graphs using setpoint and position lines.

This technique usually requires manually moving the speed slider down to the bottom first to 'prime the pump' then changing the MaxPos usually will work. Clicking away from the slider to do something else usually means moving the speed slider down to the bottom again.
Last edited by GeeklyGrey on Thu Nov 19, 2015 1:48 pm, edited 1 time in total.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Potential issue with Position Tuning in IONmotion

Post by Basicmicro Support »

1. There is a setting that is wrong in the current release of IonMotion. One motor is set to buffer commands sent to it and the other is not. I suspect that is why you are seeing some differences. Not necessarily all differences but some between the two. Im working on an update that also make some more adjustments to the autotuners. The autotuner settings are still a bit of a work in progress.

2. You can use the arrow keys and pageup/down keys to get some more step response control of the sliders. Click the slider then you can use the keys.

3. Set a 0 speed when using the sliders with the mouse gives smoother response when not using any accel/deccel values and sliding the slider with the mouse. When using accel/deccel values you do need to set the speed but this also smooths out the response when sending multiple commands to the roboclaw(eg when sliding the slider with the mouse).

4. I may implement that as a check box option. I like the idea of only sending a single command per mouse/slide movement for some tests but I also like the continuous commands while sliding option as well for other testing.
GeeklyGrey
Posts: 42
Joined: Thu Oct 08, 2015 11:41 am
Re: Potential issue with Position Tuning in IONmotion

Post by GeeklyGrey »

Ok thanks -
Your point 1 -Good to know there is a difference between the two sliders at present - may be able to work with that for now and derive some benefit. Considering both my motors will end up with same or similar values this may work for me.
Edit - yes motor 2 gives a much more manageable response than motor 1 on same settings. Easier to quickly slide the slider from one end to other and get motor up to speed. I can work with slider2 to achieve suitable values and just apply them to both motors.

Your point 2 - thanks - I had not noted page up/page down, will try it.
Edit - Numlock needs to be turned off to get a response. Page up/Page down seems to produce much smaller responses than the arrow up/arrow down response which is twenty clicks for full scale movement. My expectation for Page up/Page down would have been for the movement to have been much greater, maybe four or six clicks for full scale movement. But motor2 slider is still very useful at present. A quick movement is good.

Your point 3 - understand there are two opposite needs here, leads to
Your point 4 - Check box option seems like a great idea, look forward to seeing that in due course.

And a question. Which command number are you using with motor2 slider at present?
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Potential issue with Position Tuning in IONmotion

Post by Basicmicro Support »

2. Page Up/Down use to be the big movements while the errow keys were the small movements but I wanted reasonable movements on the arrows(eg more than 1) but I still wanted high resolution movements(hense the page up/down setting).

3-4. I've added the check box options and will be updating the installer shortly.

Im using the indivdual position commands. One slider had the bfufer argument set to 1 and the other had it set to 0. I've fixed that now so neither sends buffered commands.
GeeklyGrey
Posts: 42
Joined: Thu Oct 08, 2015 11:41 am
[Solved] Re: Potential issue with Position Tuning in IONmotion

Post by GeeklyGrey »

Ok - thanks for that alteration to include the check box. That is working nicely, and similar result on both motors now. Not sure about the results but that is what tuning is about and I am running bare shaft motors at present while I come to grips with things. I can get the motors running well with lower values which will serve me for now.

Have not had a repeat of the blue screen so far and I did run both motors on the position tuning today.

I take it that your 'individual position commands' comment refers to commands 65 and 66 because you are needing to accommodate accel, decel, speed and position variations from the users screen. If so the commands are obviously working, I just need to make them work for myself but we are looking at that on a different thread.

Would appreciate a confirmation then lets call this thread done and move on.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Potential issue with Position Tuning in IONmotion

Post by Basicmicro Support »

Yes, by "individual position commands" I meant 65 and 66. When "Sync Motors" is checked the Mixed version of the commands is used(eg 67 in the Position Settings screen).
GeeklyGrey
Posts: 42
Joined: Thu Oct 08, 2015 11:41 am
Re: [Solved] Potential issue with Position Tuning in IONmotion

Post by GeeklyGrey »

Ok - that makes sense. Thread closed.

Post Reply