PCGU1000 attenuator

hi,
i’m useing the PCGU1000 for a labview 7 project. it works quite well.
but i really need the -40dB attenuator!
is there a other dll or perhaps an example vi which includes the use of the attenuator?
thanks
stefan

Sorry but the attenuator feature is not yet implemented in the DLL.
Will be done in the next release. (I hope ready in a couple of days.)

At the moment the latest and largest DLL can be download from: vel255.diinoweb.com/files/FGULink_update_1.zip

Please see the usage of the new features from the thread: forum.velleman.be/viewtopic.php? … b83e3de584

Now the attenuator function is added to the DLL.
The function name is AttOn and its declaration in Delphi is:
procedure AttOn(att: Boolean) ; stdcall; external ‘FGULink.dll’;

You may download the new software version from:
vel255.diinoweb.com/files/FGULink_update_2.zip

It includes the DLL, demo program and its source.

I need to be able to turn the attenuator on and off from Visual Basic 6.0. I found this thread and downloaded the new DLL but now none of the VB demo code commands work. When I run and cancel FGU.EXE the VB demo changes from Ready to Not Ready so VB is getting the status, but none of the commands now work. What is going on here?

Also, I will need to eventually compile the VB code into a single executable. How do I incorporate the functionality of FGU.EXE into my VB code? I do not want a panel on the screen which allows an operator to manually alter the generator settings.

I have read many posts where users have complained of intermittent problems with the PCGU100 and problems running on a Vista platform. This is a commercial application not a hobby project, so I need to know if the PCGU1000 and its associated software is solid. I don’t want to waste my time if it isn’t.

Sorry about the problems you encountered with the new DLL. There is some features added and the new DLL didn’t run correctly with the old VB6 demo.
Now the Visual Basic 6.0 demo is updated. You may download it from: vel255.diinoweb.com/files/FGULink_VB6_demo.zip
Extract the files to new folder.
Please copy the FGULINK.DLL to Windows system32 folder too.

There are added following functions:
OpenGen - to run the FGU.EXE from within your application
CloseGen - to close the FGU.EXE
GenStatus - to get info about the generator status
ShowGen - to show or hide the generator’s user interface
AttOn - to put the 40dB attenuator on or off

In the demo software click “Turn On Generator” button first

When you start FGU.exe from the demo program or from your application, the new GenStatus() function returns 0 until the “Loading” period of the generator is complete. After that period of time the GenStatus() function returns value 1 if everything OK. It returns -1 if the USB connection fails (cable disconnected) and -2 if the power adaptor is disconnected.

The original GenReady() function returns “Fail” if any of those failures occur. You may use either GenReady() or GenStatus() or both to check the generator’s operation status.

GenReady() and GenStatus() functions return the generator status about 1.5 seconds after every instruction sent to the generator. The previous generator state is returned until that if no instruction is sent. Please allow in your application for the generator that amount of time after the instruction to update the status using GenReady() and GenStatus() functions.

GenReady() will return 0 if you close the program manually without CloseGen().

Use Showgen(false) to hide the generator GUI.
The software remembers the ShowGen status next time.

In the FGen1000.ini there is now a parameter ShowGen=1. Change it to ShowGen=0 and the generator GUI will be always hidden.

Thank you for the assistance and the new files.
I have another question: I need to be able to smoothly increase the voltage of a 60Hz sinewave from approximately 0.45V to 1.50V over a period of about 15 seconds. Each time I address the generator the waveform stops then restarts which disrupts the rest of the system. Is there any way to smoothly increase or decrease the voltage without changing any other parameters or interrupting the waveform?

When the DLL is used to control the generator there is a signal break every time the new waveform settings are sent to the generator.
In normal generator mode there is no break but anyhow the waveform generation is disturbed for a short period of time. This is because every time the signal amplitude is changed a new waveform data is sent to the generator.

It seems that the continuous signal generation when the amplitude is changed is not possible.