[python-win32] Reading a UInt32 array from LabVIEW

Ola Rylow Ola.Rylow at hiq.se
Tue Mar 14 14:37:05 CET 2006


I'm accessing LabVIEW through the ActiveX interface and I'm having a problem with reading a UInt32 array.
 
The code used is:
inParams = ["Numeric", "Numeric 2", "Numeric 3", "Array"]
inValues = [9,8,7, ()]
retval = viReference.Call(inParams, inValues)

where "Array" is output and the rest is input. I've also used an empty list instead of tuple in inValues. The GetControlValue method does not work neither.
If I change the Array to contain SInt32 elements everything will work fine!
 
So how do I extract an UInt32 array? Can anyone help, please.
 
 
BR
 
Ola
 
This is the error I get:
 
C:\Python24\lib\site-packages\win32com\client\__init__.py:480: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
  elif type(obj)==TupleType:
Traceback (most recent call last):
  File "C:\AtletScripts\LabVIEW_test\scripts\ArrayOutTest.py", line 18, in ?
    retval = viReference.Call(inParams, inValues)
  File "C:\AtletScripts\LabVIEW_test\includes\LabVIEW71.py", line 1038, in Call
    , paramVals)
  File "C:\Python24\Lib\site-packages\win32com\client\__init__.py", line 449, in
 _ApplyTypes_
    user, resultCLSID)
  File "C:\Python24\Lib\site-packages\win32com\client\__init__.py", line 467, in
 _get_good_object_
    return _get_good_object_(obj, obUserName, resultCLSID)
  File "C:\Python24\Lib\site-packages\win32com\client\__init__.py", line 480, in
 _get_good_object_
    elif type(obj)==TupleType:
TypeError: The VARIANT type 0x13 is not supported for SAFEARRAYS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20060314/6882312b/attachment.htm 


More information about the Python-win32 mailing list