Test and Measurement Forum

MFC , ps4000aRunBlock return pico_ok , but no callback

Post your C and C++ discussions here

MFC , ps4000aRunBlock return pico_ok , but no callback

Postby danshiu » Thu Mar 26, 2015 9:37 am

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;
}
danshiu
Newbie
 
Posts: 0
Joined: Thu Mar 26, 2015 3:17 am

Re: MFC , ps4000aRunBlock return pico_ok , but no callback

Postby Martyn » Tue Apr 07, 2015 6:54 am

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 Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2285
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots


Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests