Python Callback Function Error

Post general discussions on using our drivers to write your own software here
Post Reply
zipcode
Newbie
Posts: 0
Joined: Wed Dec 05, 2018 8:54 am

Python Callback Function Error

Post by zipcode »

I am also having problems with streaming in Python. I'm stuck with the callback function.
First I defined the callback function as:

Code: Select all

@CFUNCTYPE(None, c_int16,c_int32,c_uint32,c_int16,c_uint32,c_int16,c_int16,c_int32) 
def callBackStreaming(handle,noOfSamples,startIndex,overflow,triggerAt,triggered,autoStop,pParameter):
	pass
Than I make the call from the GetStreamingLatestValues as:

Code: Select all

m = ps.ps4000aGetStreamingLatestValues(self.handle, callBackStreaming, byref(pCallBack))
I get the following error:

m = ps.ps4000aGetStreamingLatestValues(self.handle, callback, c_void_p())
ctypes.ArgumentError: argument 2: : wrong type

Does someone have any idea what I am doing wrong?

NeilH
PICO STAFF
PICO STAFF
Posts: 265
Joined: Tue Jul 18, 2017 8:28 am

Re: Python Callback Function Error

Post by NeilH »

Hi

We are currently looking into implementing streaming mode for Python and will be generating examples for streaming mode soon
Neil
Technical Support Engineer

zipcode
Newbie
Posts: 0
Joined: Wed Dec 05, 2018 8:54 am

Re: Python Callback Function Error

Post by zipcode »

NeilH wrote:
Thu Dec 06, 2018 10:09 am
Hi

We are currently looking into implementing streaming mode for Python and will be generating examples for streaming mode soon
Thank you :wink:

zipcode
Newbie
Posts: 0
Joined: Wed Dec 05, 2018 8:54 am

Re: Python Callback Function Error

Post by zipcode »

NeilH wrote:
Thu Dec 06, 2018 10:09 am
Hi

We are currently looking into implementing streaming mode for Python and will be generating examples for streaming mode soon
Any news?

Post Reply