LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Close to realtime applications with CVI

Hi experts,

I've 2 questions with respect to the attached example:

1) I like to get info about the current network status of a Win-NT/2000 workstation. For this I call some
windows-own console applications like net.exe, netstat.exe, or ipconfig.exe from inside my CVI program. An example of such a call is e.g.

LaunchExecutableEx("cmd.exe /C ipconfig > temp.txt",
LE_HIDE, &handle);

This invisibly opens a console window and the screen output of ipconfig.exe is redirected to a temp file. The file is then evaluated. Question: Is there a way to direct the screen output directly to a buffer inside the CVI program ?

2) I succeeded in using PSAPI.DLL to list all currently active processes (operating
system and user applications). The PSAPI.DLL is for Win-NT/2000 only. - Can someone present a snippet of code to show, how the same procedure can de done with Win 98 ?

My background:

Since 4 years I'm using LW CVI to build ATE systems using PC's under Win-NT/2000. Parts of the hardware (e.g. I2C bus devices) must be handshaked within less than 10 millisecs. With diagnostic tests I could verify that using a 400 MHz clocked Pentium, Win-NT/2000 makes possible such 'close to realtime' performance under the following conditions:

a) Usage of a standalone workstation installation without network services started
b) Customers are not allowed to run other applications in parallel to the CVI program

My ATE systems are sold under these warranty conditions - do you think customers are obeying this ?
Many do not! Nevertheless, they're coming to claim in-warranty support for timeout errors.

My intended solution is to track in detail the status of the ATE PC in the moment, the custo
mer starts
the CVI application: If a network service is found active or 'forbidden applications' (like e.g. findfast.exe or iexplore.exe) are found running, the customer is kindly asked to close these applications.

Heinz Hoeffken
0 Kudos
Message 1 of 2
(3,027 Views)
Heinz-

Some info for you, not really an answer.

I believe Windows NT has some unbounded latencies much in excess of 10ms. The following link http://www.realtime-info.be/magazine/98q3/index983.htm

is to a Belgian company that has apparently done extensive research on suitability of NT for near-realtime applications. They have available a free evaluation of NT as an RTOS that they will e-mail to you if you sign their on-line agreement. I seem to recall that their report on NT claims latencies of as great as 25 msec. I believe they excluded networking functionality when they did their measurements.

They also have lots of info on real-time NT extensions that either replace or supplement the standard NT kernel.

Windows CE is more truly a real-time OS, tha
t retains the Win32 API. There's an embedded NT available, but it's not any more real-time than standard NT as far as I know. I don't imagine that the CVI run-time engine will run on top of Windows CE, maybe one of the experts knows.

You can try using the NT "realtime" process priority class but this is always a bit dicey by my experience. The "realtime" Windows NT priority class was an afterthought by Microsoft, and it gets on top of so much stuff you have to really be careful using it. Even keystrokes and mouse clicks are pre-empted at this priority level.

Hope this helps some.

Menchar
0 Kudos
Message 2 of 2
(3,026 Views)