Test and Measurement Forum

python and pl1000.dll

Post general discussions on using our drivers to write your own software here

python and pl1000.dll

Postby nickwheeler » Wed Jan 19, 2011 5:23 pm

Hello I have an interesting problem communicating with the pl1000.dll from python - I can't find a way to obtain the device handle?
a python shell test:-
*** Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32. ***
*** Remote Python engine is active ***
>>> import ctypes as ct
>>> pl1000 = ct.windll.LoadLibrary('pl1000')
>>> _pl1000OpenUnit = pl1000.pl1000OpenUnit
>>> _pl1000OpenUnit.restype = ct.c_short
>>> handle=_pl1000OpenUnit()
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
ValueError: Procedure probably called with not enough arguments (4 bytes missing)
if I set the _pl1000OpenUnit.argtype to ctypes.c_short then it changes the error message to one argument required.
I experimented with everything I can think of for an argument including "None". With VBA I get a handle=16384 so I tried that and 4000 but always an error instead of a return value.
Anyone have a clue as to what I'm doing wrong?

Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests