PCSU1000: acquisition with Microsoft EXCEL

Hi,

I recently acquired your company’s PCSU1000 oscilloscope and I have several problems :

  • I want to control it with Microsoft EXCEL and I use procedure of the PCSU1000D_DLL datasheet but only the line “RunOn” run when PCLAB2000 is previously started and when the line “Start_PCSU1000” is disabled. What are my errors ?
    Visual Basic Program:

Sub Test()
Start_PCSU1000
Show_PCSU1000 (True)
YPosition1 0
Voltage1 1
Time 1
TrgLevel 0
TrgSource 0
TrgEdge 1
Coupling1 0
RunOn 1
End Sub

  • How can I acquire the Frequencies of my signal with Microsoft Excel ?

  • I measure a signal of 50Vpp but the scale voltage is 8 divisions and the greatest Volts/div value is 2V/div so the max vertical scale equalize 16V. Can i acquire in full my signal with Microsoft Excel and without an attenuation probe?

The scope starts automatically with the instruction Start_PCSU1000.
You do not have to start it manually from PCLAB2000.

As default the scope is visible.
Remove “Show_PCSU1000 (True)”. It seems to hide the scope.

If you want to hide and show the scope use:
Show_PCSU1000 0
Show_PCSU1000 1

Only the signal visible on the scope screen (16Vpp) can be acquired.

Thanks for your response.

But the instruction “Start_PCSU1000” is not found in the DLL PCSU1000D.dll. And, when PCLab2000 run, the other instructions don’t run except “RunOn”.

Can I acquire the Frequencies in Microsoft EXCEL ? The value can it more precise that with PCLab2000, at the hundredth by example ?

To get the PCSU1000 running from within Excel you have to copy the PCSU1000.BIT file to the My Document folder.
If you downloaded the latest PC-Lab2000SE v3.07 then you should have the PCSU1000D.DLL dated 21/2/2007 in your Windows\SYSTEM32 folder and it contains the Start_PCSU1000.

See also the following threads:
[forum.vellemanprojects.eu/t/pcsu1000-and-i-o-error-103/1247/1)
[forum.vellemanprojects.eu/t/pcsu1000d-dll-and-borland-c-buidler/578/1)

Here is an example code and the screenshot from Excel:

Option Explicit Dim DataBuffer1(0 To 5000) As Long Dim DataBuffer2(0 To 5000) As Long Dim SettingsArray(0 To 10) As Long Private Declare Sub ReadCh1 Lib "DSOLink.dll" (Buffer As Long) Private Declare Sub ReadCh2 Lib "DSOLink.dll" (Buffer As Long) Private Declare Function DataReady Lib "DSOLink.dll" () As Boolean Private Declare Sub Voltage1 Lib "PCSU1000D.dll" (ByVal Volts As Long) Private Declare Sub Voltage2 Lib "PCSU1000D.dll" (ByVal Volts As Long) Private Declare Sub Time Lib "PCSU1000D.dll" (ByVal Rate As Long) Private Declare Sub RunOn Lib "PCSU1000D.dll" (ByVal Run_On As Long) Private Declare Sub SingleOn Lib "PCSU1000D.dll" (ByVal Single_on As Long) Private Declare Sub YPosition1 Lib "PCSU1000D.dll" (ByVal y_pos As Long) Private Declare Sub YPosition2 Lib "PCSU1000D.dll" (ByVal y_pos As Long) Private Declare Sub TrgOn Lib "PCSU1000D.dll" (ByVal trg_on As Long) Private Declare Sub TrgLevel Lib "PCSU1000D.dll" (ByVal TrgLevel As Long) Private Declare Sub TrgSource Lib "PCSU1000D.dll" (ByVal TrgLevel As Long) Private Declare Sub TrgEdge Lib "PCSU1000D.dll" (ByVal Positive_Negative As Long) Private Declare Sub Coupling1 Lib "PCSU1000D.dll" (ByVal AC_DC_GND As Long) Private Declare Sub Coupling2 Lib "PCSU1000D.dll" (ByVal AC_DC_GND As Long) Private Declare Sub Show_PCSU1000 Lib "PCSU1000D.dll" (ByVal Visible As Long) Private Declare Sub Start_PCSU1000 Lib "PCSU1000D.dll" () Private Declare Sub Stop_PCSU1000 Lib "PCSU1000D.dll" () Private Declare Function GetSettings Lib "PCSU1000D.dll" (SettingsArray As Long) As Boolean Sub Start() Start_PCSU1000 End Sub Sub Quit() Stop_PCSU1000 End Sub Sub Show() Show_PCSU1000 1 End Sub Sub Hide() Show_PCSU1000 0 End Sub Sub Settings() YPosition1 0 Voltage1 1 Time 1 TrgLevel 0 TrgSource 0 TrgEdge 1 Coupling1 0 End Sub Sub Run_On() RunOn 1 End Sub Sub Run_Off() RunOn 0 End Sub Sub Read_Data() Dim i As Long ReadCh1 DataBuffer1(0) ReadCh2 DataBuffer2(0) With ActiveSheet For i = 0 To 99 .Cells(i + 1, 2) = DataBuffer1(i) .Cells(i + 1, 3) = DataBuffer2(i) Next i End With End Sub

The valid data starts from cells B5 (CH1) and C5 (CH2).
In this example is no the frequency counting routine as you requested. Maybe you can do it when you first succeed to get the data to the Excel cells…

can u post the exel file compleated thx!!!

You can now download the Excel file from: vel255.diinoweb.com/files/PCSU1000_test.xls

Thx very much!!

Thanks for your answers and the Excel file.

I installed PC-Lab2000SE V3.07. But, with your program, when I activate “start” it do anything, and when I activate another function, Excel bug and not responding. With Windows 98 Excel 2000, and with Windows XP Excel 97.

And could you say me if I can acquire the Frequencies in Microsoft EXCEL ? The value can it more precise that with PCLab2000, at the hundredth by example ? I must know if it is possible please.

Strange that you can’t get the software running from within Excel.
Does it work OK if you start the PCSU1000 manually from the PCLAB2000SE interface?
There is no frequency link from the oscilloscope to the Excel. Only the raw channel data and the settings can be read.

I succeeded to execute the file when I disabled the automatic calcul of Excel. Else EXCEL bug and not responding.

Thanks for informetion and the file.

Strange that you had to disable the automatic calculation…
Here is how you can change the calculation to manual before the PCSU1000 starts and turn it back to automatic after closing the PCSU1000:

Sub Start() With Application .Calculation = xlManual End With Start_PCSU1000 End Sub Sub Quit() Stop_PCSU1000 With Application .Calculation = xlAutomatic End With End Sub

Thx very much, my program function very well.