Hi,

I'm trying to use a SDK(dll file) with python ctypes to take measurement from a 
spectrometer. I some how got the deceive connected and took the measurement , 
but when I try to call one of its calculation function I'm getting  the 
"exceptions.ValueError: Procedure probably called with not enough arguments (8 
bytes missing)" error.

I believe I have called the function with proper arguments and data types. I 
would really appreciate some help.

The Function:

mydll = 
ctypes.windll.LoadLibrary("D:\\WILD2\\tools\\WildVerification\\lib\\jeti_core.dll")
device = ctypes.c_int()
dvError = mydll.JETI_OpenDevice(0,ctypes.byref(device))

X_value = ctypes.c_float()
Y_value = ctypes.c_float()
Z_value = ctypes.c_float()

dvError = 
mydll.JETI_CalcXYZ(device,ctypes.byref(X_value),ctypes.byref(Y_value),ctypes.byref(Z_value))

Function Documentation:

3.112 JETI_CalcXYZ
This function returns the calculated tristimulus XYZ.
3.112.1 Prototype
DWORD JETI_CalcXYZ (DWORD dwDevice, FLOAT *fX, FLOAT *fY, FLOAT *fZ)
3.112.2 Parameters
Input
Name               Type                             Description                 
             Call
dwDevice          DWORD                       Handle to a device as             
   By value
returned by
JETI_OpenDevice

fX                     FLOAT*                         pointer to a variable     
              By reference
where the tristimulus X
will be stored

fY                     FLOAT *                        pointer to a variable     
              By reference
where the tristimulus Y
will be stored

fZ                     FLOAT *                        pointer to a variable     
              By reference
where the tristimulus Z
will be stored

-
Gokul Santhirakumaran
Electrical Engineer(Co-op)

CHRISTIE
809 Wellington St. N.
Kitchener, ON, Canada N2G 4Y7
PH: +1 519-744-8005 x7313
www.christiedigital.com<http://www.christiedigital.com>

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to