11-27-2012 08:04 PM
Sorry if this is a repeat question, but I have only been able to find bits and pieces of answers I'm looking for. Any guidance would be greatly appreciated.
First let me describe the system requirements:
1.) Headless PXI operation (Must Have)
2.) Reboot if Power Failure and start program (Must Have)
3.) Scheduled Start up and Shutdown times (Nice option to have, but not a must have now)
I've been told for Requirements 1&2 that LabVIEW Real-Time OS is the best method to use. However, I may have some non-NI PXI hardware and do not know/think they will work in LabVIEW Real-Time. My thought was to have LabVIEW Real-Time run and when my program starts, it would start the hypervisor to run Windows. (The non-NI PXI hardware has Windows dlls. They would run in the Windows OS instead of the Real-Time OS.)
So my first question is, is this feasible? Does anybody have any guidance on this proposed method?
The other method would be to have Windows in the PXI controller running and set my program as a Windows service that would start when Windows reboots/starts up. This method seems less convoluted than the other option, but never doing this type of program before, I am hesitant to trust the reliability of WIndows.
Lastly, has anybody scheduled a computer to start/shutdown with LabVIEW; all I saw was changing some options in the BIOS.
Thanks for all of your help and advice!
Cheers,
mcduff
11-28-2012 08:04 PM
You cannot selectively boot Windows on a Hypervisor system in the way you are describing. In the hypervisor mode LabVIEW RT accesses the hard-drive through software running on the Windows operating system. This allows the RT side to reboot as necessary, but also means that rebooting Windows will turn the RT system off. Thus having RT control the system state of Windows is not an option.
As for your system requirements:
1) Headless - Perfect for LabVIEW RT
If you have to use windows DLLs you of course need to have Windows as part of the equation.
An example of shutting down Windows with LabVIEW can be found here.
Overall it probably would be easier to not worry about rebooting either environment. Building the code to enter a wait state if there's nothing to do will mean many less headaches than restarting things. This could be as simple as checking the current time with the time of the next scheduled event and selecting whether to run the wait state again or to move on.
11-28-2012 08:13 PM
Craig,
Thanks for your advice and links, I'll look into them. I was not sure whether RT could load up a hypervisor and then Windows, thanks for clearing that up.
The reboot sequence would only be needed if our power supply is sketchy, that is, it may be intermittent and suddenly turn on and off. Since this device is expected to "be in the field", we would like it to start its DAQ program automatically in case of this event. (The unit may be located some distance away from us, so it would not be easy to manually restart it.)
Thanks again.
Cheers,
mcduff
11-28-2012 08:19 PM
Mcduff,
Between running things as windows services and having RT startup applications you should be able to account for unexpected power losses gracefully.
Also of note are BIOS settings that control if the system turns on when it first gets power. Because the power button is a toggle switch on PXI systems this should not be a problem, but it's good to keep in mind.
Good luck!
11-29-2012 10:13 PM
No promises, but since the RT OS that NI PXI systems run (Pharlap) is similar to Windows, there's a chance that the dll's you have may work.
These two articles should help you figure out if your dll's may run in RT:
How Can I Verify that My DLL is Executable in LabVIEW Real-Time?
11-29-2012 11:18 PM
Thanks for the advice!
I'll give this a try.
Cheers,
mcduff
11-30-2012 12:10 AM - edited 11-30-2012 12:11 AM
@mcduff wrote:
Thanks for the advice!
I'll give this a try.
Cheers,
mcduff
It may be better now, but a year and a half ago when I used hypervisor it caused a lot of headaches; a LOT of headaches. So I'd be cautious. If it's space you're trying to save, you can buy real small PC's now that often have the processing power you will need. Especially if you are just using it for display purposes and not any data crunching. You could just set up your hardware so when your RT starts it powers the PC.