python throwing error in runStreaming mode while using ps4000aStreamingExample.py

Post your MATLAB discussions here
Post Reply
Se7enHells
Newbie
Posts: 0
Joined: Wed Feb 17, 2021 9:57 am

python throwing error in runStreaming mode while using ps4000aStreamingExample.py

Post by Se7enHells »

231 status["runStreaming"] = ps.ps4000aRunStreaming(chandle, 232 ctypes.byref(sampleInterval), 233 sampleUnits, ArgumentError: argument 5: : wrong type
I checked twice that I am currently using the class types as mentioned in the picoscope programmers guide.
Streaming with 5 channels Picoscope.py
Modified ps4000aStreamingExample.py for 5 channels. (A, B, C, D and E)
(12.6 KiB) Downloaded 373 times
Any help will be much appreciated. Thank you in advance!
-->
Hello everyone,

I am Amit, a student from IIT Madras. I am using Picoscope 4824. I want to use 5 channels of the picoscope namely A, B, C, D and E. I have modified the ps4000aStreamingExample.py code accordingly and have attached the code to this thread. It is showing me an error in the line

Code: Select all

status["runStreaming"] = ps.ps4000aRunStreaming(chandle,
                                                ctypes.byref(sampleInterval),
                                                sampleUnits,
                                                maxPreTriggerSamples,
                                                totalSamples,
                                                autoStopOn,
                                                downsampleRatio,
                                                ps.PS4000A_RATIO_MODE['PS4000A_RATIO_MODE_NONE'],
                                                sizeOfOneBuffer)
assert_pico_ok(status["runStreaming"])
Error it is showing me is

Code: Select all

---------------------------------------------------------------------------
ArgumentError                             Traceback (most recent call last)
 in 
    229 # No downsampling:
    230 downsampleRatio = 1
--> 231 status["runStreaming"] = ps.ps4000aRunStreaming(chandle,
    232                                                 ctypes.byref(sampleInterval),
    233                                                 sampleUnits,

ArgumentError: argument 5: : wrong type
I checked twice that I am currently using the class types as mentioned in the picoscope programmers guide.
Streaming with 5 channels Picoscope.py
Modified ps4000aStreamingExample.py for 5 channels. (A, B, C, D and E)
(12.6 KiB) Downloaded 373 times
Any help will be much appreciated. Thank you in advance!
Attachments
ps4000RunStreaming.png