MFC , ps4000aRunBlock return pico_ok , but no callback

Post your C and C++ discussions here
Post Reply
danshiu
Newbie
Posts: 0
Joined: Thu Mar 26, 2015 3:17 am

MFC , ps4000aRunBlock return pico_ok , but no callback

Post by danshiu »

Hi,
I use MFC to create a dialog App.
when i run OnBnClickedRunbloke() , then reply status=PICO_OK, but g_ready=FALSE ,
why g_ready not change to TRUE , can give me a example solution , thanks a lot.

my code:
static short g_ready = FALSE;
static void CALLBACK CallBackBlock(int16_t handle,PICO_STATUS status,void * pParameter);
.....
void CstreamDlg::OnBnClickedRunbloke(){
status=::ps4000aRunBlock(dev_handle,0,sampleCount,timebase,&timeIndisposed,0,::CallBackBlock,this);
}
.....
void CALLBACK CallBackBlock(int16_t handle,PICO_STATUS status,void * pParameter)
{
if (status != PICO_CANCELLED)
::g_ready=TRUE;
}

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

Re: MFC , ps4000aRunBlock return pico_ok , but no callback

Post by Martyn »

We would need to see more of the code, particularly how the channels are set up, and if you have any triggers.

It may be easier to submit your code to the team directly at support@picotech.com
Martyn
Technical Support Manager

Post Reply