LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to transfer a data gernerated from a VI to Simulink?

Solved!
Go to solution

Hi,

I am now using Labview and Simulink together to control Agilent 34980. Labview is th interface between Simulink and Agilent 34980.

I am now successfully to control 34980 from Simulink but when I want to transfer data get from 34980 to Simulink, a problem shows up.

 

Now let me simple the question.How to transfer a mid-data to Simulink? You may see the eg. below.

I want to tansfer Number and Number 3 which is the result of "Number + Number2" to Simulink. And they will be added in Simulink, the result will be transferred back to number 5.

Cause SIT only can transfer Control VI to Simulink ,so I use "local variable,局部变量".

But when the Labview run and when I change Number and Number2 in the front panel the Number3 changes soon, but the Number5 does not change,it seems I didn't transfer  Number3 to Simulink soon,Why?

 

I appreciate any reply, Thank you a lot~

 

 

 

 Labview1.jpg

Labview2.jpgSIT.jpg

 

 

 

Simulink.jpg

SIT.jpg

Download All
0 Kudos
Message 1 of 6
(2,642 Views)

Hi jinxj,

  Please refer to this links "http://digital.ni.com/public.nsf/allkb/F219294BC6B792038625761D002E9E76",

"www1.mengr.tamu.edu/aparlos/.../Simulink2LabVIEW.pdf"  and "www.ni.com/pdf/manuals/370420a.pdf."

 

Thanks and regards,

srikrishna

Regards,
Srikrishna


0 Kudos
Message 2 of 6
(2,638 Views)

Hi, Srikrishna!

Thank you very much for your reply.

But it seems that it can not solve my problem~

My question is how to pass a data generated in labview(not Contol) to a simulink model?

2011-06-10_090304.jpg

Do you have any good suggestion?

Thanks a lot~

0 Kudos
Message 3 of 6
(2,627 Views)
I am having the exact same problem, I can transfer a Control to Sinulink, but i cannot pass a labview indicator (i.e. a result) to simulink. I have tried all sorts, including wiring the result to a property node box that sets the value of the control. The SIT toolbox seems to opperate at a higher level than the labview VI. This is evident becauce the controls that are been passed to simulink in the sine wave.vi example are not inside any sort of loop, yet the program will continuasly read from them as if they are!!! Any solutions please?
0 Kudos
Message 4 of 6
(2,604 Views)

Hi Welsh Jack,

  I think you can work around this problem using property variables,frame structure and another hidden control.As shown in the above post,there are two variables x and y and sum is Z,now create a local variable or property value and wire to hidden control's local variable in one frame ..This way you can work around that problem..

 

 

Thanks and regards,

srikrishna

Regards,
Srikrishna


0 Kudos
Message 5 of 6
(2,593 Views)
Solution
Accepted by topic author jinxj

2008-06-29_080327.jpg

This can solve your problem~

Message 6 of 6
(2,581 Views)