1 confidential © omron nj5 sql connection for sql databases jan 23 rd 2014 johnston hall omron...

14
1 Confidential © Omron NJ5 SQL Connection for SQL Databases Jan 23 rd 2014 Johnston Hall Omron Automation and Safety

Upload: charla-horn

Post on 26-Dec-2015

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Confidential © Omron NJ5 SQL Connection for SQL Databases Jan 23 rd 2014 Johnston Hall Omron Automation and Safety

1Confidential © Omron

NJ5 SQLConnection for SQL Databases

Jan 23rd 2014

Johnston Hall

Omron Automation and Safety

Page 2: 1 Confidential © Omron NJ5 SQL Connection for SQL Databases Jan 23 rd 2014 Johnston Hall Omron Automation and Safety

2Confidential © Omron

NJ SQL has SQL Client Software

Built-in Database Connectivity allows the NJ SQL to directly read and write data to a SQL database.

Ethernet

NJ5-1320/1420/1520

SQL running on a server

Page 3: 1 Confidential © Omron NJ5 SQL Connection for SQL Databases Jan 23 rd 2014 Johnston Hall Omron Automation and Safety

3Confidential © Omron

Eliminates Middleware

No Middleware/PC

◦ No PC Maintenance

◦ Faster – Insert as fast as 20ms

Before

After

Page 4: 1 Confidential © Omron NJ5 SQL Connection for SQL Databases Jan 23 rd 2014 Johnston Hall Omron Automation and Safety

4Confidential © Omron

Supports Most Popular SQL Databases

Works with:• Oracle Database from Oracle Corporation• SQL Server from Microsoft Corporation.• MySQL from Oracle (Community Edition)• IBM DB2 for Linux, Unix, and Windows• Firebird 2.1, 2.5

Page 5: 1 Confidential © Omron NJ5 SQL Connection for SQL Databases Jan 23 rd 2014 Johnston Hall Omron Automation and Safety

5Confidential © Omron

New Simple SQL Instructions

Easy SQL Language Instructions to append, insert, update, or delete data.

Page 6: 1 Confidential © Omron NJ5 SQL Connection for SQL Databases Jan 23 rd 2014 Johnston Hall Omron Automation and Safety

6Confidential © Omron

Advanced Debugging

NJ will log SQL events and errors to it’s SD card for debugging.

Page 7: 1 Confidential © Omron NJ5 SQL Connection for SQL Databases Jan 23 rd 2014 Johnston Hall Omron Automation and Safety

7Confidential © Omron

Data Saving Spooling Feature

In the event of communication loss to the SQL server, data will be spooled in battery backed memory.• 1 Mbyte of battery backed spooling memory• Auto or manual resend of data

Ethernet

Internal Spool

Page 8: 1 Confidential © Omron NJ5 SQL Connection for SQL Databases Jan 23 rd 2014 Johnston Hall Omron Automation and Safety

8Confidential © Omron

Getting Started in 4 easy steps?

Page 9: 1 Confidential © Omron NJ5 SQL Connection for SQL Databases Jan 23 rd 2014 Johnston Hall Omron Automation and Safety

9Confidential © Omron

Configure your Connections

Easy to configure connection screen with test button.

Page 10: 1 Confidential © Omron NJ5 SQL Connection for SQL Databases Jan 23 rd 2014 Johnston Hall Omron Automation and Safety

10Confidential © Omron

Use DB_Connect to Connect to Database

The DB_Connect and DB_Close instructions make it easy to log into and out of the database.

The SQL_DBConnection variable is used with all the other instructions to indicate which connection to use.

Page 11: 1 Confidential © Omron NJ5 SQL Connection for SQL Databases Jan 23 rd 2014 Johnston Hall Omron Automation and Safety

11Confidential © Omron

DB_CreatMapping to point to table and fields.

• Tablename is used to specify the table• MapVar is the variable you want to send• The Mapvar variable’s structure specifies the fields

The DB_CreateMapping instruction specifies the database “table” to be used, the variable to be mapped to the fields, and if this vaiable is to be an insert (_DBC_SQLTYPE_INSERT), select (_DBC_SQLTYPE_SELECT), update or delete.

Specify the table name

Create a variable for the data. The data “type” is a structure that matches the field names of the table. Up to 1000 fields.

You do not have to specify all the fields in a table – just the ones you want to use. The Select statement uses an array variable for the multiple records in the answer.

Page 12: 1 Confidential © Omron NJ5 SQL Connection for SQL Databases Jan 23 rd 2014 Johnston Hall Omron Automation and Safety

12Confidential © Omron

Four new Instructions to move Data

• DB_Insert• DB_Delete• DB_Select• DB_Update (write on top of existing data)

Page 13: 1 Confidential © Omron NJ5 SQL Connection for SQL Databases Jan 23 rd 2014 Johnston Hall Omron Automation and Safety

13Confidential © Omron

Notes

• Up to 32 database instructions can be used at one time.

• The “DB_Select” instruction supports wild cards and Correlated Subqueries

Page 14: 1 Confidential © Omron NJ5 SQL Connection for SQL Databases Jan 23 rd 2014 Johnston Hall Omron Automation and Safety

14Confidential © Omron

All NJ’s Get FTP Client

NJ Stores data to SD cardNJ Sends file to FTP server

Computer asks for file

Old• NJ has FTP server• Computer has to figure out when to get file.

New• NJ has FTP client also• Sends or gets file using FTP, computer has FTP server