11-14-2016 02:30 PM - edited 11-14-2016 02:31 PM
Hello,
In this program you have to calculate the gravity force, everytime you press 'calculate' the number had to be autoùmatically stored in an array. The array has to contain all previous values.
Can anyone help me please?
Regards
11-14-2016 02:40 PM
I recommend an Event Structure inside of a While Loop. You can then store the array in a Shift Register and use Build Array to add items to it. See how far you get with that information.
11-14-2016 05:19 PM - edited 11-16-2016 11:08 AM
... and next time you attach a VI, give a reasonable name. Calling it "Untitled 1.vi" causes problems and is just plain lazy. For example my downloads folder already has over 10 VIs with that name, meaning the browser will append a number and thus change the name, making it diffuclt to find later.
Also please don't maximize the block diagram to the screen. That's very annoying.
Back to your code:
11-14-2016 08:10 PM
Kindly Try to explore your LabVIEW. go to, Help>>Find Examples.
11-16-2016 09:43 AM
Thank you for your response,
We were told we couldn't use event structures...
However i think i almost found how to do it, there is just one strange thing:
if our index is zero, the number that has to be written in our array get written in all elements, when the index is one the value is written in all elements exept were index is zero and so one.
How do I fix this so when the index is zero it ONLY gets written in the element with index zero .
Thanks in advance
11-16-2016 10:02 AM
@Lodde wrote:We were told we couldn't use event structures...
I HATE it when teachers tell people to not use good programming practices...
Learn to use Shift Registers. They will make your code A LOT easier to work with and eliminate the race conditions that you have in your code.