05-12-2022 08:15 AM
Hello, I am a Labview noob with a bit of programming experience. Can anyone tell me how I can make a program that increments a user-defined value over a time period that the user also specifies, reaches the maximum value, and then decrements back to zero? For example, the program starts at 0, increments by a value of 1, waits 3s, then increments again, until it reaches a max value of 10. I've checked other posts here on related topics and ran this VI, but I do not know how to adapt it for my need.
I am using Labview 2019 SP1
Solved! Go to Solution.
05-12-2022 08:42 AM
Hi Hobo,
@InfamousHobo wrote:
For example, the program starts at 0, increments by a value of 1, waits 3s, then increments again, until it reaches a max value of 10. I've checked other posts here on related topics and ran this VI, but I do not know how to adapt it for my need.
All you need to change is the wait time in that VI from 500ms to 3s…
05-12-2022 08:49 AM
Hi Gerd, thank you for the input. I did that, but the counter just switches from the base value, to the max value, then goes back to the base one. Ideally, if the base value is 0, I want to see the counter go 1,2,3,4,5...etc. until it reaches the max, then count back down. Is there a way to make that happen?
05-12-2022 09:23 AM
I've tested the VI from your post and it is working fine.
Can you post your modify VI then we can have a look?
05-13-2022 01:25 AM
Here it is, sorry for the delayed answer. I am trying to figure out how to make it "hang on" to an incremented value for a set amount of time. When I run it now, it increments immediately to the highest value and returns to the lowest, also immediately. I want to make it increment and decrement more slowly if that's possible.
05-13-2022 01:46 AM - edited 05-13-2022 01:47 AM
You have an issue with your cabling for High and Low.
By arranging the cabling the function is going up and down as intended.
Please be aware that the T_Low as to be equal or greater than your load when starting the program or it will not react well. The same goes if you change the T_Low, it has to be Lower or equal to your current value otherwise you will experience bad behaviour.
05-13-2022 01:57 AM
You are right! Switching T_high and T_low fixed the issue. Thank you!!!