2nd instance of Custom c++ GUI intermittently hangs

Post your C and C++ discussions here
Post Reply
IanF
Newbie
Posts: 0
Joined: Thu Aug 17, 2017 1:29 pm

2nd instance of Custom c++ GUI intermittently hangs

Post by IanF »

Hi,
I have a c++ mfc dialog based project to be used as the GUI for the PicoScope. Connected to my computer i have 2 4444 scopes. I can successfully start the two instances of the app passing in the two different serial numbers and both app's begin to acquire data immediately if the trigger is reached.

The Problem.
When i set my two Scopes to Normal mode(on a traditional Scope) they start a triggered block capture and wait for the callback. Inside the callback i have a postmessage to re arm the trigger after data is acquired this is essentially an infinite loop if the trigger is constantly been reached.

The problem as i see it that while the driver is been accessed by app 1 in the infinite loop app 2 does not get the chance to re arm the trigger or something to that affect ( i could be way off ).

One further thing if i keep pressing normal mode on app 2 it will seemingly break into the driver and now app 2 is working and app 1 is locked or something and the same vica versa.
Any help would be muck appreciated.
Thanks Ian

Hitesh

Re: 2nd instance of Custom c++ GUI intermittently hangs

Post by Hitesh »

Hi Ian,

The callback function should really be used to indicate that there is data available.

It would be useful to see your code - could you e-mail it to support@picotech.com please?

Regards,

IanF
Newbie
Posts: 0
Joined: Thu Aug 17, 2017 1:29 pm

Re: 2nd instance of Custom c++ GUI intermittently hangs

Post by IanF »

Hi Hitesh,

Update

I think i have narrowed the issue. When i have both scope connected to the same function generator and 2 instance of my app running.

Both instances have the same trigger level and initial setup is the same.

When i apply a single burst only one instance grabs the data and plots it and the other instance seems to have got the callback but no data if i hit single burst on the function generator a couple of more times both instance will grab the data and plot it.

In normal mode when both instances are been constantly triggered it will only work if i place a pause in my function between the callback and the trigger re arm.

Thanks Ian

Hitesh

Re: 2nd instance of Custom c++ GUI intermittently hangs

Post by Hitesh »

Hi Ian,

I have responded to your support ticket. For the benefit of other Users our advice would be that the callback function is only used to indicate that data is available rather than for calling other functions or writing to file.

Hope this helps,

Post Reply