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.
- In the Init Section, paste the following script
WANCnxInUse$ = GETSYS COM,"WANCnx"
ONCHANGE "Switch","GOTO DoSwitch"
- Create a new section with the name of your choice and paste this other script
IF (Switch@<>0) THEN
Rem Open Internet connection
SETSYS COM,"WANCnx", WANCnxInUse$
PRINT Time$;" Connection opened"
Rem Close Internet connection
PRINT Time$;" Connection closed"
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 :