Hi, I have my PS5000 connected to my PC. I'm using C# to program it. I need to do a simple test of generating a sine waveform (2 V-p-p, 1KHz, 1vdc offset), then sample the scope (Channel A) to read back the waveform. I can't find the correct function to import for generating the sine. Can anyone help me please? Is there an example for this kind of code? Thanks.

Hi,I was finaly able to generate a sine.Now, I looped the scope's output back to the input channel and I need to measure the V-p-p and maybe even all of the samples (read into a double[] buffer). Is it possible?I'm using the ps500a.dll.Thanks

The Software Development Kit contains examples for Block mode and Streaming mode captures (refer to the Programmer's Guide for further information on these modes) - these should be in the C:\PicoSDK\PS5000A\C# folder.

Once you have set up the channels and trigger, you can call the signal generator function prior to starting the data collection.

How long do you need to capture data for and at what sampling interval?

I'm using the Block sample to acquire the data. A Pulser waveform is injected via external Function Generator. The results I get are not reasonable (a buffer full of the same values). Can you point out the difference between the streaming and the block?

HiI am trying to generate the sine wave but I do not seen to have access to the signal generator functions as described in the API documentation. I have a PS5000 5244A and I believe my driver is ps5000A.dll (as described in the PS5000AImports.cs file) in my C# project.I was broswing the provided code and I can find streaming and blocking functions available but I couldn't find neither of the two functions related to the signal generator:

ps5000aSetSinGenBuiltIn(...)ps5000aSigGenSoftwareControl()

Do I need another driver or should I load or call another dll library?

Hi I am having a hard time finding the ps5000aApi.h file. Where is it located? I tried using windows find engine and looking in the program files directory but I don't seem to find that specific file. Am I missing something?

I was expecting a signal to be generated everytime I made this call through my interactive GUI. However nothing happens. I am not sure what I am missing. By the way, I have both channels enable for data collection and they are set to 1V range.

HiI did try calling both functions, ps5000aSetSigGenBuiltIn() and ps5000aSetSigGenBuiltInV2() as both signatures are present in my include file. I noticed one uses float definitions for its parameters while the other uses double definitions. They are both present in the ps5000aAPI.h file in my SDK/inc folder.

I can forsee activating this function using the software trigger in either generating single shots or continuosly running it. I might use the sweep option after I gain a bit of experience working with the dwell time.

I defined my functions following your example and looking at previous definitions in my import file. However when I call the function, it generates an error:

"A call to PInvoke function 'PS5000ABlockCapture! PS5000A.Imports::SetSigGenBuiltIn' has unbalalnced the stack. This is likely..."

I am not sure what I am doing wrong. Please notice my changes in the import file are enclosed with tags <CM SigGen> and </CM SigGen>.

I did try both ps5000aSetSigGenBuiltIn and ps5000aSetSigGenBuiltInV2 definitions but it did not work. To avoid the float/double definitions, I input the number directly into the functions as you saw in my attached file in my previous post.

I will try again tomorrow and I let you know if I get any changes on my side. Thanks for your assistance.