Thank you.
I created the following as a header file. Using this seems to be giving me good results (Microsoft Visual C++ 2010 Express under XP SP3).
#using <mscorlib.dll>
using namespace System::Runtime::InteropServices;
// for DllImportAttribute
namespace PCSGU250DLL
{
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern bool Start_PCSGU250();
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void Stop_PCSGU250();
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void Show_PCSGU250(int Visible);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void RunOn(int Run_on);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void SingleOn(int Single_on);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void Voltage1(int Volts);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void Voltage2(int Volts);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void Time(int Rate);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void Coupling1(int AC_DC_GND);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void Coupling2(int AC_DC_GND);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void TrgLevel(int Trg_Level);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void YPosition1(int y_pos);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void YPosition2(int y_pos);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void TrgOn(int trg_on);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void TrgEdge(int Positive_Negative);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void TrgSource(int Trg_Source);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern bool GetSettings(int* SettingsArray);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void ReadCh1(int* Buffer);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void ReadCh2(int* Buffer);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern bool DataReady();
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void StartGen();
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void StopGen();
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void SetGen(int func, float freq, float ampl, float offset);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void SetLibWave(float freq, float ampl, float offset, char* filename);
[DllImport("PCSGU250.dll", CharSet=CharSet::Ansi)] extern void SetSweep(float freq1, float freq2, float ampl, float offset, float time);
}
Now I have some more questions please:
I want to measure an impedance (DUT), which I will drive from the function generator output via a known source impedance with the generator output connected directly back to the channel 2 input and the voltage across the DUT being measured on channel 1. I need to calculate the voltage difference between the two channels.
What is the relative timing of the sampled data for channels 1 and 2? Are both channels sampled simultaneously?
Is it possible to access the built-in Math functions (under the Math menu?) If so, do these functions take account of any difference in the sample timing?
Is it possible to read back any of the calculated Waveform Parameters?
Is there a way to check if the PCGSU250 is connected to the PC?
Is there a way to set the Probe x1 x10 options?
Is there a way to switch the oscilloscope channels on and off?
Many thanks.