Asked February 8 2013

Community Question

I couldn't see one in the EZ-Script section so here is the one I just wrote.

This will check all 5 connections, if any are not connected it will attempt to connect to all. Looping around to constantly check. I have not tested this to see how much resources the loop uses so all comments are appreciated.

To change from all 5 boards to just 1 board or a couple of boards is pretty straight forward, just edit the IF statement and the ControlCommand statement.


# Auto Connect/Reconnect Script
# Version: 1.0

# Check if EZBs are connected
IF (IsConnected(0) = FALSE or IsConnected(1) = FALSE or IsConnected(2) = FALSE or IsConnected(3) = FALSE or IsConnected(4) = FALSE)
# Visual output
PRINT("Connection Error: Attempting Reconnection")
# If any are not connected attempt to connect all
ControlCommand("Connection", ConnectAll)
# End of if statement
# Return to the start
February 9 2013
Thanks RichMr2. This will come in handy. I have noticed that at times I'll loose a connection to one of my boards for what ever reason. This will keep them connected!
June 4 2017
When using the auto connect script with an init script, if one of the ezb board gets disconnected and the the auto connect script reconnects the ezb will it also rerun the init script?

Ps, I do have this script in the connect of ever ezb board I'm using.

June 4 2017
No @merne. This only connects the EZB's It will not start any other script.

The only reason your ESB's connect when you start EZ Builder (from a shortcut created by EZ Builder) is because that shortcut will start EZ Builder and the INI script. That INI script then connects the EZB's (if you have the connect commands listed).

Hope this is clear. :)
December 15 2017
If you have a script that you want to run when an EZB board gets connected, or reconnected, put that script in the Connection Control

User-inserted image

User-inserted image