Test and Measurement Forum

Problem changing resolution PS5444A

Post your LabVIEW discussions here

Problem changing resolution PS5444A

Postby theo_cremers » Wed Jul 22, 2015 10:27 am

Hello,

I'm using Labview to write some software for my PS5444A, using the PicoScope5000aExampleBlock as a starting point. I wanted to add the ability to change the resolution while the program is running. With a library node I use ps5000aSetDeviceResolution if the resolution value has changed since the last loop iteration (see attachment). Afterwards, I use the picostatus VI to check the status.

When I test this out, by changing the resolution value during operation, the library node returns the status: PICO_INVALID_HANDLE. I checked the ingoing and outgoing handle with a probe, but it shows the same value that works for all other functions in the settings and block VI's.

Can someone explain to me what I am doing wrong?

Kind regards,
Theo
Attachments
PS5000a_blockcapture_example.vi
(30.16 KiB) Downloaded 47 times
theo_cremers
Newbie
 
Posts: 0
Joined: Wed Jul 22, 2015 10:04 am

Re: Problem changing resolution PS5444A

Postby MikeNuke » Thu Jul 23, 2015 2:15 pm

Hi!
I think the problem should be the way you are passing the handle: you are passing it as a pointer, while it should be passed with its value (in the manual there is a * in the table, but I think it's wrong).

You can also simplify your VI by using an Event Structure activated by Resolution value change instead of feedback note + case structure

I hope I helped!

Kind regards,
Mike
MikeNuke
Politecnico di Milano
Department of Energy, Nuclear Engineering Division
MikeNuke
Newbie
 
Posts: 0
Joined: Thu Oct 31, 2013 1:49 pm

Re: Problem changing resolution PS5444A

Postby Martyn » Fri Jul 24, 2015 7:56 am

There is an error in the description in the table for both GetDeviceResolution and SetDeviceResolution, it should be
Code: Select all
handle, the value returned from opening the device

This has been corrected in the latest manual https://www.picotech.com/download/manuals/PicoScope5000SeriesAApiProgrammersGuide.pdf
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2287
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Problem changing resolution PS5444A

Postby theo_cremers » Mon Jul 27, 2015 2:53 pm

MikeNuke wrote:Hi!
I think the problem should be the way you are passing the handle: you are passing it as a pointer, while it should be passed with its value (in the manual there is a * in the table, but I think it's wrong).

You can also simplify your VI by using an Event Structure activated by Resolution value change instead of feedback note + case structure

I hope I helped!

Kind regards,
Mike


That does fix the problem, thank you.
I considered using an event structure to wait for the value change, but I wanted to prevent data loss when the resolution change happens. This way I make sure the resolution change will always happen before the measurement is taken.

Kind regards,
Theo
theo_cremers
Newbie
 
Posts: 0
Joined: Wed Jul 22, 2015 10:04 am


Return to LabVIEW

Who is online

Users browsing this forum: No registered users and 0 guests