Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: how to use labview in matlab with activex?
Replies: 1   Last Post: Nov 30, 2013 12:48 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Ahmed Hakim

Posts: 21
Registered: 1/22/09
Re: how to use labview in matlab with activex?
Posted: Nov 30, 2013 12:48 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

yoon <yoon@me.udel.edu> wrote in message <3650A5ED.9A2E6E77@me.udel.edu>...
> 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
> /*-----------------------------------------------*/
>
>

Try to use ActiveX


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



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.