LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
Vij@y

Programmatically create Incrementer and Decrementer

Status: Declined
LabVIEW discourages this kind of programming. Do not create incrementers in LabVIEW using local variables. Either the state should be passed into and out of the subVI completely (the ideal when possible) or kept locally using shift registers/feedback nodes.

Some people who are new to LV (Like me) were struggle to implement the Incrementer or decrementer logic programmatically. For instance, at some places we need to execute the code in a sequential manner, we will badly need of this logic. Thing is, Its so easy If you have just follow the steps what I post here.

 

Steps:

1. Place the Increment operator from the functon palatte

2. Create a indicator for the increment operator

3. Now create a Local variable from Indicator and give it as a input to the Increment operator

 

You are done now. If you want to realize the logic for Decrementer, simply replace the increment operator with decrement operator. 

 

 

If this Idea witnessed already, Kindly ignore this.

 

Incrementer and decrementer

 

11 Comments
Darren
Proven Zealot
Status changed to: Declined
LabVIEW discourages this kind of programming. Do not create incrementers in LabVIEW using local variables. Either the state should be passed into and out of the subVI completely (the ideal when possible) or kept locally using shift registers/feedback nodes.