
Andy Roid
Auto Boot And Connect To Ezb
I have a fortune teller I built a couple of years ago, powered by an EZB. The computer which operates it is mounted in the cabinet. This allow security as it sits in a barn open to the public.
To turn the fortune teller on, we have to open the cabinet, start the computer, go to EZ builder, make the connection, etc. then lock it up again. Few know how to navigate the startup steps required in the EZ Builder software to get it running.
My question: is there a way an automatic start file can be made, so when the computer is turned on everything can be loaded and the program starts?
I already have the EZB, start a run script when it connects. which starts the builder program.
I have no clue if or how this can be done. Any ideas? I am sure others, have robots, which would like a feature allowing it to be turn on with a switch, and the robot could "self start".
Upgrade to ARC Pro
Get access to the latest features and updates with ARC Early Access edition. You'll have everything that's needed to unleash your robot's potential!
1) First, you need a connection script in your project that will automatically connect to the EZ-B when ARC is started.
Code:
This will do it, but you might want to put it in a loop so it runs every 30 seconds or minute in case the EZ-B isn't powered up when it runs, or to reconnect if you loose connection. Change the "0"s to the EZ-B board number if you have more than one in the project. If you do add a loop, and intentionally want to disconnect from the EZ-B, stop the script before disconnecting.
2) Use the Shortcut Creator in ARC (on the options tab) to create a shortcut to your ARC project, and select your connection script to run at startup. Put the shortcut on your desktop for now.
3) Copy/move your link to your startup folder. In Windows 7, this was easy. It was a folder in your start menu. In windows 8 and above it is a little more complex. See https://scottiestech.info/2015/10/23/where-is-the-startup-folder-in-windows-10/ for instructions.
Alan
This works fine in a loop, and I have used it in one before, just don't have it in a current project because it does interfere when I am doing development and stopping my connection on purpose.
Alan
I will give it a try.
Thanks,
Thanks for the script. I've been wanting to put this exact thing in my project.
Code:
Yeah... This script has seen some edits in the project I copied it from. There used to be an else condition which has since been deleted.
Alan
What is the architecture? Are you using one dongle for internet (or home network through a router) and hte other for EZ-B's network? If that is the case, I would put the EZ-B in client mode, and in your router, assign it a static IP so it is always the same IP n the project.
Alan
Alan, thanks for the help !
Alan
Thanks for the autoconnect script.
It works great if I choose to manually disconnect from ARC.
However, with that script looping if I turn off the power on the EZB robot, ARC thinks the robot is still connected and when the robot is turned back on the script will not reconnect the robot!
A way to demo the issue is use the script on a blank program, connect to the EZB and then turn off the robot. Note that the Connection Control will still indicate the robot is connected (isconnected(0) =TRUE) and the script will not reconnect
After running some tests, I found that the way to make it work in this situation is to add an additional script that tries to exercise the connection so that ARC will declare the connect disconnected.
Code:
and here is the Watchdog script to exercise the connection.
This code can't be in the looping script as it will crash when no connection is found
Code:
Regards,
Frank
What I especially like about this approach is that I can keep a low cost Windows tablet (NuVision) running ARC with a program on it for a robot and turn on that robot and have ARC automatically connect to it!
Its almost like having the program resident in the EZB on the robot...
Just turn on the robot and it starts operating
Regards,
Frank