1.1 Unzip downloaded zip-file
1.2 Move folder “DBGW Service 1” to your preferred location. Example “C:\Program Files (x86)”
1.3 Rename folder if you wish. Example “DBGW for ProdDB”.
Note: Folder name is going to be the name of the Windows service.
2.1 Double click on “Config.txt” file, for editing.
Note: Only change values or text after #1=, #2=, #3= and #4=
2.2 Select Diagnostic level (#1)
Level 0 = Only errors are logged to Windows Event Viewer. DefaultLevel 1 = SQL query from PLC and errors are logged to Windows Event ViewerLevel 2 = SQL query from PLC, response from database and errors are logged to Windows Event Viewer
Diagnostic level 0: #1=0
Note: Increased CPU load for Level 1 & 2 due to writing to event log, if there are many queries/second. Therefore, #1=0 is the default
2.3 Enter local IP-address or Network Connection Name (#2)
Enter IP-address for used ethernet port. Example: #2=10.10.1.21
Or enter Network Connection Name. Example: #2=Ethernet 1
Note: PLC must have access to this IP-address to establish communication to DBGW Service
2.4 Enter local listening port number (#3)
Enter unused portnumber for DBGW Service. Default 11201
Note: PLC must have access to this port number through switches and firewalls
Note: If your are installing 2 or more DBGW Services on the same Windows computer, each DBGW Service must have a unique port number. IP-addresses can be the same
2.5 Enter SQL-connection string (#4)
Connection string to a SQL Database depends on various things, therefore some examples are listed in the Config file.
For additional help, try this link: https://www.connectionstrings.com/sqlconnection/
Example: DBGW Service installed on Windows computer with IP-Address =192.168.202.21 and SQL Express is installed on another Windows computer with IP-Address 192.168.202.201, database is “DBGW_Test”, SQL user is “PLC_user” with password “Password1234”. SQL listening portnumber=1433
Note: Password will be encrypted after the first start of DBGW-Service
Note: Blank password is not supported
Note: Future modifications to this Config.txt file requires a restart of the Windows DBGW Service to take effect.
3.1 Right click on “Install.bat” and select “Run as administrator”
3.2 Click “Yes” to allow this app to make changes on your device. Only requested if User Account Control is active.
3.3 Check that installation is successful and that the service is started, see screenshot above.
3.4 Press Enter to finish installation.
3.5 Installation finished, but if you need access to another SQL-Server instance, you need to install another DBGW-Service. Therefore copy folder “DBGW Service 1” and rename it to “DBGW Service 2” and go to chapter 2
4.1 Write “services” in Windows search field, and select Services App.
4.2 Check that DBGW-Service is Running, see screenshot below.
4.3 Write “event” in Windows search field, and select Event Viewer App.
4.4 Under “Application and Service Log” a new “DBGW Log” folder is created. See screen shot below.
4.5 Scroll through generated events, and check that specified values in “Config.txt” file has generated the correct events.
4.6 Check that there is no Errors.
Note: The connection to SQL Database is checked during startup, if this connection fails, an error will be generated with cause description
4.7 Three optional BAT-files are available for Starting, Stopping and Force restart of DBGW service.
Note: Right click on one of the three files and select “Run as administrator” if you are not logged in as administrator