关于MCGS 点击:670 | 回复:0



yyddkk

    
  • 精华:1帖
  • 求助:0帖
  • 帖子:43帖 | 78回
  • 年度积分:0
  • 历史总积分:299
  • 注册:2003年5月11日
发表于:2006-12-30 17:28:00
楼主
硬件及软件配置:
  
  显示屏nTouch TPC105-TD03,软件MCGSE嵌入版 授权128点
  
  GE PLC 配置:两套 PLC90-30机架,电源,总线模块,CPU(带以太网口),填充模块
   一套 总线模块,以及VERSAMAX的I/O模块
   通过总线模块实现双机(双CPU)热备,两个带以太网口的CPU通过HUB和上位nTouch相连
  
  故障现象:
  
  在MCGSE画面中,我们做了一些表示设备状态的指示灯(只读属性),在运行过程中,发现一些指示灯
  在不断闪烁,后来,我们在模拟运行中,在设备调试中看,其对应的值一会儿从0变1,一会儿双从1变
  为0 ,不断交替变化,但我们的设备事实上此时一至处于一个状态,并没有变化,在PLC的相应指示灯
  来看,也没有变化,再用PLC的软件监视,其状态也没有变化,为什么在上位机的通道连接中看到它们
  在变化?这是由什么原因造成的呢?应该怎么办?
  
  脚本程序:
  
  ///////////////////////////////////////////////版本1
  !SetDevice(设备0,6,"Read(Q31=设备切换A)")
  if 设备切换A=0 then
   !SetDevice(设备0,6,"Read(Q32=设备切换A1)")
   if 设备切换A1=1 then
   !SetStgy(启动B停止A)
   endif
  else
   exit
  endif
  
  !SetDevice(设备1,6,"Read(Q32=设备切换B)")
  if 设备切换B=0 then
   !SetDevice(设备1,6,"Read(Q31=设备切换B1)")
   if 设备切换B1=1 then
   !SetStgy(启动A停止B)
   endif
  else
   exit
  endif
  
  
  
  
  
  /////////////////////////////////////////////////////版本2
  cpuflg=m1020
  if (cpuflg=0 and Acpu=1 and Bcpu=0) then
   !SetDevice(通用TCPIP父设备1,1,"")
   !SetDevice(设备1,1,"")
   !SetDevice(通用TCPIP父设备0,2,"")
   !SetDevice(设备0,2,"")
  else
   exit
  endif
  if (cpuflg=0 and Acpu=0 and Bcpu=1) then
   !SetDevice(通用TCPIP父设备0,1,"")
   !SetDevice(设备0,1,"")
   !SetDevice(通用TCPIP父设备1,2,"")
   !SetDevice(设备1,2,"")
  else
   exit
  endif
  
  
  
  
  
  
  ///////////////////////////////////////////////版本3
  IF Am1020=1 then
  else
   if cpuflg=0 then
   !SetDevice(通用TCPIP父设备1,1,"")
   !SetDevice(设备1,1,"")
   !SetDevice(通用TCPIP父设备0,2,"")
   !SetDevice(设备0,2,"")
   !sleep(10000)
   cpuflg=1
   endif
   IF Bm1020=1 then
   else
   !SetDevice(通用TCPIP父设备0,1,"")
   !SetDevice(设备0,1,"")
   !SetDevice(通用TCPIP父设备1,2,"")
   !SetDevice(设备1,2,"")
   !Sleep(10000)
   cpuflg=0
   endif
  endif


热门招聘
相关主题

官方公众号

智造工程师