Shut down Windows HMI PC on contact closure ?

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.

*******
 
Last edited:
Nathan,

That's fantastic ! Thanks for posting it.

One of my colleagues has an InTouch 2014R2 project with a similar requirement, and I'll direct him to your post.
 
This script function has been around for some time...as you can see, it was for Win NT. It was originally written in 1997 and updated n 1998.
There are a few of script function libraries that some folks are not aware of....Here are all the things inside this library.

********
KBCD Topic#: 000467
Created: March 27, 1997
Updated: August 8, 1998

The FactorySuite Technical Support script function library contains the following script functions for Wonderware® InTouch™ Release 6.0 and later for Windows NT 4.0. All script functions listed below are fully documented here, later in this topic.
Click the CD icon below to install the script function library files WWTech32.dll and WWTech32.wdf into your InTouch installation directory.

Measurement Units Conversion: Area and Volume Calculations:

StdFromMetLinear()
MetFromStdLinear()
StdFromMetFluid()
MetFromStdFluid()
StdFromMetWeight()
MetFromStdWeight()

Area and Volume Calculations:
GeoArea()
GeoEqualSideArea()
GeoVolume()


Writing to a .INI File:

INIWriteString()
INIWriteInteger()
INIReadInteger()
INIReadString()


Writing to the Spcex.ini File:

SPCEXSetStartDate()
SPCEXSetStartTime()
SPCEXSetEndDate()
SPCEXSetEndTime()
SPCEXSetProduct()
SPCEXSetDataset()
SPCEXSetOutputFile()

Tag Support Functions:

TagExists()
GetDiscOnMsg()
GetDiscOffMsg()
(NEW) SetTagEU()

Miscellaneous Script Functions:

WWShutDownWinNT40()
WWShutDownWin95()
(NEW) SystemIsNT()
WWBeep32()
WWCntx32()


Installing the FactorySuite Technical Support Script Function Library

Click here to install the FactorySuite Technical Support script function library for Windows NT 4.0.
This will install the files Wwtech32.dll and Wwtech32.wdf into the designated InTouch installation directory. The script functions in this library are supported for InTouch Release 6.0 and later for Windows NT 4.0.
 
Last edited:
I use Dell XE2 pcs for our SCADA systems.
I was using the XE before it became XE2.
The 1 thing I liked most about the XE was it came with a remote start button input on the front of the PC. That option disappeared on the XE2 for some reason.
You can also still pursue finding the PC start button on the motherboard...as mentioned in another post.
However the choices above may not give you a "clean" shutdown of Indusoft, or any other running apps.

Running the windows script through Indusoft monitoring an plc input link from the Puls will be simpler, which is what you mentioned in your starting post.
 
Last edited:
what's the problem on 64-bit?
I'm very interested on the crawler solution. Thanks

hi yell
i used the rts/cts signals a few years ago for a project, and havent experienced any problems with 64-bit. I was using Visual Studio with C# to read/write the status of the bits on the RS232 Port.
You can check/set manually the bits from a lot of terminal programs, for example "hercules rs232".
 

Similar Topics

I have a panelview plus 7,and often popup a messagebox"application servicesd.exe encountered a serious error and must shut down"I refreshed the...
Replies
0
Views
1,074
Hi, I need to upgrade the ups on the FactoryTalk Scada Servers. I have a primary server, secondary server and Historian server. 1) Is there a...
Replies
4
Views
2,578
Hi, I just experienced something strange. I connected a Field PG (PG/PC adress 0) on a profibus network to monitor something in the field. I...
Replies
16
Views
6,858
So I am wondering how many other troubleshooters force things on or write around things temporarily to get a machine running, then come back and...
Replies
36
Views
12,878
There is a plant shutdown for around 5 months. We are planning to preserve the control system for maintenance reasons. Any standards for...
Replies
4
Views
1,649
Back
Top Bottom