Problem changing resolution PS5444A

Post your LabVIEW discussions here
Post Reply
theo_cremers
Newbie
Posts: 0
Joined: Wed Jul 22, 2015 10:04 am

Problem changing resolution PS5444A

Post by theo_cremers »

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 558 times

MikeNuke
Newbie
Posts: 0
Joined: Thu Oct 31, 2013 1:49 pm

Re: Problem changing resolution PS5444A

Post by MikeNuke »

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

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Problem changing resolution PS5444A

Post by Martyn »

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/manua ... sGuide.pdf
Martyn
Technical Support Manager

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

Re: Problem changing resolution PS5444A

Post by theo_cremers »

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

Post Reply