It is possible for iChart to save data to an external database, such as Access, MySQL and SQL, using a standard called ODBC.

1. Open the project in iChart (.icr file) that will have the database connection.

2. Click Project | ODBC | Setup Database.

3. Click Yes on the dialog box that appears. The ODBC Setup window should open.

ODBC Setup

Figure 1: ODBC Setup window

 

4. In the ODBC Setup window, select the desired database using the dropdown menu. Note the “Enable” box must be checked to make changes.

5. Click New. The Select Data Source window should appear.

Select Data Source

Figure 2: Select Data Source

 

6. Click the Machine Data Source tab.

7. Double-click on the Data Source Name to connect. Note that this name should be the same database selected in step 4. The Select Database window should appear.

Select Database

Figure 3: Select Database

 

8. Select the file associated with the database connection. Note that it’s important to make sure the file is in the correct directory before attempting a connection.

9. Click OK. The ODBC Setup window should populate with the database connection information.

ODBC Setup window

Figure 4: ODBC Setup

 

10. Click OK. The external database connection has been established.

 

Additional information on database structure:

iChart creates three tables and a data table for every device. The three tables have a fixed structure and are labeled  “_DevDesc,” “_DevDir,” and “_DevNote.”

The data table is labeled “_DevData_ID” where “ID” is the number that appears in the square brackets ([ ]) after the datalogger in the project. The columns vary depending on the number of parameters for the device. Each parameter column has the follow naming convention: P_0xAAAAAAAA_BBB where the A’s are the parameter ID assigned by iChart and B’s are the position number of parameter under its parent device.

 

Example Table Structure:

This example has two devices. The first device has three parameters and the second has two.

_DevNote

  • ID
  • _Time
  • _NoteType
  • _Detail

_DevDir

  • ID
  • _DevUnique
  • _DevID
  • _Desc
  • _NumParm
  • _Note

_DevDesc

  • ID
  • _DevUnique
  • _ParmNo
  • _ParmNID
  • _ParmName
  • _ParmUnit
  • _UnitName
  • _ParmType
  • _TypeName
  • _LoRange
  • _HiRange
  • _Mfg
  • _Model
  • _Note

_DevData_1

  • ID
  • _DevUnique
  • _Time
  • _P0x000A0000_001
  • _P0x000B0000_002
  • _P0x000C0000_003
  • _Note

_DevData_2

  • ID
  • _DevUnique
  • _Time
  • _P0x00010000_001
  • _P0x00020000_002
  • _Note

 

Warning:  Do not delete parameters from iChart. Doing so will cause iChart to create additional columns in the “_DevData_X” table with the same parameter ID but a different position number.

Take the “_DevData_1” table below. If the parameter with the column name “_P0x000B0000_002” is removed from iChart, “P0x000C0000_03” would take its place and “P0x000C0000_002” would be added to the table.

Example change after deleting an iChart parameter:

Before:

_DevData_1

  • ID
  • _DevUnique
  • _Time
  • _P0x000A0000_001
  • _P0x000B0000_002
  • _P0x000C0000_003
  • _Note

After:

_DevData_1

  • ID
  • _DevUnique
  • _Time
  • _P0x000A0000_001
  • _P0x000B0000_002
  • _P0x000C0000_003
  • _Note
  • _P0x000C0000_002

 

REV: 13C29

Leave a Reply

Your email address will not be published. Required fields are marked *