Test and Measurement Forum

Drive a PS3000 device with LabWindows

Post your LabVIEW discussions here

Drive a PS3000 device with LabWindows

Postby Charles » Thu Mar 28, 2013 8:39 am

Hi,

I having some problem to drive a PS3000 (3424) device with LabWindows, I use the PS3000.lib from PS3000sdk_f10_5_0_11 download from the website but I can't initialize the probe with the fonction PS3000_set_channel().

I'm sure I communicate with oscilloscope but can't get back value from the probe.

Regards,

Charles
Charles
Newbie
 
Posts: 0
Joined: Thu Mar 28, 2013 8:31 am

Re: Drive a PS3000 device with LabWindows

Postby Martyn » Thu Mar 28, 2013 9:00 am

Are you getting a 0 or 1 returned from the SetChannel function call ?

Please post your code here for us to take a look.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2355
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Drive a PS3000 device with LabWindows

Postby Charles » Thu Mar 28, 2013 10:08 am

Code: Select all
   Test = ps3000_set_channel (handle, 0, TRUE, FALSE, 9);
   ps3000_get_timebase (handle, 19, 10000, &time_intervale, &time_units, 4, &max_samples);
   ps3000_run_block (handle,10000,19,1,&time_indisposed_ms);
   ps3000_ready (handle);


Test return 1
Charles
Newbie
 
Posts: 0
Joined: Thu Mar 28, 2013 8:31 am

Re: Drive a PS3000 device with LabWindows

Postby Martyn » Thu Mar 28, 2013 10:59 am

You need to check the return codes for each function to see they are OK, and then once you get a 1 returned by the ps3000_ready call you can then use ps3000_get_values call to retrieve the data.

If this doesn't work then we need to know exactly what your issue is, what you are expecting to happen but isn't.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2355
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Drive a PS3000 device with LabWindows

Postby Charles » Thu Mar 28, 2013 12:31 pm

For test my program I send a sine signal to Picoscope so in return all fonctions return 1 then ps3000_get_values return random values between 32767 and -32767, I know it's normal before convert in volts but I'm expecting a sine signal. It's for that I think I collect noise data instead of sine signal.
Charles
Newbie
 
Posts: 0
Joined: Thu Mar 28, 2013 8:31 am

Re: Drive a PS3000 device with LabWindows

Postby Martyn » Thu Mar 28, 2013 1:57 pm

Are they random values or do they follow a sinusoidal pattern, data values between these would be perfectly valid.

Try posting the values into an excel spreadsheet and then graphing the data.

If they appear random it may be just be that your input signal has too high a frequency for the sample interval you are collecting at.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2355
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Drive a PS3000 device with LabWindows

Postby Charles » Thu Mar 28, 2013 2:11 pm

Thanks I solve my problem with a 3 second delay between ps3000_run_block() and ps3000_ready() and adjust no_of_values in ps3000_get_values.

Regards

Charles
Charles
Newbie
 
Posts: 0
Joined: Thu Mar 28, 2013 8:31 am


Return to LabVIEW

Who is online

Users browsing this forum: No registered users and 0 guests