08-19-2024 12:17 PM
I have a program that counts motor revolutions up to a certain number of revolutions then resets. So currently I am using a chain of daqmx functions: stop, clear, then start but the counter doesn't seem to start back up afterwards. Does anyone know how I can reset the counter simply and systematically?
08-19-2024 12:42 PM
I am trying to add properties to a daqmx channel property node but when I search and select the property I want (counter:reset:enable), nothing happens. It only closes the search pop up without adding the property to the select property popup. Does anyone know how to fix this?
08-19-2024 02:28 PM
1. You really should put a few minutes into neatening up your diagram wiring. It's going to be helpful to *you* in the long run but in the meantime, it also helps us to help you.
2. The most immediate few things I'll recommend are:
-Kevin P
08-19-2024 02:36 PM - edited 08-19-2024 02:39 PM
You created a Task, started it, then in your loop, you read one sample, and at a certain time later, stopped the Task, cleared the Task (which makes it disappear!), then tried to start a no-longer-present Task (trying to cheat by using the now-useless "former Task Reference" won't work).
Try removing the Clear Task from inside the Case statement.
Here's some advice -- always run wires in and out of (most) structures on the left and right sides. Using the top and bottom of a Case Structure makes the code devilishly difficult to read. Here's a partial fix -- select all of the code in the VI, then click on the "Broom" symbol on the menu bar to "clean up the mess".
Bob Schor