Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

can not read back error description in VB

I am using: flex_get_error_description Lib "FlexMotion32.dll" (ByVal descriptionType%, ByVal errorCode&, ByVal commandID%, ByVal resourceID%, charArray%, sizeOfArray&) As Long. The definition for "charArray" is short, while VB does not provide such type. (In your old version, it is string type.). As such, how could I retrieve the error description?
0 Kudos
Message 1 of 2
(2,748 Views)
This issue will be fixed in the next release of the NI-Motion driver. In the meantime, you basically need to change charArray% to ByVal charArray As String. Therefore, the correct prototype is as follows:

flex_get_error_description Lib "FlexMotion32.dll" (ByVal descriptionType%, ByVal errorCode&, ByVal commandID%, ByVal resourceID%, ByVal charArray As String, sizeOfArray&) As Long

I hope this helps!

Best regards,
Dawna P.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,748 Views)