DASYLab ODBC Setup

advertisement
DASYLab ODBC Setup
ODBC to EXCEL worksheet
June 8,2000
DASYLab V5.5 implemented a new data communication module, ODBC Input and
Output, to receive and send global variables and strings to databases. In addition to
products like MS Access, you can use MS Excel if you have installed the ODBC manager
software available with most Microsoft products.
1) Create an Excel worksheet
2) Write click on the Name Tags to create a new name for the sheets you wish to
send the data to. (Fig 1)
3) Enter “Titles” at the top of each column you wish to place data into.
4) Save and Close the File.
5) Enter the Windows Control Panel; open the Data Sources (ODBC).
6) Click the ADD button
7) Select a Microsoft Excel Driver (Fig 2)
8) Click Finish.
9) Click “Select WorkBook” and select the previously saved Excel workbook.
10) Type in a user description.
11) Click on “Options”
12) Turn OFF Read Only (Fig 3)
13) Click OK until you are back at the control panel. Close the Control Panel.
14) Start DASYLab.
15) Place an ODBC output module on your worksheet.
16) Access the properties of the ODBC output module.
17) Next to “Name” click on Browse and select the name of the Excel then click OK
(fig 4)
18) Next to “Table” click on Browse and select the name of the Excel Table you wish
to place data into and then click OK.
19) Click the “Get Columns” button to retrieve the list of columns you entered in at
step 3.
20) In turn, click on the now listed columns and enter the associated variable.
21) Start DASYLab.
The data must be placed into a Global Variable in order for the ODBC to send the data.
In order to place the data into a Global Variable you must use the [Latch] module with
the latch to global variable option. Within this module you may set which global variable
you wish to use.
To reference this variable use the format ${VAR_XX}, where XX is the number of the
variable you wish to reference. Global string may also be used, to reference these use the
${STR_XX}, where XX is the number of the string you wish to use.
There are also predefined global string, such as time and data, ${DATETIME}.
An [Action] module must also be included in order to cause the ODBC to transfer the
variables or strings. The action module should have the following settings; Event: Global
Variable Changed, Variable Nr: The number of the global variable you wish to write,
Module: ODBC Out, Action: Write to database. The action module may be connected to
any line in your worksheet.
Download