LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re-Initialize after rerun the VI

Hi Mike,

Sorry for lag of information again. What i mean is once i change the value from 5 to other value, lets say 8 and i stop the VI. When i rerun the VI, the value now stick to 8 and not 5. What i wish is that i hope the value will always be 5 even after i change the value.

Thanks for ur attention and sry for my mistake.

0 Kudos
Message 11 of 20
(1,663 Views)

Hi shoar,

Can i know how to create the icon like u show to me. I really donno where to get it and what its for.

Thanks for ur help.

0 Kudos
Message 12 of 20
(1,665 Views)

Hi neiviv,

ok, i think i understand you correct. I think thats exactly what happens in my last attached example. If you start the vi, both shift registers will set to 0 and this value will add to the control value. and now it is 5 again.

If you want to set the control value at startup everytime to 5, create a property of this control and set the value to 5 (see the attached example)

Hope this helps.

Mike

0 Kudos
Message 13 of 20
(1,653 Views)

Hi Mike,

Its exactly wat i wan. Thanks for ur help.

Mind to help me for another problem? Is it possible for Labview to run a VI first(Same as the re-initialize all the value but it is use to initialize the hardware through controller) everytime we re-run a main VI without pressing any button or watever control.

For example, my VI containing 2 control values X and Y which represent the coordinate of my robot arm, after we rerun the robot(value changed b4), the vaue will return to the default value but my robot still at the previous location. Is it posible to return the robot to tat coordinate again without pressing any button(I have created a VI to return the robot to homing position, which is the default position, now i only need to run tat VI first everytime i rerun the main VI).

Thanks to you to Shoar.

0 Kudos
Message 14 of 20
(1,637 Views)

Hi neiviv,

as i wrote before, you can use a state mashine. Use the example finder. Which communication way are you using to communicate with your robot (serial)? If you use a state mashine you can define one case for initialization (control, FP, Robot arm, ...) and another one your the main program.

Mike

0 Kudos
Message 15 of 20
(1,631 Views)

State machine, i am not quite familiar with it using labview but i will try to test it out. I am using a USB port right now.

Thanks. 

0 Kudos
Message 16 of 20
(1,628 Views)

Hi neiviv,

here is an example. Hope it helps.

Mike

0 Kudos
Message 17 of 20
(1,616 Views)

Hi Mike,

Thanks for ur sugestion and i have understand the concept of using state machine and how to solve my problem.

Thanks alot and i really appreciate it.

Thanks to shroa and other who spend time reading as well.

Best Regards,

Neiviv

0 Kudos
Message 18 of 20
(1,600 Views)
Here is how to do the VI reset programatically.
This will reset the VI to all the default values.
 
Red
VI Technology
CLAD
Download All
0 Kudos
Message 19 of 20
(1,579 Views)
Hi Shroa,
 
Thanks for showing me how to get the icon and my program is well functioning now.
 
Thanks for ur time and i really appreciate it.
 
Thanks.
0 Kudos
Message 20 of 20
(1,561 Views)