LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple plots (multiple Y axis) using SIT

Hi,
I am trying to plot multiple signals on a Waveform Chart. The SIT interface does not allow me to drop more signals assosciated with a single chart. The chart properties have been set to accept 2 channels for the Y axis, so that I can compare 2 plots during run time for behaviour.
Any ideas?Thanks.

Amit
0 Kudos
Message 1 of 12
(3,455 Views)
What do you mean by SIT?
0 Kudos
Message 2 of 12
(3,444 Views)
SIT: Simulation Interface Toolkit (for interface with Matlab/Simulink).
0 Kudos
Message 3 of 12
(3,440 Views)
Hi Amit,
You will first need to build the VI with 2 graphs/charts. Then you need to modify the block diagram that the SIT connection manager generates. You should find each chart/graph in a seperate case of a case structure. See the attached .rtf file for some screen shots of how to modify your code.

Best Regards,
Brooks W.
National Instruments
0 Kudos
Message 4 of 12
(3,420 Views)
Hi,
Thanks for the info. I have tried the suggestion you had made. I was unable to get to what you were trying to mention. May be because I am a naive user of labview. I am attaching a zip file. This has a picture of model (nothing but a signal generator with 2 different gains at the output. I need to plot these 2 signals on same chart).
The other is the vi itself (labview 7.1). When I add another chart (originally I had only one chart: WaveForm Chart). If you go to the block diagram, now there are 3 cases: Default, WaveForm Chart and Waveform Chart2. How do I go about modifying this one? I don't want to see 2 different charts on the Front panel, but only 1 chart showing 2 signals with same time reference. Something similar to second picture in the document file. Any suggestion? Thanks.
Regards,

Amit
0 Kudos
Message 5 of 12
(3,414 Views)
Hi Amit,
I have modified your file to use one chart. I added in the shift register to accomodate the default case because a case structure has to have data for every output. Please let me know if you have any questions.

Best Regards,
Brooks W.
National Instruments
0 Kudos
Message 6 of 12
(3,407 Views)
Hi,
Thanks for the effort, but that didn't seem to solve the problem I am facing. I have attached a screen capture of the simulation.
Infact, I was working on this one. I have also attached my modification in the zip folder. Its is not complete, but almost there. The only problem I am facing is the connecting the output of the cluster to the chart. Once then is done, the i will get rid of the waveform chart3 in the third case. It complains about the data type. Shouldn't the implementation look something like that?
I got this idea from one of the cases in the examples provided by labview. Charts.vi is the one that I am looking at. Thanks for the effort.

Regards,
Amit
0 Kudos
Message 7 of 12
(3,402 Views)
Hi Amit,
I took a look at your code and doing it this way will be pretty complicated. So, I have tried a different method. I have left 2 graphs in your code but made one of them transparent and put it directly on top of the other. So, this will give you the effect of having one graph with 2 signals. You will need to make sure the Y-scaling is the same for both graphs.

I made the first graph transparent by right clicking on the graph>>advanced>>customize. This will pop up another window that will allow you to modify the indicator. Use the tools palette to change the background color to transparent. Save the file and it will update the graph on the front panel. The transparent graph will now be a *.ctl file. These are called custom controls. Let me know if you have any other questions.

Please see the following link for more information on custom controls:
http://zone.ni.com/devzone/conceptd.nsf/webmain/a9fbcaa7a3d7922186256a3000652b56?OpenDocument#2

Best Regards,
Brooks W.
National Instruments
Message 8 of 12
(3,392 Views)
Hi,
Sorry for not getting back earlier. I didn't find time to work on the stuff you had sent. I was out of town. But the solution you offered works fine for now. I mean at this point it serves my purpose. So, thanks a lot for the effort.
One question I had though. If you look at the implementation I was trying to do, there was a problem with the data type between the Chart input and the cluster elements. Am I missing something there?

Regards,

Amit
0 Kudos
Message 9 of 12
(3,360 Views)
Hi Amit,
Take a look at the attached file. In a previous sub VI the data was built into a 1D array of waveforms. However, there should only be one waveform in that 1D array. So, I indexed both arrays to get the waveform of the 0 element. Then I build it into a 1D array of waveforms (to show 2 waveforms on one plot) and then display it on the plot. Let me know if you have any further questions about this issue.

Best Regards,
Brooks W.
National Instruments
0 Kudos
Message 10 of 12
(3,346 Views)