Data acquisition to microsoft excel, 2 data acquisition to microsoft excel – Velleman PCSU1000 DSO User Manual
Page 21

Data Transfer
20
© 2005 ... Velleman
3.2
Data acquisition to Microsoft Excel
Pc-Lab2000 software package includes a DLL (Dynamic Link Library) DSOLink.DLL, installed to
Windows' SYSTEM32 folder.
This DLL allows you to write custom applications in Excel, Visual Basic, Delphi or any other 32-bit
Windows application development tool that supports calls to a DLL.
Transferring Waveform Data to an Excel Spreadsheet
The example Excel macro shows you how to collect data directly into the spreadsheet from the
Velleman PC oscilloscopes without the need for other software.
1.
Open Microsoft Excel and start a new workbook document.
2.
Select the View / Toolbars Menu and Select Forms.
·
The Forms toolbar appears.
3.
Create a Button
·
In the Forms toolbar click on the "Button" button: the mouse-pointer will become a small
cross.
·
On Excel worksheet, use the mouse to draw a rectangle to mark where you want your
button to appear.
·
When you release the mouse after drawing the rectangle the "Assign Macro" dialog-box
will appear.
4.
Type Macro name: ReadAll and click New button.
·
Microsoft Visual Basic edit window will open. A subroutine called ReadAll has been
created.
5.
Substitute the default text:
Sub
ReadAll()
End
Sub
with the following text in the edit window:
(Use Copy and Paste.)
Option
Explicit
Dim
DataBuffer1(0
To
5000)
As
Long
Dim
DataBuffer2(0
To
5000)
As
Long
Private
Declare
Sub
ReadCh1
Lib
"DSOLink.dll " (Buffer
As
Long
)
Private
Declare
Sub
ReadCh2
Lib
"DSOLink.dll " (Buffer
As
Long
)