Search found 22 matches

by Paul Breneman
Thu Aug 07, 2014 10:41 pm
Forum: General Software Discussions
Topic: Simple tools and code to start programming for PicoScope
Replies: 8
Views: 14021

Re: Simple tools and code to start programming for PicoScope

Yes, you did the right thing in eliminating the 4 as the last parameter of OpenUnit. https://docs.python.org/3.0/whatsnew/3.0.html shows how in Python 2.7 you should use a trailing comma rather than the "end = ' '". Sounds like you are making good progress! I use Linux a lot but I haven't tried Pico...
by Paul Breneman
Wed Jul 30, 2014 3:50 am
Forum: General Software Discussions
Topic: Need Pascal or Delphi code for ps5000a.dll
Replies: 19
Views: 22678

Re: Need Pascal or Delphi code for ps5000a.dll

A Python streaming example has been added. It still needs improvement but may be close! :)
by Paul Breneman
Tue Jul 29, 2014 4:10 pm
Forum: General Software Discussions
Topic: Need Pascal or Delphi code for ps5000a.dll
Replies: 19
Views: 22678

Re: Need Pascal or Delphi code for ps5000a.dll

Thanks Martyn. I would guess that c_int32 would be needed on 64 bit systems? Is that correct? I just put new Pascal code that has my initial streaming example on this page: http://ctrlpascal.com/picoscope.htm Next I hope to port the Pascal code to Python. Any help by anyone is appreciated! :)
by Paul Breneman
Thu Jul 24, 2014 9:57 pm
Forum: General Software Discussions
Topic: Simple tools and code to start programming for PicoScope
Replies: 8
Views: 14021

Re: Simple tools and code to start programming for PicoScope

First, I would suggest that you use a text editor to change every "ps5000a" in the ps5000acon.py file to "ps2000a". You might want to save the (changed) file as ps2000acon.py as well. Let me know how things work after you do that. I hope to change the file so just a single line could be changed, but...
by Paul Breneman
Wed Jul 23, 2014 2:18 am
Forum: General Software Discussions
Topic: Need help writing callback for Python streaming example
Replies: 5
Views: 6600

Re: Need help writing callback for Python streaming example

My messages now show up right away.

I did get streaming working with Delphi. I'll spend a bit more time trying to get it working in Python, but if you (or anyone) has any suggestions I'd appreciate them. I hope I can post an improved Python example in the next day or two.
by Paul Breneman
Tue Jul 22, 2014 10:44 pm
Forum: General Software Discussions
Topic: Need help writing callback for Python streaming example
Replies: 5
Views: 6600

Re: Need help writing callback for Python streaming example

Thanks again Martyn! I'm making progress. I found out why I got an exception in Delphi and Python after calling RunStreaming (which returned OK). It was because I had the third from the last parameter (downSampleRatio) set to zero instead of one. I've also made a little progress on the callback (but...
by Paul Breneman
Tue Jul 22, 2014 4:36 pm
Forum: General Software Discussions
Topic: Need help writing callback for Python streaming example
Replies: 5
Views: 6600

Re: Need help writing callback for Python streaming example

Thanks Martyn! My post count stays at zero so I guess I'll always be moderated? Not the biggest problem I'm dealing with... :)
by Paul Breneman
Tue Jul 22, 2014 2:46 pm
Forum: General Software Discussions
Topic: Need help writing callback for Python streaming example
Replies: 5
Views: 6600

Need help writing callback for Python streaming example

For more information please see this thread in this forum section: http://www.picotech.com/support/topic14069.html A single channel (at a slow rate) would be enough for a simple example (no advanced features needed). Another thread is also related: http://www.picotech.com/support/topic14123.html Tha...
by Paul Breneman
Mon Jul 21, 2014 1:25 pm
Forum: General Software Discussions
Topic: Simple tools and code to start programming for PicoScope
Replies: 8
Views: 14021

Re: Simple tools and code to start programming for PicoScope

Do you have the PicoScope software installed and working OK? If so, have you tried to download the software development kit for the 2206? Those would be the first two steps. Have you done any programming with Python before? If so, do you have it installed on your PC (and what version)? I used versio...
by Paul Breneman
Wed Jul 16, 2014 1:15 pm
Forum: General Software Discussions
Topic: Need Pascal or Delphi code for ps5000a.dll
Replies: 19
Views: 22678

Re: Need Pascal or Delphi code for ps5000a.dll

With Python I get an exception after calling RunStreaming. Here is the example: http://ctrlpascal.com/ps5000acon3.zip
by Paul Breneman
Tue Jul 15, 2014 3:24 pm
Forum: General Software Discussions
Topic: Need Pascal or Delphi code for ps5000a.dll
Replies: 19
Views: 22678

Re: Need Pascal or Delphi code for ps5000a.dll

With Python I don't know how to write the Callback procedure so any tips in that regard would be appreciated. With Delphi I modified your old ps5000 code and now all of the dll calls return OK but I get an exception (divide by zero) in the dll. Using SetDataBuffers doesn't help. I noticed that your ...
by Paul Breneman
Mon Jul 14, 2014 4:40 pm
Forum: General Software Discussions
Topic: Need Pascal or Delphi code for ps5000a.dll
Replies: 19
Views: 22678

Re: Need Pascal or Delphi code for ps5000a.dll

I think I'd rather stick with the most simple DLL call for now. This was my SetDataBuffer call: status = windll.ps5000a.ps5000aSetDataBuffer( ps5000a_handle, 1, byref(ChannelA), sizeof(ChannelA), 0, 0) I had two things wrong. The second parameter should be 0 for channel A. The fourth parameter was w...
by Paul Breneman
Mon Jul 14, 2014 2:50 pm
Forum: General Software Discussions
Topic: Need Pascal or Delphi code for ps5000a.dll
Replies: 19
Views: 22678

Re: Need Pascal or Delphi code for ps5000a.dll

My last parameter "sizeof(ChannelA)" was wrong. It was 20000 but changing it to 10000 didn't get things working.
by Paul Breneman
Mon Jul 14, 2014 11:50 am
Forum: General Software Discussions
Topic: Need Pascal or Delphi code for ps5000a.dll
Replies: 19
Views: 22678

Re: Need Pascal or Delphi code for ps5000a.dll

Thanks Martyn, but I think the "1" is there for AutoStop. Here is my Python code: status = windll.ps5000a.ps5000aRunStreaming( ps5000a_handle, byref(sampleInterval), 3, 0, 1000, 1, 10, 0, sizeof(ChannelA)) Here is your "C" code: status = ps5000aRunStreaming(unit->handle, &sampleInterval, timeUnits, ...