Configure GOT2000 MES Interface function with MS SQL 2017

Configure GOT2000 MES Interface function with MS SQL 2017

This article will show You how to configure GOT2000 panel to log data to MS SQL 2017.

Prepare before configuration

- Install  Microsoft SQL Server Express 2017 (called MS SQL Server).

- Install  Microsoft SQL Server Management Studio.

- Install  DB connection service and setting tool Version 2. You can find it on  Disk5 folder in the DVD-ROM of GT Works3.
Exact path : x:\GTW3\Disk5\MESDB\DBCnct2_64\setup.exe

- Format  SD card (put it in the GOT2000).

Configure MS SQL login for GOT2000 MES Interface use

GOT2000 MES Interface function requires MS SQL user account to log in the MS SQL Server.
Open  Microsoft SQL Server Management Studio
Go to your SQL server  Properties:


In the  Sercurity tab enable the  SQL Server and Windows Authentication mode.


Go to SQL server object explorer and open  Properties of  sa user:


In  General tab  assign new password for sa user and  switch off password policy.


In  Status tab  Enable sa user account:



Create database and table for test

Using SQL Server Management Studio create databese for test.
Open context menu on sql server name and click  New Database...


Create new database for test data. Name it  MESDB:


Add new table to newly created database.  Open context menu on your database name and select New -> Table... :



Name first column as  ID and change data type to  int. Change first column property  IdentitySpecification (Is Identity) to  YES
Name second column  value and change data type also to  int.



Click  save to confirm new table specification and put the  new tabe name ( MESTABLE ) in pop-up window then click  OK.


Your test database and table is ready to use.

Configure ODBC

Open ODBC configurator from  Start Menu -> Narzędzia Administracyjne Systemu Windows -> Źródła danych ODBC (64-bitowe)

Swich to the  System DNS tab and click  Add...

Select  ODBC Driver 17 for SQL Server 



Name Data Source :  MESODBC (remember it cause you will use it in MES Interface configuration).
Write your SQL Server path.



Change the way of authentication to  SQL Server authentication and fill in the credentials accordin to  sa user.


Change the default database to the one you just created in SQL Server Management Studio


In next window confirm default settings by clicking  Close button



To confirm that ODBC can connect to the database click  Test Data Source



If the connection is allright you will see :  TESTS COMPLETED SUCCESSFULLY!



Configure GOT MES Interface function License

Open the GOT Utility main menu (usualy by holding left-top corner of the GOT screen couple seconds - if not working switch this functionality on in the GOT project) then go to the Licence management screen. Then put your MES interface function license code and press Regist.


Configure GOT project

Open GT Designer3 project to configure MES Interface function.
In the project tree open MES interface branch.

In the Server service settings:
As a Server service name put the name of the database.
Fill in the IP address of the PC with the database.
Fill in the user credentials of the sa user you setup in the database.
As Data source name use the name of your ODBC connection.



In the Device tag settings:
Add one tag named InsertData with three components : Insert(GB200), InsertCompl(GB201), Value(GD0) as it is below:


In the Job settings:
Add new job : NewJob1 with the Trigger 1: Value monitoring startup. As monitored component use: InsertData->Insert component.
In actions click Add button to add Insert action.


When action pop-up opens please add the settings as on the below screen.
Action type: Insert,
Database: MESDB (your sql db),
Table name: MESTABLE (your sql table),
As the Field name use the name of column from your sql table,
As tag with value use created tag : InsertData->Value.


Send project to the GOT.
Now you can test your job by setting bit GB200 ON you will send value from GD0 to sql table into value column.

CAUTIONS

1. Keep the same architecture (32-bit or 64-bit) for the ODBC connection as for the DB connection service setting tool.
2. You can use the same ODBC connection for multiple devices or create separate ones.
3. Make a sure that during setup ODBC connection you are using right driver for your database version.
    • Related Articles

    • Sample GOT screens for robot control (FR Series, CR800-D), Full Project

      An official sample GOT2000 project for robot FR Series (CR800-D controller) controlling and monitoring System configuration: Project contains follwing screens: Robot operation Position Edit JOG control HAND control Variable edit Load level monitor ...
    • GT Designer3 ANDON function settings

      This is specification of ANDON function. The document describes how to set got mobile function, which is necessary to run ANDON function. In the next section connection ANDON with SQL Database is provided Summary: The ANDON function enables a ...
    • GOT1000 - Show and hide objects in a GOT HMI project

      Summary:  This document describes how to hide and show objects in GOT1000 depending on bit state. The solution is based on using object scripts  The solution of hiding and showing objects is presented step by step below: Introduction Under certain ...
    • Robot error information on GOT

      Document describe how to monitor error code using GOT. 1. Comminication settings Establish standard ethernet communication between robot and GOT. Setup communication driver for robot. We use Extended memmory for data transfer. Refresh time of data is ...
    • MAILAB - Acquiring dataset from the MS SQL database

      Summary: this document describes how to connect to database in MAILAB AI and gain data from tables to Data Sets This feature is available for version 1.04E and later Open Mialab (1) and start the project (2) Go to Data Set tab (1) and add new dataset ...