LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

high-speed software timing and multi-threading

HARDWARE/SOFTWARE BEING USED:
LabVIEW 6.0.2 on MacOS 9.1 (G4-400MHz).

BACKGROUND:
I was having some problems with accurate high-speed (~4 msec) sampling of the serial port. At first I thought this was due to the way I had my serial port configured (see my last post, "http://exchange.ni.com/servlet/Redirect?id=1052290" for more information).

PROBLEM:
To test this, I set up a loop that was empty, except for some code to monitor the timing of the loop. As it turned out, even when the loop was set to execute once every millisecond (using a "Wait"), occasionally it would take as long as 15 milliseconds. The delay was inconsistent, but I particularly noticed it when the mouse pointer was left over the
"Abort" button on the VI's Toolbar until the popup descriptor appeared, and then dragged off again.

The fact that the interface can interfere with the loop timing to that extent leads me to believe that doing high-speed software-timed computing in LabVIEW on my current system is implausible.

MY QUESTION:
Would either of the following help this situation?
-OS with preemptive multitasking
-Faster processor

If so, what sort of computer/OS would be best suited for a task that requires high-speed, software timed sampling?

Also, does anyone have an idea of when the Mac OS-X version of LabVIEW will be coming out? I'd hate to switch to windows if it will be coming out soon...

Thanks,
Zach Crittendon
0 Kudos
Message 1 of 4
(2,423 Views)
There's a big difference between a prememptive multitasking OS and a real-time OS. NI has some real-time products. There are a couple real-time tutorials/discussions on NI's site. You might want to do a search to see what you can find.
0 Kudos
Message 2 of 4
(2,422 Views)
In the mean time, you can use the VI properties to turn off all of the access to the buttons and the menus. Do not set any "Tips" for the controls on screen either. This will be more stable. You will still notice a change when the mouse is moved around, but it should be considerably less.

Rob
0 Kudos
Message 3 of 4
(2,422 Views)
Hi Zach,

I beleive you have to choices.

1) Switch to a real time OS.

2) Move the timing from software control to hardware control.

Once your timing drops below 50ms between events, you should start thinking about using hardware timing. At 10ms alarms should be going off if it is to be controlled via software.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 4
(2,421 Views)