06-06-2015 10:31 PM - edited 06-06-2015 10:39 PM
Dear all,
I am using SIT (Simulink Interface Toolkit) to obtain data generated by the model of Simulink. I need to use the local variable of the indicator to get the data out.
The interface with the mappings seems to work fine. The problemn is that the local variable of the waveform (this waveform is an indicater which mapped to the output signal of simulink and it can displays the signal from simulink)didn't work. I cann't obtain any data from the local variable, but the waveform which the local variable belonges to seems to work fine.
I also found an interesting thing that, when I hightlighting the execution process, the local variable seems like didn't work at all, because there is no data flows from it.
The software version is Matlab simulink R2011b, Labview 2011.
Below is a simple test model in simulink. It is a sine signal.
Below is the local variable from the waveform which mapped to the signal of simulink. To check there is any data in the local variable, I put a waveform to check.
06-06-2015 10:37 PM
Dataflow.
The local variable of the waveform is going to be empty to start. The writing of the local variable called Waveform to the indicator called Local Variable is going to happen right away. Only later does the waveform get any data. But by then the first part has already exectued never to be run again.
I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
06-12-2015 12:52 PM
Thanks for your reply. I will try to check the coures.
If anybody had experience about this problemn, pls share your suggestion, thank you !
06-12-2015 06:24 PM
He just told you exactly why it isn't working.
06-13-2015
10:30 AM
- last edited on
12-10-2024
11:34 AM
by
Content Cleaner
Check this out, you will learn a lot from it:
http://www.ni.com/newsletter/51735/en/
Specially the part: "Misusing Local Variables".
When you work with LabVIEW, the best is to forget about your text programming language background. Think of dataflow and parallel!