NetNathan
Lifetime Supporting Member
In my Intouch systems that are on Win 7, I use a script from the Intouch
"WWTech32" Script Function library... install the script function library files WWTech32.dll and WWTech32.wdf into your InTouch installation directory.
The Command is called "WWShutDownWinNT40".
I run a button script on "Left Key/Up".
But if you can get the UPS signal contact closure to the PLC, you can monitor with an Intouch data change script.
Here is info:
*******
WWShutDownWinNT40 - Shuts down Windows NT 4.0.
Function: Result = WWShutDownWinNT40( ShutDownFlag );
Return value: If an illegal ShutDownFlag is passed the return value will be a -2, if NT security will not allow the current user to shutdown NT or if there is a system error a -1 will be returned.
ShutDownFlag: (Integer) This tells the function how to shut the system down:
1 - Log the current user off NT.
2 - Shut down NT.
3 - Reboot the computer.
Example: This is how to cause Windows NT 4.0 to shutdown:
Result = WWShutDownWinNT40( 2 );
Note The user who is logged into Windows NT must have privileges to shut down or reboot the computer. The Windows NT security allows everyone the ability to log off the system. WWShutDownWinNT40() will force all applications to terminate at the time that the function is called.
*******
"WWTech32" Script Function library... install the script function library files WWTech32.dll and WWTech32.wdf into your InTouch installation directory.
The Command is called "WWShutDownWinNT40".
I run a button script on "Left Key/Up".
But if you can get the UPS signal contact closure to the PLC, you can monitor with an Intouch data change script.
Here is info:
*******
WWShutDownWinNT40 - Shuts down Windows NT 4.0.
Function: Result = WWShutDownWinNT40( ShutDownFlag );
Return value: If an illegal ShutDownFlag is passed the return value will be a -2, if NT security will not allow the current user to shutdown NT or if there is a system error a -1 will be returned.
ShutDownFlag: (Integer) This tells the function how to shut the system down:
1 - Log the current user off NT.
2 - Shut down NT.
3 - Reboot the computer.
Example: This is how to cause Windows NT 4.0 to shutdown:
Result = WWShutDownWinNT40( 2 );
Note The user who is logged into Windows NT must have privileges to shut down or reboot the computer. The Windows NT security allows everyone the ability to log off the system. WWShutDownWinNT40() will force all applications to terminate at the time that the function is called.
*******
Last edited: