11-10-2009 07:54 PM
Hello
I have a problem using the Mitsubishi Active X controls.
I know the Active X works OK I have used it with a VB app and it worked as described in the manual.
I wish to intergrate a LabView VI with a PLC the problem I have is as follows
All methods work i.e. they run, give a result and do not generate an error
Methods that return single values work exactly as they should, but some methods are meant to return an array of values, but only return a single integer.
I believe this is due to Labview incorrectly using the method.
Is there a way to fix this, i.e. change the properties of the method to output the correct data type.
11-11-2009 06:33 PM
Carples,
I found this on the forums:
"LabView and Visual Basic for Applications (VBA)
only support the VARIANT data type for arrays. Visual Basic, however,
supports more descriptive array parameter specifications in IDL. In
other words, there are numerous valid ways to declare array parameters
in IDL, however, some tools only support a subset. LV only supports
VARIANTs. So in the previous IDL example:
[id(3), helpstring("method NSEnumDevice")] HRESULT NSEnumDevice([in] int devIndex, [in] SAFEARRAY(int) *ports);
becomes -
[id(3),
helpstring("method NSEnumDevice")] HRESULT NSEnumDevice([in] int
devIndex, [in] VARIANT ports, [out, retval] VARIANT *devObj);
Where
devObj is an ActiveX wrapped object. VARIANT "ports" is an array of
integer values. To specify returning an array of values, you still just
use "[out, retval] VARIANT *array"."
11-15-2009 06:33 PM
Thank you for the link.
Unfortunatly I dont understand the solution.
What do I do to the active X controls to change to output to a variant array.
02-25-2010 10:50 AM
Hey ! Robbob
You didn't answer Carples' question. He cannot have a choice to change the MX Component code. I have the same problem as him. There are many controls in the MX Components. The one that cause such problem is the ActEasyIF control which apparently doesn't use variant data. It return only the first element as the output data (supposed to be 1-D array). Another Control, ActMLEasyIF, use the variant data type, but if return nothing as the output (in LabView).
I neither have the solution.