LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Computer boot by Labview

Solved!
Go to solution
Is it possible to produce computer booting from Labview6.0 on WIN-98 OS?
0 Kudos
Message 1 of 8
(5,083 Views)

Hi Alex,


Alex Muz wrote:
Is it possible to produce computer booting from Labview6.0 on WIN-98 OS?

 

      While I've never done this, I'd look into using the WakeOnLAN switch on an ethernet adapter.  Waking remote PC might be as simple as sending it a "Magic Packet".

If you don't mind wiring to the motherboard, connecting the Pwr pins via a relay should work - or, possibly, drive Pwr pins with TTL signal (possbly from another PCs LPT port.) 

 

I'm really curious what you're up to!

 

Cheers.

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Message 2 of 8
(5,074 Views)

tbd wrote:

      While I've never done this, I'd look into using the WakeOnLAN switch on an ethernet adapter.  Waking remote PC might be as simple as sending it a "Magic Packet".


Example VI: Developer Zone - Wake Up On Lan

 

Discussion Forums: Wake on Lan

Message Edited by Phillip Brooks on 01-06-2009 07:43 AM
Message 3 of 8
(5,045 Views)

Hi,

 

Probably I did not explain myself properly.

My Labview application is searching for errors. In case the application find error I want to reboot the computer that runs Labview application. Is it possible?

 

Thanks

0 Kudos
Message 4 of 8
(5,035 Views)
Solution
Accepted by topic author Alex_Muz

Hello Alex,

 

There is a LabVIEW example available on the National Instrument Developer Zone website that provides VI's that allow you shutdown or reboot your Windows computer.  According to example notes, this should work from LabVIEW 6.0 onwards.  To download the example, please follow these steps.

 

1. Navigate to http://www.ni.com/zone

2. Please scroll halfway down the page, to the 'Browse' Section

3. In the 'Search within results:' box, please search 'Restart Windows'

4. Find the first search result titled 'Shutting Down Windows 2000/NT/XP Programmatically'

 

You can use this code as an example for your application.  Your current VI will have a test condition checking for errors.  Where 'Error? = True', you will call similar code as the VI example.

 

Regards,

George T.
Senior Applications Engineer
National Instruments UK and Ireland
Message 5 of 8
(5,018 Views)

Hi Alex Muz,

 

You can simply check for errors in your program and then call the System Exec.vi.  This VI will allow you to send command line arguments to the computer.

 

For example, sending the "shutdown -r -t 0" command wll restart a Windows 2000 or XP computer immediately.  See this Web site for additional command line arguments for Windows 2000 and XP.  (You might need to do some searching for a similar command for Windows 98.)

 

It's very possible that there is a more "elegant" way to restart your Windows computer, but I know this can work.

 

Kevin S.

Applications Engineer

National Instruments

Message 6 of 8
(4,994 Views)

George,

 

I used your advice and now I can boot computer from Labview application while I find error.

 

Thanks

Alex

0 Kudos
Message 7 of 8
(4,946 Views)

Hello Alex,

 

I am glad to hear that the example has been useful.  Please keep in mind the link to the NI Developer Zone for finding further examples in the future. 

 

Regards,

George T.
Senior Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 8 of 8
(4,927 Views)