LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

initial values?

Hi all.

I want to create a formula node with a counter in it. Each time a condition
is met, the counter is incremented. Can anyone tell me how to initialise
the counter to 0, as I am stumped. I can't feed a numerical input in, as
that would reset it to zero each time. Maybe this is obvious and I am just
being stupid, but either way, please help!

Thank you,
Wawa
0 Kudos
Message 1 of 4
(3,014 Views)
I think I'm missing something, can't you just set the counter variable to zero? If this doesn't help then maybe you could provide some more detail as to how you are using this formula node or maybe some sample code and we might be able to help you out some more.

Brian
0 Kudos
Message 2 of 4
(3,014 Views)
Be for it enters the formula node, can you assign a variable to the counter
and feed 0 to this variable and read it after formula node is done. If it
doesn't work out, it's better to give an example posting your question.

Nam.

Wawa wrote in message
news:a56fng$lnj$1@paris.btinternet.com...
> Hi all.
>
> I want to create a formula node with a counter in it. Each time a
condition
> is met, the counter is incremented. Can anyone tell me how to initialise
> the counter to 0, as I am stumped. I can't feed a numerical input in, as
> that would reset it to zero each time. Maybe this is obvious and I am
just
> being stupid, but either way, please help!
>
> Thank you,
> Wawa
>
>
0 Kudos
Message 3 of 4
(3,014 Views)
If the formula node is in a loop, or in a subVI, you can save the current count value in a shift register. A shift register will read 0 the first iteration if it is not innitiallized.
0 Kudos
Message 4 of 4
(3,014 Views)