Ok I have my chassis to my robot sort of up and running. It has 2 hb 25s. Every now and then one drops comm and i cant control it. I think it has to do with the jumper and the comm loss safety that they have.
Anyway I have ran it with the Movement Panel and modified servo panel. I have a ping plugged in also and played with it. I have a couple more pings that I am going to mount.
Sorry for this post being long winded
What I am aiming for is is roaming self avoiding type of thing.
I can see the programing broken up into small scripts and called as needed by a master script. That is how I program some of the robots and plc's I work with at work. Can this be done here or is it better to write a big script and use jump to label's instead?
Thanks for any advice and help as I go
Happy New Year
Upgrade to ARC Pro
Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming
I honestly can't give you a definite answer because you'll be modifying the requirements as you progress. Start with a single script and see what happens
In many cases, the Ping Radar control will do a great job at self roaming.
So I'll narrow it down a bit.
Can I call other scripts from another then return to the main script where I left?
I even have two scripts called "Kill" and "Alive" that will call each other after a CC, Sleep and then Halt(). That way the each will always be running but not at the same time. What I wanted to do was have the first script standing by and monitoring an ADC port for a switch closure at start up. Once it sees the voltage change when the switch closes it will run a CommandControl for both a different script that will move a motor to a certin point and also a CC to call the second script that monitors the ADC of that same switch again. Now when this second script (It's now running and monitoring the same ADC port) sees the voltage change again it will move the motor back and reset the first script to monitor the ADC port, waiting for this switch to operate again.
Sorry, I hope you followed all that. In real life what I wanted to accomplish was to pull the Power Pack on B9 off the side of the robot, that would open a switch, the robot would grown, appear to go dead and bend over. When the Power Pack was replaced the same switch would be closed, B9 would appear to come back alive, say something and stand up straight. The two scripts mentioned above call several other scripts to do all this nicely and always stop themselves and reset the other.
With ALL that said I wish I knew how to condense all these different scripts into just a few or even one. I'm sure it can be done with the Label, Start, Goto, If and Else functions but I'm not really that good at script writing (yet hopefully). I guess this is the genies and marvel of ARC; it will let newbie like me fumble around and still let me make cool animation like this work.
Hopefully as time goes buy I'll be able to write better scripts that don't need several smaller scripts called to do what I want. Maybe then I'd know the answer to your (and my) question.
Again, sorry for the loooooong and rambling post. If interested here's my ARC project as it sits as of last night:
In the Hipsdown section you see the statement:
CC("Hips Down", ScriptStart) . CC is short for ControlCommand, "Hips Down" is the name of the other script I have written that will move my motor to the proper spot and ScriptStart is the command to start that script. You can find these on the Script Help section next to where you write your script in the EZ Script window.
Sleep(7000) is the statement that pauses the script in MS so the actions before can complete before it moves on the next statement.
CC("Alive", ScriptStart) is the ControlCommand that starts the next script. In my case it's a script "Alive" that I want to monitor the same switch as was being watched that's attached to ACD0 in the Start loop. Again, ScriptStart is the command to start that script.
Halt() is the command to stop the script so it will be ready for the next call. Also it wont just hang there or loop depending how you close it out. If I place a Return there instead then the script would go back up to Start and just loop around till it gets a call. I think that's called polling. Problem is if the came actions will execute unless it's written differently using other functions like "Else" or "Else If".
Again, I'm still learning so if I'm wrong about any of this I hope someone will step in and keep me honest.
I like to use smaller scripts instead of one big one I find it easier to trouble shoot cause its down to one small file.
At least that is the way I program plc's at work so I am hoping it works this way here too. Maybe your right the better way will be with one script.