取消
显示结果 
搜索替代 
您的意思是: 

Non-Loop based counter

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,

0 项奖励
1 条消息(共 12 条)
4,191 次查看

Hi Rugan,

 

use a shift register to store your counter - as well as other shift registers to store your measurement data…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 项奖励
2 条消息(共 12 条)
4,187 次查看

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?

aputman
0 项奖励
3 条消息(共 12 条)
4,152 次查看

I don't understand what you mean by non-loop.

0 项奖励
4 条消息(共 12 条)
4,134 次查看

 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?

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 项奖励
5 条消息(共 12 条)
4,120 次查看

With all the constraints in place I am not able to use a shift register.

0 项奖励
6 条消息(共 12 条)
4,099 次查看

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.

0 项奖励
7 条消息(共 12 条)
4,096 次查看

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.

0 项奖励
8 条消息(共 12 条)
4,093 次查看

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 项奖励
9 条消息(共 12 条)
4,084 次查看

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.

0 项奖励
10 条消息(共 12 条)
4,079 次查看