01-06-2009 12:55 AM
Solved! Go to Solution.
01-06-2009 01:38 AM
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.
01-06-2009 06:40 AM - edited 01-06-2009 06:43 AM
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
01-06-2009 07:01 AM
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
01-06-2009 09:23 AM
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,
01-06-2009 02:13 PM
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
01-07-2009 06:49 AM
George,
I used your advice and now I can boot computer from Labview application while I find error.
Thanks
Alex
01-07-2009 08:28 AM
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,