LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

adjustable counter

Hello,
 
I'm trying to make an adjustable counter wich will count from <start> to <stop> value, reset and then
start again at <start>, each increment must be granted by a <true> returned to the counter after execution
of some vi's wich will sample some data from analog inputs. The idea is to sample some predifined ports
(port 1, port 2, port 3... etc) in loop. A have created a vi wich samples predifined ports, but failed to make
a counter wich switches port number after the sampling is done.
 
Hope somebody could help.
 
 
P.S the attached file includes my original design wich is using a built-in counter in a loop and vi works fine until built-in counter
       sends a value wich is higher then needed, is there a way to reset this counter in a loop?
0 Kudos
Message 1 of 4
(3,035 Views)
One way is to just use the Quotient & Remainder function.
0 Kudos
Message 2 of 4
(3,019 Views)
Another way: A shift register can be used to implement a counter which can be reset. It can also start at values other than zero and increment by values other than one.

Lynn
0 Kudos
Message 3 of 4
(3,012 Views)
johnsold, thanks for the solution Smiley Very Happy 


increment with shift-register solved my problem completely 😉
0 Kudos
Message 4 of 4
(3,007 Views)