The Ewon Cosy features an option that allows users to control the WAN or the VPN connection through its
Digital Input. The idea is to let the end customer decide whether the Integrator or the Machine
builder can connect the Ewon remotely or not using an electrical switch.
This option is unfortunately not directly embedded in the Ewon Flexy. Nevertheless, it is possible to make it
using a simple piece of BASIC Script.
Ewon : Flexy
First create a Tag associated to a digital input of the Flexy. In this example we will use the first digital input of the Flexy Base Unit (DI1). See Appendix A of the Flexy 205 Installation Guide.
Secondly make sure your Ewon Internet connection is properly configured (You should have executed the Internet Configuration Wizard successfully)
Finally, open your BASIC IDE, paste the following BASIC Script and save it.
SETSYS COM,"LOAD"
WANCnxInUse$ = GETSYS COM,"WANCnx"
ONCHANGE "Switch","GOTO DoSwitch"
GOTO DoSwitch
DoSwitch:
IF (Switch@<>0) THEN
Rem Open Internet connection
SETSYS COM,"LOAD"
SETSYS COM,"WANCnx", WANCnxInUse$
SETSYS COM,"WANPermCnx","1"
SETSYS COM,"SAVE"
PRINT Time$;" Connection opened"
ELSE
Rem Close Internet connection
SETSYS COM,"LOAD"
SETSYS COM,"WANCnx","0"
SETSYS COM,"SAVE"
PRINT Time$;" Connection closed"
ENDIF
Do not forget to select the AutoRun option (Run > AutoRun) to start the Script execution at the Ewon Start-up.
At the end you should have this kind of result :