There are two different VBA executables available in Visual Studio. See also the article about the VBA-debug app for more information.

 (for the following information knowledge of Visual studio is needed)

The two executables are different in the way of communication with the board; e.g. one for communication directly by a communication port (serial communication) and the other is communicating with IP sockets. I’m planning to make just one general app for both (otherwise it is a lot of -extra- work to maintain the software). So in my own interest it is best to make a mixed form, supporting both protocols. The ESP-WROOM already supports both; serial and by IP-sockets. For the DUE and the MEGA board, an IP shield must be used.

At the moment there are two sets of parameters to start and control the applications (some knowledge of VBA and file structure of Visual studio is needed).

Steps to make a working shortcut for execution of the VBA application:

  • First you have to make a short cut of the executable generated by Visual Studio. Be aware that you can generate an executable with or whitout VBA debug code in Visual studio (release/debug version). Find the executable in the folder “…\my-project\ArduinoScada\bin\Release” or “…\my-project\ArduinoScada\bin\Debug”
  • Make a short cut of the executable and add the following parameters in case of the Serial version:
    …/my-executable.exe /comport=com5 /baudrate=9600 /monitor=YES (or NO)
    where comport is the comport of the serial connection of the board, baudrate is the communication speed (must be the same in both sketch as VBA program) and monitor is een key for painting the known tags (with information) on the VBA screen. Sometimes you don’t want to make use of the default painting of the tags on the screen and use the application for DIY scada forms (see also the next articles), in that case the key has to be omitted or has the value NO.
  • Make a short cut of the executable and add the following parameter in case of the IoT version:
    …/my-executable.exe /IP=192.168.179.34 /port=80
    where IP is the IP number of the Wifi shield and port is the port number of the IP connection. The used IP number used by the shield, can be obtained by e.g. examening your home router (connected users). The used Wifi shield is default connected with DHCP (ok, a dedicated IP number is also possible; but not used by me). Future purpose is to extend this set with also the monitor parameter.