Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

cDAQ 9139 (Windows Embedded) Battery Management

I am trying to watch a Windows-recognized battery to do some sort of action based on the status of the power input.

 

The attached VI (found on these forums) works on my Windows 7 development computer, but when I run on my cDAQ 3139 running Windows Embedded Standard in 1) Labview and 2) as .exe, it fails.

 

 

Screenshot_121713_122705_PM.jpg then, Screenshot_121713_122820_PM.jpg

 

My Googling says that there is a difference between the kernel32.dll functions available based on which operating system you are running. And you have to be registered with Microsoft as an OEM to get access to the Windows Embedded SDK for the kernel32.dll?

 

Is there another function I can use to query the battery status? 

0 Kudos
Message 1 of 2
(3,802 Views)

Hello,

 

I have done some searching outside of NI and found a few things that might be helpful. This is a post from someone else who received the RtlCopyContext error:

 

http://social.technet.microsoft.com/Forums/windows/en-US/f5e6770b-d77b-4412-a67c-e56fcbff6b23/entry-...

 

As far as some other functions for Windows Embedded, you might try GetSystemPowerStatusEx and GetSystemPowerStatusEx2, however you might be a bit more insight on a Microsoft forum about their functions:

 

http://msdn.microsoft.com/en-us/library/ee500626.aspx

 

From the LabVIEW side, here are some options that you have where you could try to point to that DLL differently:

1. Select Specify path on diagram from within the dialog box of the Call Library Function Node and hardcode the path to the shared library to the path in input on the block diagram.

2. Enter the name of the DLL itself without its path in the Call Library Function Node.

3. Delete the WinAPI DLL from the data directory. Onlaunch, your executable will now spend some time searching for the DLL. To prevent this dehavior, add the <Windows>\SYSTEM32 folder to the search path of the executable by going to Tools >> Options...>>Paths>>VI Search Path. 

 

Thanks!

Stephanie S.
Application Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,745 Views)