12-02-2024 06:18 PM
Dear NI Community,
I am working on a project that includes a string potentiometer and pressure sensor. We recently added a DC motor to automate the system. We are able to run the motor and read/display the position and pressure values in continuous mode (until the loop condition is met). For the first VI, we have the while loop with DAQmx Analog (pressure and position read) and Digital (to run the motor switch), and we set up the specific condition for the loop so the loop runs until the final position is met.
Now, we need to run the system incrementally. The motor should move the piston every 2.5 cm, wait 10 seconds, read the pressure, and do it again until the condition is met, so from 0 cm to X cm with a 10-second break between each 2.5 cm increment.
What would be your recommendation for successfully building state-machine VI? Can you provide an example VI?
Please let me know if you have any questions!
Thank you in advance!
12-02-2024 06:53 PM
State machine sounds like a good choice. You can Modify the Simple State Machine LabVIEW Template