LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do I use/invoke my LabVIEW DLL in VB scripts

I have converted a simple sum VI which sums two integers in to DLL. Now the problem is calling this dll form VB scripts. How do I do that? Can anyone help? I read somewhere that I need to create into a COM DLL in order to use it in VB scripts. Whats the differnce between COM DLL and LAbVIEW DLL.
0 Kudos
Message 1 of 4
(3,292 Views)
Hi Kumar

This NI link can help you
http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3E75B56A4E034080020E74861&p_node=DZ52048&p_submitted=N&p_rank=&p_answer=&p_source=External

Hope it helps

Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 2 of 4
(3,292 Views)
Hi Alipio,

I am aware that I can call the dll from Vb but do not know how to invoke from VB script.
0 Kudos
Message 3 of 4
(3,292 Views)
You can call a dll in vb. All you need to do is create the DLL and include the vi's that you want to place in the DLL by making them exported vi's. Make sure you make connections to the connector pane for the inputs and output that you want for the vi. Define the prototype correctly in application builder when you add them as exported vi's by adding these inputs and outputs. Using the example function call in the define prototype screen you can call them in vb using something similar to the following:


This will be a declare statement:
Private Declare Sub (YOUR FUNCTION IN THE DLL)Lib "PATH of DLL" ( _ByVal OutputString As String, ByVal OutputStringLength As Long)

Then simply call this function later in your VB script.
Hope this helps.
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 4 of 4
(3,292 Views)