What function is the best for getting state?

Post your .Net discussions here
Post Reply
vadim_klimov
Newbie
Posts: 0
Joined: Wed Nov 06, 2019 7:39 am

What function is the best for getting state?

Post by vadim_klimov »

I want to check periodically a scope such as keepalive function. What a function from API is the best for this goal. I only need to know the state of scope.

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

Re: What function is the best for getting state?

Post by Martyn »

Which scope do you have and what are you specifically looking to achieve ?
Martyn
Technical Support Manager

vadim_klimov
Newbie
Posts: 0
Joined: Wed Nov 06, 2019 7:39 am

Re: What function is the best for getting state?

Post by vadim_klimov »

i have PicoScope 6402C and i want check if the device is available. I have an application with several devices and picoscope under other. It is used from time to time but all devices need to show their status, if they are reachable at all. In most time the scope is simply waiting. For this purpose I don't need to query parameters

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

Re: What function is the best for getting state?

Post by Martyn »

I am still not sure why you need a keep alive function.

Will you have already issued an OpenUnit call within your application to get a handle ? If so the scope will be alive and ready to go.

If someone has disconnected the scope then any access to the device will report an appropriate error.
Martyn
Technical Support Manager

vadim_klimov
Newbie
Posts: 0
Joined: Wed Nov 06, 2019 7:39 am

Re: What function is the best for getting state?

Post by vadim_klimov »

I'm very confusing... i use the function ps6000GetUnitInfo for checking the device. If the scope is connected it's ok. But if i disconnect the scope i get the PICO_OK back with all data. The driver seems to use the last function call. Is that right?

vadim_klimov
Newbie
Posts: 0
Joined: Wed Nov 06, 2019 7:39 am

Re: What function is the best for getting state?

Post by vadim_klimov »

Function OpenUnit provides PICO_NOT_FOUND = (uint)0x00000003UL if the pico is already opened. How can i
distinguish if the pico is already opened or there is another error on device? With the function ps6000FlashLed is the same strange thing. It works fine if the pico is connected, but for disconnected pico it provedes the PICO_OK too.

Post Reply