LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My waveform graph does not work in the simulation loop

Hi,

I am a masters student currently setting up a controls lab for undergrads at RIT. I had one question.I am runnign a DC motor using an MCC card. Hence I am using the ULx library instead of DAQmx. I send a step signal to the motor and in turn read the tachometer output and want to plot that. \

 

The plotting works fine withe simulation time waveform chart. However I need to use the cursor on the chart. I understand that you cannot have a cursor on a waveform chart. So i replaced the chart witha waveform graph. but now the signal is not at all seen on the graph. I dont understand why.

 

Is that the data types are different and graph does not work with simulation time? Or is it some other error on  my part. Attaching the file here. you obvisouly wil not be able to run it without the motor but maybe looking at the connection might help.

 

Any help is appreciated.

 

Thank You,

 

rps

 

0 Kudos
Message 1 of 5
(3,847 Views)

I think that the problem you are running into is the fact that a Waveform Chart has built in history.  A Waveform Graph (on the other hand) does not have any built in history.

 

The output of your ULx read operation is just a single data point.  It doesn't make much of a plot.  You have to perform the memory operation yourself.

 

I've made the following VI for the purpose of simplifying the memory operations needed to properly use a Waveform Graph while collecting data.  You specify the "window size" in seconds, and provide the input array of waveforms (ULx supports Waveforms output, I'm pretty sure).  The output of the VI is all the data for the past so many seconds you specify for the window size.

 

Waveform Windows (SubVI).png

0 Kudos
Message 2 of 5
(3,840 Views)

Here is the VI saved to LabVIEW v8.5 format.  Let me know if you need it in an earlier format.

0 Kudos
Message 3 of 5
(3,837 Views)

Hi rps,

 

The waveform chart and the waveform graph take different inputs, The output produced by the "Simulation Time Waveforem" block is not the correct input for the Waveform Graph.

 

Here are two ways to do what you want:

 

1) Use a Collector function attached to an XY graph (see screenshot). The collector only produces the graph at the end of the simulation. If you need the graphing to occur during the simulation, use method two.

 

2) Bundle the simulation time and the output. Feed the bundle to a Buffer XY Graph (see screenshot). With this method, you may need to double click on the Buffer XY Graph function and increase the "buffer size" so that it can graph all of your data, as 1024 data points may not be enough.

 

 

Hope this helps!

graphing.png

0 Kudos
Message 4 of 5
(3,833 Views)

Hi,

 

thank you both so much for your replies.

 

I used 'dbohls' second method. It was easier to implement, and i think the kids will be able to use it too. this really helped.

 

thanks again,

rps

0 Kudos
Message 5 of 5
(3,802 Views)