04-20-2017 08:11 AM
Hi guys. I need help to make a counter for making arrays. I have a program where it gets reading from a height gauge. When I press the button it will take the reading and write onto an array, when I press again it will write again the following row. This will keep happening until a certain length of rows, afterward, it will have to go the next column and do the same. I also have a button where you rewrite the taken value if it turns out to be a mistake. For me to do this I will need a counter where the counter will link to take a reading button and to which row I add the data onto. The counter can't be a loop based. I tried various loop based counters and none of them work. Can someone help me, I think it will work if I use an event base but I can't get that working.
Thank you,
04-20-2017 08:17 AM
04-20-2017 10:11 AM
Why not store the data in a 1D continuous array and use the reshape array to display it to the user or write to file as a 2D array?
04-20-2017 12:13 PM
I don't understand what you mean by non-loop.
04-20-2017 08:55 PM
agree with Altenbach, what do you mean non-loop, and why not. How do you plan to access the initial code that selects the entries?
04-21-2017 08:05 AM
With all the constraints in place I am not able to use a shift register.
04-21-2017 08:08 AM
I am not to sure what you mean. I was able to make it work by using a sequence case with a true or false cause in the last sequence. It didn't think it can be so simple, I was over thinking the problem.
04-21-2017 08:09 AM
Loop doesn't work because after every added count I need to have Labview go through a series of code, and the code I cant put into the loop so it doesn't work for me.
04-21-2017 08:13 AM - edited 04-21-2017 08:14 AM
Hi Rugan,
With all the constraints in place I am not able to use a shift register.
Which "constraints"? Why no shift register?
You know a feedback node can be used without a loop around?
You know you can answer to different people with just one message? Or you can edit your own messages - instead of posting 3 messages without mentioning who you are answering?
On your "solution": most often a sequence frame is not the solution, but just a workaround! What about using a state machine?
04-21-2017 08:23 AM
I am 3 weeks old to labview. I tried the shift register and the event counter both doesn't work. I don't know what a feedback node is.
Thank you for the hint of replying to people. This was the first message here.