当前位置:中国高校自动化网 >> 现场总线 >> 浏览文章

wincc的看门狗vb源程序

文章来源:blog.gkong.com 作者:佚名 访问次数:


该文章讲述了wincc的看门狗vb源程序的电路原理和应用

wincc由于自身设计的问题,有时会出现假死的状态,这个时候我们一般会采取重新启动机器的方法,但是这样非常麻烦,这里我给大家提供一段vbs脚本,它可以初始化重新启动wincc的服务程序抑制假死。这段程序可以编写成为*.vbs也还可以放在wincc的脚本环境中通过事件来触发,可以起到看门狗的作用。

'***************************************************
wincc的看门狗vb源程序
'***************************************************


'*********************************
'Section for process termination
'*********************************
Set ProcessSet = GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf("Win32_Process")

for each process in ProcessSet 
 proname = ucase(Left(process.Name,6)) 
 Select Case proname
 Case "APDIAG"
  process.terminate
 Case "AUTOST"
  process.terminate
 Case "BILDAN"
  process.terminate
 Case "CAREPO"
  process.terminate
 Case "CC_DPS"
  process.terminate
 Case "CC_MSH"
  process.terminate
 Case "CCACTI"
  process.terminate
 Case "CCALGI"
  process.terminate
 Case "CCALGR"
  process.terminate
 Case "CCARCH"
  process.terminate
 Case "CCAUTH"
  process.terminate
 Case "CCCLIE"
  process.terminate
 Case "CCCOMM"
  process.terminate
 Case "CCCONF"
  process.terminate
 Case "CCCSIG"
  process.terminate
 Case "CCDELT"
  process.terminate
 Case "CCDIAG"
  process.terminate
 Case "CCDMCL"
  process.terminate
 Case "CCDMIV"
  process.terminate
 Case "CCLBMR"
  process.terminate
 Case "CCLICE"
  process.terminate
 Case "CCMCPA"
  process.terminate
 Case "CCMETA"
  process.terminate
 Case "CCMIGR"
  process.terminate
 Case "CCNSIN"
  process.terminate
 Case "CCONLC"
  process.terminate
 Case "CCOPCC"
  process.terminate
 Case "CCPACK"
  process.terminate
 Case "CCPERF"
  process.terminate
 Case "CCPJOB"
  process.terminate
 Case "CCPROJ"
  process.terminate
 Case "CCPTMR"
  process.terminate
 Case "CCREDC"
  process.terminate
 Case "CCREDU"
  process.terminate
 Case "CCRTSL"
  process.terminate
 Case "CCRUNR"
  process.terminate
 Case "CCSCRI"
  process.terminate
 Case "CCSSMR"
  process.terminate
 Case "CCSTAR"
  process.terminate
 Case "CCSYNC"
  process.terminate
 Case "CCTEXT"
  process.terminate
 Case "CCTLGA"
  process.terminate
 Case "CCTLGS"
  process.terminate
 Case "CCTMCO"
  process.terminate
 Case "CCTMTI"
  process.terminate
 Case "CCTTRT"
  process.terminate
 Case "CCTXTP"
  process.terminate
 Case "CCUAED"
  process.terminate
 Case "CCUAIU"
  process.terminate
 Case "CCUASE"
  process.terminate
 Case "CCUSRA"
  process.terminate
 Case "CCWRIT"
  process.terminate
 Case "CCWINC"
  process.terminate
 Case "CHANNE"
  process.terminate
 Case "CSIGRT"
  process.terminate
 Case "DDESER"
  process.terminate
 Case "DIAGSE"
  process.terminate
 Case "DYNWIZ"
  process.terminate
 Case "EASYLA"
  process.terminate
 Case "GRAFEX"
  process.terminate
 Case "GSCCS."
  process.terminate
 Case "GSCRT."
  process.terminate
 Case "HMRT.E"
  process.terminate
 Case "HORNCS"
  process.terminate
 Case "LBMCS."
  process.terminate
 Case "MSCS.E"
  process.terminate
 Case "OPCTAG"
  process.terminate
 Case "PASSCS"
  process.terminate
 Case "PASSDB"
  process.terminate
 Case "PASSRE"
  process.terminate
 Case "PDLCSA"
  process.terminate
 Case "PDLRT."
  process.terminate
 Case "PDLSER"
  process.terminate
 Case "PRINT1"
  process.terminate
 Case "PRINTI"
  process.terminate
 Case "PROJEC"
  process.terminate
 Case "PROTCS"
  process.terminate
 Case "PRTSCR"
  process.terminate
 Case "PTMCS."
  process.terminate
 Case "RD1CS."
  process.terminate
 Case "REDUND"
  process.terminate
 Case "RPTRT."
  process.terminate
 Case "S7TGTO"
  process.terminate
 Case "S7HWCN"
  process.terminate
 Case "SCRIPT"
  process.terminate
 Case "SDIAGR"
  process.terminate
 Case "SETUPD"
  process.terminate
 Case "SIGNSE"
  process.terminate
 Case "SIMULA"
  process.terminate
 Case "SOPCAE"
  process.terminate
 Case "SOPCHD"
  process.terminate
 Case "SOPCSR"
  process.terminate
 Case "SQLTOO"
  process.terminate
 Case "SSMSET"
  process.terminate
 Case "TAGANW"
  process.terminate
 Case "TEXTBI"
  process.terminate
 Case "TLGCS."
  process.terminate
 Case "TOUCHI"
  process.terminate
 Case "TRENDO"
  process.terminate
 Case "TTEDIT"
  process.terminate
 Case "VAR_EX"
  process.terminate
 Case "WINCCC"
  process.terminate
 Case "WINCCE"
  process.terminate
 Case "XREFC."
  process.terminate
 Case "XREFS."
  process.terminate
 Case "WEBNAV"
  process.terminate
 end select
next

相关文章:
  • MODBUS-RTU CRC校验码计算 VB源程序
  • 电源和数据可同一传输的新以太网供电系统
  • MOXA以太网架构的变电站
  • 上一篇:高速以太网CRC校验的实现
    下一篇:没有了
    最近更新