02-16-2024 03:26 AM
Run WHILE loop for 100 iteration (1 iteration per second), the loop will stop automatically after 100 sec and the data in waveform graph and waveform chart should be same at the end. The Graph should display/update the data similar to chart in every iteration.
Solved! Go to Solution.
02-16-2024 03:31 AM
Hi tan,
@tan0709 wrote:
Run WHILE loop for 100 iteration (1 iteration per second), the loop will stop automatically after 100 sec and the data in waveform graph and waveform chart should be same at the end. The Graph should display/update the data similar to chart in every iteration.
This sounds like homework: what have you tried and where are you stuck?
The task is quite simple...
02-16-2024 03:33 AM
This is what i tried. It seems like i have to show continuous and history data too in a waveform graph. This is where i am stuck.
02-16-2024 03:34 AM
This is what I tried. It seems like I have to show continuous and history data too in a waveform graph. This is where I am stuck.
02-16-2024 03:52 AM
Hi tan,
@tan0709 wrote:
This is what i tried. It seems like i have to show continuous and history data too in a waveform graph.
You need to use a shift register and a BuildArray function to build the array for your graph.
While you might use ElapsedTime to stop the loop after the time has elapsed you might also run the loop simply for 100 iterations: the stop condition reduces to a simple comparison function.
02-16-2024 04:19 AM
are u talking about this? this is still not working.
02-16-2024 04:35 AM
Hi tan,
@tan0709 wrote:
are u talking about this? this is still not working.
Not exactly...
Right now you create an array of just one element. But instead you should create an array of increasing number of elements by appending the new element to the exisiting array!
Hint: use the shift register output at the left side of the loop!
Another hint: THINK DATAFLOW! When your graph should display the plot already inside the loop then your should place its terminal inside the loop...
02-16-2024 04:49 AM
still not working
02-16-2024 05:02 AM
Hi tan,
@tan0709 wrote:
still not working
Because you still create an array of exactly one element.
I told you you need to append new elements to already existing elements of the array!
Another hint: you can resize BuildArray to have two inputs: one for the "existing elements" and one for the "new element"...
02-18-2024 11:58 PM - edited 02-19-2024 12:04 AM
Can u solve it? I have started learning labview this month itself.
I tried doing this, but i want an array to hold 100 instance data, this is just 10.