Hey everyone,
I noticed that in order to get a good value out of a device I'm reading data from (using a std-mil-1553 bus), I have to take somewhere between 1000 and 10,000 samples and average them.
I originally had a for loop right in the default state of my state machine that took 10,000 samples, and the data was good. But unfortunately, the user had to wait about 4 seconds for the system to respond to his input, as the state machine wouldn't examine changed inputs as long as it was sampling.
So instead, I tried setting it up so that the system would take one sample each time through the state mach
ine, so that the user wouldn't have to wait around for the computer.
Now, it takes samples at less than 1/100th the rate.
What is slowing the system down? Is it the state machine sub-vi's (setting up the queue of events and so forth) or is it all those local variables I added?
It doesn't seem like it should be a CPU intensive process, and I'm running this on a P-III.
Attached program is the one that samples once per default state. I foolishly saved over the old one, but I can easily remake it.
-Dobbs