LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Rebooting RT Controller programmtically

Hello everyone,
Is there a way to reboot the RT controller (PXI-8196RT) from apps other than the MAX? I use the CopyFileUtility to download my dll to the controller. To start the dll, I need to reboot the controller from MAX. I like to be able to to this rebooting (or even downloading ) from my host application without using MAX. Thanks.
0 Kudos
Message 1 of 8
(6,472 Views)
Unfortunately, at this time there are no "RT Utilities" like there are in LabVIEW for CVI. In LabVIEW, you can reboot and perform other functions using some predefined subVIs. Do you have LabVIEW as well? Because, you could make a DLL from LabVIEW which you could call in CVI in order to implement these fucntions.

I hope this Helps,
Rick Kuhlman
Message 2 of 8
(6,435 Views)
Thanks! I am going to restart my rusty Labview brain again...
0 Kudos
Message 3 of 8
(6,414 Views)
I finally created a dll containing two vis: RT Ping Controllers and RT Reboot Controller . Both vis work in Labview environment. However, only the FindRTTarget (RT Ping Controllers.vi) function in the dll works in my Labwindows/CVI code. The RebootRTTarget function (RT Rebott Controller.vi) fails with error code 56 - "The network operation exceeded the user-specified or system time limit."  Anyone has ideas? Thanks.

Below is the dll h file generated by LV Application Builder:

#include "extcode.h"
#pragma pack(push)
#pragma pack(1)

#ifdef __cplusplus
extern "C" {
#endif

// RT Ping Controllers.vi
void __cdecl FindRTTarget(LVBoolean *LocalSubnet, char IPAddress[],
    long timeoutMs10000, char MACAddress[], long strMACLenght, char RTModel[],
    long strModelLength, char Hostname[], long strHostNameLength,
    char RTStatus[], long strRTStatusLen, long *ErrCode, LVBoolean *ErrorStatus,
    char ErrMsg[], long strErrMsgLength);

// RT Reboot Controller.vi
void __cdecl RebootRTTarget(LVBoolean *LocalSubnet, char TargetIPAddress[],
    char MACAddress[], LVBoolean *status, long *code, char ErrMsg[],
    long lenErrMsg);

long __cdecl LVDLLStatus(char *errStr, int errStrLen, void *module);

#ifdef __cplusplus
} // extern "C"
#endif

#pragma pack(pop)


0 Kudos
Message 4 of 8
(6,257 Views)
Hi,
I am not sure what happens with your application, but I attached one working solution.
The LabVIEW program in background has two functions:
    -> RT Ping Controllers.vi (with 2sec timeout) and
    -> RT Reboot Controller.vi

First of all I check all responding RT controllers within 2sec and afterwards I compare the result list with the input IP address (if you leave the IP address blank a dummy IP address will be used instead of a blank string) and if a correlation is present the RT Reboot Controller.vi will reboot.

BR,
ThSa

Message 5 of 8
(6,239 Views)
Thanks for the response. That is exactly how I corrected mine last night. I wired the two vis by connecting the output cluster from Ping Controller vi to the reboot vi instead of two separate vi (function) calls. I believe that is how you did yours since there is only one function in your dll.  I suspect the timeout value was passed over implicitly to the reboot vi when you call the ping controller vi.
0 Kudos
Message 6 of 8
(6,226 Views)
Hi,

this one is my LV implementation:



BR,
ThSa

Message Edited by ThSa on 10-06-2006 04:42 PM

0 Kudos
Message 7 of 8
(6,219 Views)
Thanks for the vi tip. This is somewhat similar to my implementation except the result comparison. If you just create the dll with only the reboot vi, the function will fail with error 56.
0 Kudos
Message 8 of 8
(6,211 Views)