05-16-2014 06:08 AM
Hi
I'm begginer that's why I have lot of problems with this task. I have to add data to the array after pushing button. So I started with initializing counter with 1. When add button is pressed in case structure I have to increment the last index of the array and record data which respond to this index.
The problem is that the index of the array doesn't change.
05-16-2014 06:27 AM - edited 05-16-2014 06:27 AM
Hi lubie,
well, when you need to "add data to an array" then why do you initialize the array with each button click?
Appending data to an array requires the BuildArray function. The array should be stored in a shift register.
Start again… 🙂
05-16-2014 06:58 AM
Hi GerdW
Thanks for your tip. Unfortunately English is not my native language, so could you describe it more clearly for me.
I can't imagine how to fix it, because after pushing button the index of the array must increment. Using Build Array function i can't see the solution.
05-16-2014 07:11 AM
Hello !
Send your diagram and I will to correct it to show you one solution
05-16-2014 07:19 AM - edited 05-16-2014 07:23 AM
Hi Slate,
I've already send it. But I did some changes in diagram.
Edit: The problem is that we have to declarate the size of the array before we use it. It's possible like for instance in c++ to use dynamic allocation ?
05-16-2014 07:50 AM
I don't understand really well your problem, can you explain us what do you want to do with this table ?
For me your code works, when you push you button you have +1 in your indicator !
Why do you want to to know the size of your array ?
05-16-2014 08:18 AM - edited 05-16-2014 08:28 AM
Hi lubie,
The problem is that we have to declarate the size of the array before we use it.
Why? Who says so?
It's possible like for instance in c++ to use dynamic allocation ?
That's standard for LabVIEW: arrays are dynamically sized…
Don't get me wrong: while you can work with dynamically sized arrays easily in LabVIEW it is recommended to have fixed sized arrays for larger data blocks!
As this is very basic LabVIEW knowledge I suggest you to take all those free online courses offered by NI: http://www.ni.com/gettingstarted/labviewbasics/
05-16-2014 08:34 AM
Hi GerdW
Thanks, I better to see all of those free courses.
05-16-2014 08:46 AM
Try this
Frans
05-16-2014 09:09 AM
I can't. I have older Labview.