Hello,
I want to develop an application to use the built-in signal generator of the mentioned device in VB.Net. The code for activation of the generator works fine but I did not find any possibility to turn it off again without disconnecting the device.
The old programming guide to the 3000 series tells that setting the frequency to 0 should turn of the signal gen but with the ps3000a.dll and the new pg this seems not to work any longer. Does anybody have any suggestions for pausing or stopping the signal generator while staying connected with the scope?
I am posting the code I am using at the moment to turn on the generator. Maybe I am doing something wrong.
Private Shared Function SetSignalGenerator(amplitude As UInteger, waveType As Short, frequency As Single) As Short
Dim ampPP As UInteger = amplitude
Dim wType As Short = waveType
Dim offsetV As Integer = 0
Dim incr As Single = 0.0F
Dim dwellT As Single = 0.0F
Dim swType As Short = Nothing
Dim whiteN As Short = 0
Dim shts As UInteger = 0
Dim swps As UInteger = 0
Dim trigTp As Short = SignalGeneratorTriggerType.GateHigh
Dim trigSrce As Short = SignalGeneratorTriggerSource.None
Dim extInThr As Short = 1000
Return DriverHandling.SetSignalGenerator(_handle, offsetV, ampPP, wType, frequency, frequency, incr, dwellT, swType, whiteN, shts, swps, trigTp, trigSrce, extInThr)
End Function
it worked! Great! I already had the idea to set the pkToPk value to 0 but with a square wave I got an error code from the scope. In an other thread somebody wrote that the value has to be always between 500mV und 4V that is why I thought that these values are always the same for each type of wave. It seems to me that the value depends directly from the wave type but I did not found anything about that in the programming guide. Without setting the wave to DC_Voltage turning off the generator did not work.