Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to use labview in matlab with activex?

80 views
Skip to first unread message

yoon

unread,
Nov 16, 1998, 3:00:00 AM11/16/98
to
Hi Everyone.
Is there anyone have a experience
to use labview vi program in matlab ?

I'd like to popup Labview vi program in matlab with activex control.

I can excute the following program in VisualBasic without error,
but not in matlab.

I tried it with actxserver function in matlab
but only 'dispatch error' accurred.
Is there any method to use labview in matlab with activex?

/*-----------------------------------------------------*/
Private Sub cmdLab_Click()

Dim lvapp As Object
Dim vi As Object
Dim paramNames(1), paramVals(1)

Set lvapp = CreateObject("LabVIEW.Application")
viPath = "c:\user\test.vi"

Set vi = lvapp.GetVIReference(viPath) 'Load the vi into memory
vi.FPWinOpen = True 'Open front panel

'
paramNames(0) = "In"
paramNames(1) = "Out"

'initialize input values to the vi
paramVals(0) = 30

'run the vi
Call vi.Call(paramNames, paramVals)
End Sub
/*-----------------------------------------------*/

Ahmed Hakim

unread,
Nov 30, 2013, 12:48:05 AM11/30/13
to
yoon <yo...@me.udel.edu> wrote in message <3650A5ED...@me.udel.edu>...
Try to use ActiveX


e=actxserver('LabVIEW.Application');
vipath='C:\DATA\Labview\test.vi';
vi=invoke(e,'GetVIReference',vipath);
vi.Run;
0 new messages