From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
I am developing a VI that needs an output motor to be switched "ON" for some fixed timing. Like If an event is sensed using a sensor, the motor should run for exactly 2 minutes and then stop. Please help how to achieve it and what logic or function should be used to achieve this.
Frist write a simulation code with State machine architecture. You can find the template for State machine here. Use Elapse time or Wait Until Next ms Multiple for timing control( In this method you can get 1ms accuracy). If every thing working fine in this simulation, change your code to interface hardware.