Generating Sine using PS5000

Post your .Net discussions here
Hitesh

Re: Generating Sine using PS5000

Post by Hitesh »

Hi Cristian,

Please try the example attached below (it includes the PS5000AImports.cs file as well).
PS5000aSigGen.zip
PS5000a C# Project (VS2010 Express) - updated
(18.69 KiB) Downloaded 402 times
Regards,

cmos
Newbie
Posts: 0
Joined: Thu Apr 28, 2016 6:10 am

Re: Generating Sine using PS5000

Post by cmos »

Hi,
I tested with both signatures BuiltIn and BuiltInV2 and they do not throw any error anymore when using numbers directly. However, I cannot observe any signall from the Signal Generator output. I have tried choosing different shots/sweep values, diferent frequencies and triggering modes (even calling the software trigger) but I cannot get it to work. Is there a way to test the signal gen in a direct manner? I am using powering the device via USB. This is just a huntch, but could be limited by power consumption? I do not have an AC adaptor (The unit came without one) so I won't be able to test this idea. I have seen issues with USB power before which makes me think it could be also affecting the operation of this output.

It would be great o get it working.

Cheers,

Cristian

Hitesh

Re: Generating Sine using PS5000

Post by Hitesh »

Hi Cristian,

Are you calling the ps5000aChangePowerSource() function after ps5000aOpenUnit() to tell the driver that you wish to use the device powered by the USB connection?

This is what the example above does.

Edit: I've made an update to the example to handle the power change correctly. It might be useful to know if an error dialog pops up on opening the unit.

Regards,

cmos
Newbie
Posts: 0
Joined: Thu Apr 28, 2016 6:10 am

Re: Generating Sine using PS5000

Post by cmos »

Thank you very much. I found the signature were slightly different as mine returned "short" and yours returned an "uint" value. Not sure if this will make a big difference. Nevertheless, I was able to test your sample code and it works. I will compare all codes this weekend to see if there is any other difference when setting up the signal generator. I won't be able to test my changes but until Monday unfortunately. Thank you again and this was a very important step for me, to ensure the sigGen is working.

Regards,

Cristian

cmos
Newbie
Posts: 0
Joined: Thu Apr 28, 2016 6:10 am

Re: Generating Sine using PS5000

Post by cmos »

Hi
It worked! The problem was in my end. I was trying to set up my peak to peak values in milivolts. using microvolts, as suggested in the API guide, was the solution.

Thank you for your assistance.

Cristian

Hitesh

Re: Generating Sine using PS5000

Post by Hitesh »

Hi Cristian,

Good to hear it's working now! :D

Best wishes,

Post Reply