LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ho can I pass Instrument Handle to DLL developed using LabVIEW

Hi All,

 

I am trying to create a DLL using LabVIEW.The DLL has one input and one output, which are Instrument Handles.

While I create the DLL in LabVIEW, I am getting the following error.

 

"Error -2147221480 occurred at Building DLL.An error occurred compiling the DLL because a function or parameter name is illegal. Please verify that the function and/or parameter names are legal C identifiers and do not conflict with LabVIEW headers."

 

Is there any way to pass Instrument Handle to a DLL (LabVIEW)?

Or is there any way to split the "Instrument handle" variable to "Device Name" and "Session Number" and back to Instrument handle?

 

The VI Snippet  is attached to this mail.

 

Thanks in Advance...

 

 

Into the pursuit...
Maverick
0 Kudos
Message 1 of 5
(3,196 Views)

I believe the following applies to you:

 

Passing Modular Instrument Session Handles from DLLs to LabVIEW

0 Kudos
Message 2 of 5
(3,188 Views)

Hi,

 

Thank you for your reply...

 

I found this earlier. But it will not solve my issue completely. I need the reverse process also. i.e Deriving Device name and session number from instrument handle.

 

Have you seen any VIs for that. I tried variant, flatten to string typcast etc. But couldn't find a solution...

Into the pursuit...
Maverick
0 Kudos
Message 3 of 5
(3,175 Views)

Why would you need to derive those two pieces of informattion in a reverse process?

 

You should still have those pieces of information available in your VI based on the initial creation of the session.

0 Kudos
Message 4 of 5
(3,172 Views)

Hi,

 

I am trying to create a StepType in TestStand. It uses DLL created using LV as module.

I am unable to create that DLL in LV (The issue is detailed in my 1st post).

In TS the instrument handle is a container (ASCII string and U32). If I have to pass this information from TS to DLL and vice versa, I have to split instrument handle into Device name and session number.

 

Into the pursuit...
Maverick
0 Kudos
Message 5 of 5
(3,169 Views)