LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get simulink outputs as inputs to certain LV Controls?

I am trying to get simulink outputs to connect to certain labview controls. I have used SIT and I know how that works. But that is not the solution for me, not atleast the way I know how it works. My simulink model will be computing co-ordinated for a closed figure. This is case, this will be just a quadrangle. I have a VI that does just that. I have control over the co-ordinates on the VI, that allows me to change the shape of the quadrangle. I have attached the VI with the post.
This is fine with labview and manual process. But what really is going to happen is that these co-ordinates are going to be computed by simulink model. I have also attached a picture that shows the concept of what I want to achieve. So, as can be seen from the picture, the X0,---, Y4 are currently numerical inputs on the VI, these should be replaced by the signal coming from the simulink subsystem.
Is this possible?

Regards,

Amit

Download All
0 Kudos
Message 1 of 8
(2,757 Views)
Hello Amit,
      Have you had a chance to look at this link?

Thanks,

NathanT
0 Kudos
Message 2 of 8
(2,732 Views)
Yes. I did look at the link right now. This link explains how to interface LV VI with Simulink model via SIT. I have used it in past and I know it works. But, what I am trying to do is slightly different. I want the model outputs to go to this highlight VI inputs. What that really means is that the highlightregion.vi takes in 5 points (5 XY co-ordinates ie. 10 data points) as inputs. This will highlight the region based on the co-ordinates.
I have attached the simulink model here. This is a representative simulink model. What that really is a pass through. I have 10 constant blocks inside the subsystem. Using the SIT (as per your link), I can control these constants using Numeric Controls on LV VI. This will work just fine. But inside these numeric controls are also connected to the clusters those make the co-ordtinates for the Draw Multiple Lines vi.
I have also attached the explained vi. In the actual system that connected with the simulink model. Also, I have typed in my comments in the block diagram window of the vi.
BUT, the SIT does not allow me to connect the model outputs to the inputs of the clusters, those will form the co-ordinates for the multiple lines.

I have attached all these files in a .zip file!

Regards,

Amit
0 Kudos
Message 3 of 8
(2,724 Views)
Amit,
      I tried opening up your .mdl file and there was nothing in it.  Can you get the Simulink output array to connect to indicators in LabVIEW?

NathanT
0 Kudos
Message 4 of 8
(2,709 Views)
Nathan,

  I am surprised that you couldn't open the model. It could be version. I am attaching 2 file (both of these files have extension .zip). These are not zip files, but renamed model files. So, you can get the model files just by changing the .zip to .mdl.
  The GetCoordsM6p5.zip is the one that I save in matlab version 6.5. One of these files should open.
  To answer your question, yes. I can always connect the simulink outputs to labview indicators.
  But, this is slightly different.
  Thanks.

Regards,

Amit
0 Kudos
Message 5 of 8
(2,706 Views)
attachements!!
Download All
0 Kudos
Message 6 of 8
(2,706 Views)

Amit,

If you can connect the outputs of your model to indicators in LabVIEW, what is stopping you from using property nodes or local variables to send the data into the rest of your functions?  You may not be able to connect the outputs directly to controls, but you can get the values into your VIs.

I hope this helps.

Steven T.

Message 7 of 8
(2,684 Views)
Hi Steven,

  duuuh!! Well the problem is.. I never thought of that. I am not a regular user of Labview and some of these facilities don't seem to be obvious! Thanks for the input! Will give it a shot! I hope this will enable me to solve the issue!

Regards,

Amit

0 Kudos
Message 8 of 8
(2,680 Views)