LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

X-Axis Defenition in a chart

I put together a simple VI to show the effects of varying the  frequency of a Sine wave graphically.  But I am not clear on two counts :

1. The X-Axis scale : I want to see the patterns for a 10 second period and then start fresh with a clear plot area. This is what the Scope mode is supposed to do. But it does not happen so - it continuously updates the  X-Axis and only maintains the max-min difference as 10.

2. The while loop delay timing seems to affect the  set frequency of the Sine  function. I thought irrespective of the  update rate, the sine function MUST produce the programmed frequency ??? What am I missing ? ( To see what I mean just  alter the while loop delay and observe the time it takes to complete the plot of 1 Hz )

Thanks for any clarifications on above.

Raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 1 of 5
(2,411 Views)
I think you misunderstanding something basic. You have the basic function generator generate one cycle of a 1Hz pattern. It does not take 1 second to do the generation. If you had real DAQ hardware, it would take this long but you are simulating a waveform in software. It doesn't take any longer to generate a 1Hz pattern than a 1KHz pattern. It's all just software - all that changes is the dt in the waveform data type. Since you are generating a single cycle, then of course the wait is going to affect the update frequency - not the generated frequency. As posted, you have a 100ms wait. You get 10 cycles plotted every second. If you changed the wait to 1 sec, you would see 10 cycles in 10 seconds. The frequency of the simulated waveform hasn't changed though.
Message 2 of 5
(2,403 Views)
>>You have the basic function generator generate one cycle of a 1Hz pattern. It does not take 1 second to do the generation.

Sorry but I still don't follow! What you say could be true if I am talking of a "Sine Pattern" . Maybe someone wants to know how a sine wave looks and then it does not matter how fast I generate it. But when I say a Sine of X amplitude at Y frequency, then is it not mandatory for the (software ) function generator to output  the digitized information at  the PRESCRIBED rate oif Y ?

And suppose if I  route this output ( 1 Hz Sine with about 1V amplitude ) from the software function generator to an oscilloscope ( the real one with a CRT )via an analog output channel of a DAQ card, what would I see on the scope ?

I realize that I am missing out something - only not sure what!

Thanks

Raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 3 of 5
(2,388 Views)
You are using a "Sine Pattern" generator. It is not a hardware generation. You cannot "route" this signal to a scope without first "routing" it to a piece of hardware like a DAQ board. If you do something like that, the timing circuit on the DAQ board will output a true 1 Hz sine wave. All you've got is a numerical representation in the computer's memory. Change the dt of the waveform in software, and you've got a numerical representation of a different frequency. If you truly want to simulate the generation of a 1 Hz sine wave, you can generate it one point at a time in a loop.
0 Kudos
Message 4 of 5
(2,376 Views)
Yes I got what you meant. The working of the Function Generator VI is now clear. Thanks.

I have  enclosed a VI that does what I targeted.

Raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 5 of 5
(2,364 Views)