UNDERSTAND & USE SDK EXCEL FILES in 60 MINUTES FLAT

Post your VB and VBA discussions here
Post Reply
Glovisol
Advanced User
Advanced User
Posts: 0
Joined: Sat May 11, 2013 10:03 am
Location: San Marzano Oliveto, Asti, Italy

UNDERSTAND & USE SDK EXCEL FILES in 60 MINUTES FLAT

Post by Glovisol »

HOW TO PULL THE STRINGS OF THE VB EXCEL SDK FILE ACCORDING TO ONE'S NEEDS

NOTE: I apologise if what follows is too basic and down to earth, but I think there is a lot of guys out there who do not know anything about VB, but could happily use it if they knew how. Furthermore, if one understands THIS SDK, most probably will understand them all.

In this post we shall first understand how the DrDAQ SDK VB Excel file works and then modify (edit) it according to the list shown below.

ORIGINAL EXCEL FILE
Reading time: 1 sec.
Number of data vaues for each channel: 100.
No. of channels: 10 (all available in the USB DrDAQ).
Graph: no graph.

MODIFIED FILE
Reading time: 90 sec.
Numbero of data values for each channel: 10.
No. of channels 4: EXT. 1 - EXT. 2 - EXT. 3 - TEMPERATURE
Graph: the Excel file will collect the data read over a period of 90 seconds and plot Temperature Vs. Time.

Here is the PC screen showing the result:
Modified file to read 4 channels in 90'' & graph temperature
Modified file to read 4 channels in 90'' & graph temperature
To understand the Macro, first get hold of the standard USB DRDAQ Excel file and open it. Then follow the path: TOOLS - MACRO and click VISUAL BASIC EDITOR. The entire script will appear. I have copied this script on the .DOC file below to describe the meaning of the various entries. Lettering in blue is for descriptions. Download this file, print the text on paper and carefully compare it to the text on the Visual Basic Editor on the PC screen. All entries will become crystal clear to you.
6. DrDAQ SDK Excel File explained.doc
Explained Virtual Basic Script
(31 KiB) Downloaded 873 times
The next .DOC file shows the modified VB text copied from the modified EXcel file and is available for download below. Download, open and print it on paper. By comparing the two texts you will immediately see what and how it has been changed.
7.DrDAQ SDK modified example.doc
This is the modified VB text of the modified Excel file
(27 KiB) Downloaded 792 times
Finally the MODIFIED EXCEL FILE which reads 4 DrDAQ channels in 90" is available below.
Channels 4+10-graph-USBDrDAQ.xls
Modified SDK Excel file with graph
(57.5 KiB) Downloaded 801 times
In the next post we shall see how to prepare the file to obtain the instant graph.
Last edited by Glovisol on Thu Dec 17, 2015 8:39 am, edited 1 time in total.

Glovisol
Advanced User
Advanced User
Posts: 0
Joined: Sat May 11, 2013 10:03 am
Location: San Marzano Oliveto, Asti, Italy

Re: UNDERSTAND & USE SDK EXCEL FILES in 60 MINUTES FLAT

Post by Glovisol »

GOING FROM 90 to 100 SECONDS

The exercise is now to go from 90 to 100", e.g. add a row to the recovered data. Considering that we have the time zero row, to go to 100" we need 11 rows, so that the product becomes:
4 * 11 = 44.

I enclose all files to show this simple mod.
We now have a 100" display
We now have a 100" display
8.Correction to DrDAQ SDK modified example.doc
.DOC file showing the modification
(27 KiB) Downloaded 838 times
Channels 4+10-graph- 100'' USBDrDAQ.xls
Modified SDK Excel file
(57.5 KiB) Downloaded 938 times

Post Reply