
RobertL184
The version of EZ builder just prior to the 8-19 version worked fine, but something is this build has created a problem with the custom movement panel. If I have a script in the set to run in the speed changed part of the control, my robot only seems to run forward reguardless of which buttons I push in the movement panel. My stop script works, but the left, right and reverse do not and the only script that the script manager indicates is being run is the Speed change script even though I am not changing the robots speed.
My Speed change script looks like this:
IF ($Direction="Forward")
ControlCommand("Script Manager",ScriptStart, "ROVER_FWD")
ENDIF
IF ($Direction="Reverse")
ControlCommand("Script Manager",ScriptStart, "ROVER_REV")
ENDIF
IF ($Direction="Left")
ControlCommand("Script Manager",ScriptStart, "ROVER_LEFT")
ENDIF
IF ($Direction="Right")
ControlCommand("Script Manager",ScriptStart, "ROVER_RIGHT")
ENDIF
As an example my left turn script looks like this:
SET (D12, OFF)
SET (D13, ON)
$GO=GetSpeed() / 7
$GO=ROUND($GO,0)
PWM(D14, $GO)
So I press the Left Button on the Movement Panel and then stop, the right button on the movemnt panel and then stop, etc. The script manager show this:
And the robot only moves forward.
In the previous version of ARC everything worked correctly. Press Left-> the left script ran, Press Right -> the right script ran, etc. Move the speed change slider the speed script ran and called the appropriate movement script.
If I remove the call to the speed script in the Movement Panel everything works fine but of course I can't change the robots speed once it is moving.
I had this exact same problem on some of the earlier builds.
If I remove the Script call out for Speed Changed then everything works as it should. Forward runs the Forward Script, Reverse run the Reverse Script, etc. Of course with the Speed Changed Script call out removed changing the speed does nothing.
This problem has come and gone a couple of times. As a result I usually don't mess with the speed changed part of the custom movement panel, but I got a new 12V battery for my robot instead of the 9V battery I had been using and suddenly needed to turn down the motor speed. My robot was racing out of control. I was pleasantly surprised when it worked quite well in the version prior to 2013.08.19.
After I upgraded to 2013.08.19, calling a script in the "speed changed" portion of the custom Movement Panel caused funny things to occur. Normally my Speed changed script uses the $DIR variable to determine which direction the robot is moving and the $DIR variable was making the robot appear to go in the wrong direction. But I think the problem is related to the speed changed script running instead of the appropriate script. So I created a scripted down EZB file to illustrate the basic problem.
This script should be a start on helping to identify the problem. It is much simpler than my whole robot project file.
Here is my custom Movement Panel test project EZB File.
Custom_Movement_Panel_Test_Project.EZB
The script does function correctly for me when I change the speed.
I have an idea... What i'll do is make it so the Speed script only runs if the speed is adjusted. Right now the speed script runs every time the speed or direction is changed... which is a little overboard now that I think about it.
I'll make that change and publish a release for you in a few minutes
For me nothing but the speed script runs.
Thanks loads.
I will let you know if the new version works as expected. As always you provide great service.
Looking forward to buying a revolution developers kit. Being a retired electrical engineer, the plastic parts look neat, but I'm feel like I'm a little beyond that point. They should allow more people to get involved with robotics though.
I am a mentor for a local FIRST FRC robotics team. I look forward to showing them my ez-b robot when I get it further along. Ez-b has some very advanced features.
The custom Movement Panel problem appears to be fixed in the 2013.09.01 version.