PCGU1000 dll problem

There seem to be no difference between the SWEEP SQUARE and the SWEEP SINE function. The parameter has no effect. Not only the GUI is sine also the wave is sine.
The PCG10 works fine but the PCGU1000 doesn’t work.

It seems that you are either running the PCGU1000 function generator from the PcLab2000SE user interface or one parameter is missing from your SetSweep DLL function call.

[quote]SetSweep
Syntax
procedure SetSweep(freq1, freq2, ampl, offset, [color=blue]time: Single; form:
Longint[/color]);
Parameters
freq1: Sweep start frequency in Hz.
freq2: Sweep stop frequency in Hz.
ampl: Peak-to-peak amplitude in volts.
offset: DC offset in volts.
[color=blue]time: Sweep time in seconds.
form: Sweep waveform type: 1=sine, 2=square[/color].[/quote]

The PcLab2000SE program is not yet updated for square wave sweep.
The square wave sweep is only in the stand-alone program FGU.EXE included to the fgulink_rev2.zip.
The instructions are in the FGULink_DLL.PDF included also to the fgulink_rev2.zip:

[quote]Using the DLL in Visual Basic

  1. Extract all the files from the FGULink_Demo_VB.zip to a folder.
  2. Run FGU.EXE (starts the Function Generator user interface).
  3. Run the FGULink_demo.VBP project or your own VB project.
  4. You can control the function generator from the VB.[/quote]

[quote]Using the DLL in Delphi

  1. Extract all the files from the FGULink_Demo_Delphi.zip to a folder.
  2. Run FGU.EXE (starts the Function Generator user interface).
  3. Run the FGULink_demo.DPR project or your own Delphi project.
  4. You can control the function generator from the Delphi. [/quote]

I started the PCLab Software instead of the FGU.exe. That was the problem. Now I think everything works best.

Hi, I am totally beginner in PC instruments.I bought PCGU1000, but unfortunately CD included in the box was damaged. From where can I download USB driver for PCGU1000, because it is not possible from Velleman download site ? Thank you in advance!

The driver is now sent to you via email.

Hello.

I built VB code with Visual Studio 2005. But it does not work. The DLL seems pretty straightforward but I just can’t get it working. Does this DLL work with Visual Studio 2005?

Here is what I did.

StartGen()

Dim iFunc As Long = 1
Dim sFreq As Short = 1000
Dim sAmp As Short = 5
Dim sOff As Short = 0.1

SetGen(iFunc, sFreq, sAmp, sOff)

Thanks.

Copy the FGLINK.dll to windows system32 folder (maybe ok).
You have manually run FG.EXE if you do not run it from within your program.

The only error may be this:
Dim iFunc As [color=red]Long[/color] = 1
Must be changed to
Dim iFunc As [color=blue]Integer [/color]= 1

The VB6 “As Long” must be changed to “As Integer” in VB 2005, VB.NET and 2008 etc.

I tested this code and it works fine:

[code]Public Class Form1
Private Declare Sub SetGen Lib "FGLink.dll " (ByVal func As Integer, ByVal freq As Single, ByVal ampl As Single, ByVal offset As Single)
Private Declare Sub StartGen Lib "FGLink.dll " ()
Private Declare Sub StopGen Lib "FGLink.dll " ()

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    StartGen()
    Dim iFunc As Integer = 1
    Dim sFreq As Short = 500
    Dim sAmp As Short = 4
    Dim sOff As Short = 1
    SetGen(iFunc, sFreq, sAmp, sOff)
End Sub

End Class[/code]

It is what I did and still doesn’t work.

I copied and pasted the following file to windows system32:
PCGU1000Link.dll

You say FGLink.dll. But it is PCGU1000Link.dll to me. Is this right?

Or can you send me the .zip file which contains everything I need? Thank you.

Sorry, I put the wrong example code, it was for the PCG10.

Maybe you have to add some delay after the StartGen() before the SetGen(…).
You may test it by putting these functions to separate button procedures.

You may download from velleman.be/be/en/download/files/ the file fgulink_rev3.zip
“FGUlink pack. DLL for making your own software using our PCGU1000 generator (Rev3 22/10/2007)”.

Extract it to a separate folder. Copy the FGULINK.dll to system32 folder.

This package contains example for the VB6. You may use it as the starting point.

Run FGU.exe and then run the FGULink_demo.exe to control the generator.

Please,help me. I have a question:
Is it possible to initialize and work with the PCGU1000 without using the FGU.exe file? Is there any function in some .dll files which initializes the PCGU1000?
Thank you.

Sorry, no such a DLL available.
You have to use the .exe file.

Thank You.