09-02-2012 10:12 PM
Hi,
How do I declare and use a static int variable in a formula node?
09-02-2012 11:15 PM
Hi splee,
You can look at Formulat node Syntax
09-02-2012 11:21 PM
Thanks but I can't find the "static" construct
09-02-2012 11:34 PM
Hi Splee,
Control values are static if they are not wired to the connector pane, so you can write to them using a local variable
09-02-2012 11:35 PM
Hi Splee,
What you want to do and what do you mean by Static int variable? please explain your scenario
09-02-2012 11:41 PM
Basically I am using LabVIEW as a VI for my Vision Builder Automatic Inspection. VBAI is updating the Vi with : update_count. The update can happen anytime.
In the LV vi I want to keep track of how many times the update_count has happened. So it should start with 0, then 1, 2, 3, 4,..
I want to implement this using formula node..
09-02-2012 11:42 PM
.. and to make it more complicated, I want to be able to reset update_count if certain condition happens
09-02-2012 11:44 PM
@danil33 wrote:
Hi Splee,
Control values are static if they are not wired to the connector pane, so you can write to them using a local variable
Don't quite understand this.. can give just a very simple snippet?
09-02-2012 11:48 PM
Am not sure about the VBAI you mentioned but For updating the count don't you think shift register in a while loop and a case structure is sufficient?. Try to implement that way its very simple.
09-03-2012 12:05 AM
OK this is my code snippet, without using formula node.
I do not know how to:
- reset the feedback node in the first sequence to 0, if a certain event happens
- reset the feedback node in the second sequence to 0, if a certain event happens.
Thats why I thought of using formula node, and forget all the arrays and feedback node stuff... but I don't know how to use a static variable