取消
顯示結果 
搜尋替代 
您的意思是: 

index array

The following VI is meant to select the next value in the index array (1,2,3,4 ...) every 10 seconds. Instead is starts with 1, then moves to 2 after 10s. , then the clock resets, and it goes back to 1. Is there something wrong with the shift register?
 
Thanks in advance
 
Valls
0 積分
1 條訊息(共 12 條)
4,309 檢視
A few things:
  1. You need to feed the value after the increment to the right shift register. (In your code, the left shift register always sees the same value!).
  2. Uset the elapsed time output instead of the complicated comparison
  3. Use a small delay to prevent the loop from spinning at a wastefully fast rate.
  4. Of course you also need some sort of stop condition once you run out of array, for example.
  5. ...
Here's a draft for points 1..3.

Message Edited by altenbach on 03-22-2007 09:42 AM

0 積分
2 條訊息(共 12 條)
4,301 檢視
Try this version of your vi.  You can read the first value rigth away with another shift register wired to the case structure and initialized to T.
0 積分
3 條訊息(共 12 條)
4,282 檢視

Thanks, that worked great! I just have one quick question. Instead of stopping the VI, I'd like the VI to continue running once it reaches the last value in the index array, instead of going back to 0. Do you know what I mean? Basically, select the next element in the array every 5 seconds just like it's doing now and when it gets to the last one I just wanted to remain there without stopping the VI automatically. Is that possible?

Thanks!

Valls

0 積分
4 條訊息(共 12 條)
4,281 檢視

I'm sorry but it doesn't let me open the file since it says it was written with LabView 9.1, and I'm using LabView 8.0.

Thanks anyway!

Valls

0 積分
5 條訊息(共 12 條)
4,275 檢視
Here it is for version 8.0
0 積分
6 條訊息(共 12 條)
4,271 檢視


@Valls wrote:

Thanks, that worked great! I just have one quick question. Instead of stopping the VI, I'd like the VI to continue running once it reaches the last value in the index array, instead of going back to 0. Do you know what I mean?


Use "In range and coerce" from the comparison palette.

0 積分
7 條訊息(共 12 條)
4,258 檢視
Thanks! that works perfectly
0 積分
8 條訊息(共 12 條)
4,251 檢視

I have a quick question about this VI: If I stop let's say at element #4, and I re-start the VI, 1 second has to elapse before the array goes back to 1. How could I modify the Vi so every time I would re-start it would automatically start from element #1?

Thanks

Valls

0 積分
9 條訊息(共 12 條)
4,242 檢視
The VI I mentioned previously is the one posted by ChillyWilly named Idex Array
0 積分
10 條訊息(共 12 條)
4,238 檢視