Test and Measurement Forum

UNDERSTAND & USE SDK EXCEL FILES in 60 MINUTES FLAT

Post your VB and VBA discussions here

UNDERSTAND & USE SDK EXCEL FILES in 60 MINUTES FLAT

Postby Glovisol » Wed Dec 16, 2015 7:55 pm

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:

DrDAQ EXCEL MOD.1.jpg
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 64 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 51 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 56 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: 114
Joined: Sat May 11, 2013 10:03 am
Location: San Marzano Oliveto, Asti, Italy

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

Postby Glovisol » Thu Dec 17, 2015 8:21 am

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.

DrDAQ EXCEL MOD. 2.jpg
We now have a 100" display


8.Correction to DrDAQ SDK modified example.doc
.DOC file showing the modification
(27 KiB) Downloaded 52 times


Channels 4+10-graph- 100'' USBDrDAQ.xls
Modified SDK Excel file
(57.5 KiB) Downloaded 58 times
Glovisol
Advanced User
Advanced User
 
Posts: 114
Joined: Sat May 11, 2013 10:03 am
Location: San Marzano Oliveto, Asti, Italy


Return to VB and VBA (Excel, Access)

Who is online

Users browsing this forum: No registered users and 1 guest