|
Re: timer help with labview
I've attached a picture of two simple examples. I'm sure a labview expert could do better.
In the top one I used a stacked sequence inside a while loop. This [sets the motor speed to 1, waits a millisecond], [sets the motor speed to 0, waits 11 milliseconds] repeat.
The top one uses the system timer. It grabs the current time in milliseconds (Tick Count), computes the remainder of that divided by 12 (Quotient and Remainder), and checks if the answer is 0 (Equal to 0?). (Select) is used to pass 1 if the remainder is 0 and 0 if the remainder isn't 0 to (Set Speed). This code would need to be run in a loop more often than once per millisecond.
For reference, the Jaguars are updated every 5ms, and the victors and spikes are updated slower. It is likely that this code will not behave as expected due to this. 12 milliseconds is a very short amount of time: why do you need to control them like this?
More to the point, why don't you simply set the speed to 1/12?
|