02-26-2008 09:51 AM
Right now the only thing limiting your file write loop speed is the time taken to actually write to the file. Try tossing in a "Wait until next millisecond multiple" to introduce a 100 or 200 millisecond wait.
Alternatively, you could use the "Write to Spreadsheet File" under File I/O and wire a true to the "transpose" option, which would give you basically limitless space in excel.
02-26-2008 10:02 AM
Thanks Jeff, where exactly should I toss my "Wait until next millisecond multiple"?
Thanks
Best wishes
Robert
02-26-2008 10:07 AM - edited 02-26-2008 10:14 AM
The "Wait ms" and "Wait Until Next ms Multiple" vis will delay whatever node they are placed on. For instance, if you place it outside all the loops, it will delay the start of the program, and then everything will run as normal. If you place it inside your file write loop, it will delay the start of the loop every time it iterates.
edit - I attached a simple example. Go to the block diagram, turn on Execution Highlighting (the lightbult button) and run the VI. The execution will be delayed by one second at the beginning of each iteration.
02-26-2008 04:55 PM
JeffOverton wrote:
The "Wait ms" and "Wait Until Next ms Multiple" vis will delay whatever node they are placed on. For instance, if you place it outside all the loops, it will delay the start of the program, and then everything will run as normal. If you place it inside your file write loop, it will delay the start of the loop every time it iterates.
02-27-2008 07:44 AM
02-27-2008 08:17 AM
I created a little VI in LV8.2 as a demo.
When it runs, you'll see that the indicator jumps immediately to 1, but the wait statement of 10,000 msec causes the loop to take 10 seconds. The loop only runs once due to the True constant. At which time the indicator is reset to 0 and the program ends.
If the loop ran continuously, each iteration would take 10 seconds, but the other stuff inside the loop could happen anytime during that 10 seconds, and for something as simple as setting and indicator, it would essentially happen at the beginning of the loop.
03-17-2008 09:35 AM
Hi
The code is working well, thank you. I would like
to make a modification. There are three optical sensors and the LabVIEW
is counting the time between individual pulses. What I would like to do is count the
time between different pulses. For example there is sensor on the input
drive and one on rotor, I would like to see the time between the drive and rotor
pulses, so I can check their phase relationship. How would I go about
this?
Also, is there an easy way to detecting which direction the rotor is rotating?
Thanks for your help
Best wishes
Robert