LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need to equip the attached vi to reset

hi, i need to equip the attached vi to reset.
I need an input that allows me to reset the vi in ​​the defoult condition when the reset event occurs.
Thanks for the help you will give me.

0 Kudos
Message 1 of 6
(1,042 Views)

It seems like you just want to set the value in the feedback nodes, is that right?

 

You can make a boolean input called "Initialize" and then use "select" nodes or a case structure to send default values when true, or pass through the wires as they when false.

0 Kudos
Message 2 of 6
(995 Views)
I tried doing this so should it work? Thanks for your help
0 Kudos
Message 3 of 6
(976 Views)

What you need to implement is a FGV (Functional Global Variable).

It is a while loop that iterates once, then you use shitf registers to hold values.

You can implement States Machines Globally, for me are particularly useful to refactoring old spaghetti code.

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000015BjzSAE&l=es-MX

 

Hope it helps you!

 

 

 

 

 

 

0 Kudos
Message 4 of 6
(947 Views)

Hi Marco,

 

That might be what you want, but it's hard to tell from the original post what you want exactly. I assume you're calling this as a SubVI. Some data is stored in between calls in the feedback nodes. I'm not familiar with those pink blocks, are those for real-time programming? Do those store data between calls? If yes, you may have to call your function with default values like you show.

 

If you just want to initialize the feedback nodes, you could do something like below:

Capture.PNG

0 Kudos
Message 5 of 6
(920 Views)

hi, I would like to know if there is a way to start the generation of the function always from the same point.
Let me explain, every time I run the subvi in ​​question (which runs on fpga) the generation of the function starts from a different point.
help me please

0 Kudos
Message 6 of 6
(893 Views)