DB DATA READ/WRITE Communication Driver is the driver to read/write from database such as SQL Server, ORACLE, etc.
Note) You have to set chapter 3's contents(by using DB_DATA_RW.exe program) in order to use 'DB DATA READ/WRITE' communication driver.
<Figure 1> is read setting example of DB DATA READ/WRITE communication driver.
<Figure 1> Read setting example of DB DATA READ/WRITE communication driver |
Device part of <Figure 1> input device type(fixed to 'SharedMemory'), memory name(SharedName ) respectively.
DB DATA READ/WRITE communication driver¡¯s read schedule
Read schedule setting parameters are as follows:
1) Table name – Input table name of database.
2) Column name / search 'Where' clause or 'Where' character file number – Input column name / search 'Where' clause or 'Where' clause file number, separated by dot( . )
( If don't use 'Where' clause, input column name only )
3) Read type – 0 = read the current value,
1 = read the historical(old saved) database value,
2 = read the current value by using saved 'Where' clause,
3 = read the historical(old saved) database value by using saved 'Where' clause,
4) Save start address for Communication Server – Saving start address of Communication Server.
5) Read Size – read the current value ( read type = 0 ) = 1 ~ 1980,
read the historical(old saved) database value ( read type = 1 ) = 1 ~ ,
read the current value by using saved 'Where' clause ( read type = 2 ) = 1 ~ 1980,
read the historical(old saved) database value by using saved 'Where' clause ( read type = 3 ) = 1 ~,
Read schedule example)
FLOAT, SYSTEM.REAL1, Curr, 0, 0, 50,
FLOAT, SYSTEM.DTB2MDIF, RWL.DAMCD='7777777', 1, 50, 1,
FLOAT, SYSTEM.DTB2MDIF, RWL.DAMCD='3333333', 1, 51, 1,
FLOAT, SYSTEM.REAL1, Curr.1, 2, 100, 1,
FLOAT, SYSTEM.REAL1, RWL.2, 3, 200, 1,
<Table 1> is read schedule example of DB DATA READ/WRITE communication driver.
READ | Table name | Column name / search 'Where' clause or 'Where' clause file number | Read type | Save start address | Read Size |
FLOAT, | SYSTEM.REAL1, | Curr, | 0, | 0, | 50, |
FLOAT, | SYSTEM.DTB2MDIF, | RWL.DAMCD=¡¯7777777¡¯, | 1, | 50, | 1, |
FLOAT, | SYSTEM.DTB2MDIF, | RWL.DAMCD=¡¯3333333¡¯, | 1, | 51, | 1, |
FLOAT, | SYSTEM.REAL1, | Curr.1, | 2, | 100, | 1, |
FLOAT, | SYSTEM.REAL1, | RWL.2, | 3, | 200, | 1, |
<Table 1> Read schedule example of DB DATA READ/WRITE communication driver |
Note) The column name and 'Where' clause file name is ¡®work folder\SCAN\whereDefine0000 ~ 9999.ini.
Therefore, input column name and 'Where' clause file name number = 0 ~ 9999.
If you don't input 'Column name / search Where clause or Where clause file number'(blank), communication driver read data 'the entered column name'.
The input methods of column name and Where clause
Where clause input methods are as follows:
1) Where clause file name is ¡®work folder\SCAN\whereDefine0000 ~ 9999.ini.
2) Input one column name and Where clause at one line.
3) Input 'column name', 'Where clause', separated by comma( , ).
4) When you want to input 2 or more 'Where condition', use '&' character. (separated by '&' character, max 9 character )
5) Do not input 'quotes( ' )' character for numeric value at normal Where clause.
6) Available column name, Where clause is 1 ~ 1980 line.
7) Input line equal read size.
8) If you don't input 'Column name / search Where clause or Where clause file number'(blank), communication driver read data 'the entered column name'.
example 1) Example of current value Table's Where clause
Curr, Tag=dir & WriteValue = 345 & bWriteRun = 123
Curr, Tag=push1 & WriteValue = 1 & bWriteRun = 4
Curr, Tag=push2 & WriteValue = 2 & bWriteRun = 5
Curr, Tag=push3 & WriteValue = 4 & bWriteRun = 6
example 2) Example of historical(old) data Table's Where clause
RWL, DAMCD=7777777 & IQTY = 1.000 & RSRT = 12345.678
RWL, DAMCD=2333333 & IQTY = 2.000
RWL, DAMCD=3433333 & IQTY = 3.000
RWL, DAMCD=4433333
If you click the icon in protocol option part, you can see the dialogue box such as <Figure 2>. you can also set read schedule by using this part.
<Figure 2> Example of DB DATA READ/WRITE communication driver¡¯s Option dialogue box |
You can set read schedule by using , , button and listbox of <Figure 2>.
<Figure 3> Example of DB DATA READ/WRITE communication driver¡¯s read schedule Add/Edit dialogue box |
When you click Add button or Edit button in dialogue box of <Figure 2>, dialogue box of <Figure 3> is shown.
DB DATA READ/WRITE communication driver don't support write settings.
You have to set 'DB_DATA_RW.exe' program to use DB DATA READ/WRITE communication driver.
Note) .NET Framework 1.1 or higher version is needed in order to use To use 'DB_DATA_RW.exe' program.
1) When you run 'DB_DATA_RW.exe' of 'program folder', will be seen <Figure 4> dialog.
2) Please select 'DSN name' at combo list of <Figure 4>.
3) When you click 'DB connection string setting' button, appears <Figure 5> dialog box. You can add, modify and delete at <Figure 5>.
4) When you click 'Add' or 'Edit' button at <Figure 5>, appears <Figure 6> dialog box. At <Figure 6> dialog box, you can set title of DSN, database type, Connection String.
5) Input 'Share Data Name' at <Figure 4> and set 'memory name' at device setting such <Figure 1>.
6) Input tag column name and value column name to read database's current value.
7) Also input data saved time column name to read database's historical(old) value.
<Figure 4> Example of DB_DATA_RW.exe program |
<Figure 5> Example of DB Connection String Setting dialog |
<Figure 6> Example of DB Connection String add dialog |
Download of DB_DATA_RW.exe) ZIP file or execution file