05-07-2022 07:20 PM
How to create a timer that starts after a boolean changes to TRUE and after the time we set elapses (for example 7 seconds) we go to the next state in the state machine
05-07-2022 07:24 PM
Can we assume that you studied what was suggested to you two weeks ago? Did you run into any specific problems?
05-07-2022 07:39 PM
It helped me a lot but I didn't quite understand it fully because I'm a beginner. I have to use NI DAQ hardware and after a signal crosses a threshold voltage the timer starts. So I used DAQmx read and a threshold constant in a "Greater than" function, that should give me a boolean and now i don't know how to start a timer when boolean turns TRUE
05-07-2022 07:49 PM
Most people here don't have your exact hardware, so start with a simple simulation, replacing the analog input with a front panel slider where you can change the voltage. Just keep reading it and when the threshold is reached, go to the state that counts down the timer. Feel free to attach what you made and we will offer some guidance.
05-07-2022 07:58 PM
I used your timer but I need it to start only when the current value is greater than my threshold, so I need your help to show me where to connect my ''greater than'' function. I honestly don't even know if this will work i just need to pass an exam
05-07-2022 08:12 PM
@grillmillivanilli wrote:
I used your timer but I need it to start only when the current value is greater than my threshold, so I need your help to show me where to connect my ''greater than'' function. I honestly don't even know if this will work i just need to pass an exam
I admire your honesty! Have you considered simply bribing the Instructor? Do you want our help in lying to the Instructor (who expects you to do your own work)?
What is it that you do not understand? You apparently know about the "Greater-than" function, which you can you say (True or False) that the Current Value is greater than the Threshold. Can you think of a LabVIEW Structure (that's a hint) that distinguishes between True and False, doing one set of code if True and another set of code if False (or maybe doing nothing if False)? Does that give you any clues?
You didn't attach your existing code (meaning the entire VI), so I can see, in context, what you are trying to do, and can maybe make more directed suggestions to help you to learn LabVIEW, which should be your goal, not simply "passing the Test". You might already have the requisite Structures in your code, in which case I'd be happy to point them out to you. I'll surely be viewing the LabVIEW Forums tomorrow, and if you've posted your VI, I'm certain you'll get more help ...
Bob Schor
05-07-2022 08:41 PM - edited 05-07-2022 08:44 PM
It's hard to tell much from a truncated picture, but don't use any inner loops that prevent the outer loop from spinning. Only the outermost loop is needed. You also still have glaring misconceptions about the magic of dataflow. If you wire to the stop condition of the FOR loop from the outside, that loop will either stop immediately, or continue forever. Do you know why?
05-07-2022 08:43 PM
Here you are, note that it's not finished and that it's probably not correct 😄
05-07-2022 09:01 PM
You need to "save fore previous" I cannot open Vis saved in LabVIEW 2021 yet.
05-08-2022 07:21 AM
for which version should i save it?