12-09-2012 02:06 PM
I've tried and tried but can't get the State-Space block module to give me a graph / output.
I have no idea what the problem is and hope that somebody can help me. The numbers and calculations work in Matlab (Simulink) but i can't get it to simulate in labview.
Anybody got any ideas?
Solved! Go to Solution.
12-10-2012 05:21 PM
The problem is that you are assuming that LabVIEW executes left to right. Dataflow doesn't work this way. Your code as this:
does not tell LabVIEW that it has to execute everything from left to right. What is happening is that he is executing the 3 'island' of code in parallel and, in this case, it will have 'empty' values. You have to remove the local variables to make this work and dataflow paradigm will execute your code from left to right, as you want. here is the code:
Also, one more thing. Your input to the "CD Linear Simulation" is all zero. That means that you are trying to input zero input to a linear system, which will give you a zero output to the response. You probably do not want that since zero as input doesn't give you any more information. If you want to see how to system goes to zero after initial conditions, you should use "CD Initial Response". Or you should modify the input signal to the system. Please study this shipping example to understand how to use Linear Simulation and Initial Response:
C:\Program Files (x86)\National Instruments\LabVIEW 2012\examples\Control and Simulation\Control Design\Time Analysis\CDEx Time Domain Analysis.vi
Hope this helps...
12-12-2012 04:04 AM
That helped alot, i thought that the the variables were empty and it would wait to execute until calculated but as you stated it gives matrixes [0 0 ; 0 0 ].
The example you sent also got me a few steps forward. Thanks alot! (for now atleast 🙂 )