IFIX调度 驱动启动 停止(使用FDS方式)

How To Disable The IGS Driver On An iFIX Enhanced Failover Standby SCADA


Products: Drivers iFIX  Categories: How To
Description
Most other 7.x drivers have the ability to stop the driver through VBA code. 
This is often used when a SCADA node is in Standby mode. 
However, this is not possible with the IGS driver. 
To implement similar behavior for the IGS driver, 
you have to enable or disable the channels based on the Active or Standby status of the SCADA node.


Resolution
1. The first thing to do is create an entry using DataServerInstaller.exe for the IGS driver and give your IGS Server a name. This is the name that you will replace for IGS_Server in the code below.


2. The next thing to do is create a schedule in iFIX on the Primary Node.
Schedule Name: IGS_Disable_Device
Expression: Fix32.SCADANAME.NSD.F_SCADASTATUS=2
Event Type: On True
Add the following code to this event:
‘=====CODE STARTS HERE ==========
'This schedule disables all IGS devices if the SCADA is in Standby Mode.
On Error GoTo ErrorHandler


Dim strName As String
Dim i As Integer


strName = "IGS_Devices"


'Dim mobjFixDataSystem As Object
Dim FixDataSystem As Object


'If mobjFixDataSystem Is Nothing Then
' Set mobjFixDataSystem = CreateObject("FixDataSystems.Intellution FD Data System Control")
'End If


'Set FixDataSystem = mobjFixDataSystem


Set FixDataSystem = CreateObject("FixDataSystems.Intellution FD Data System Control")
Set CreateGroup = FixDataSystem.Groups.Add(strName)
With FixDataSystem.Groups(strName).DataItems
'You will need to add the names of each one of the Channel.Device here. This adds them all to the group.
.Add "IGS_Server.CHN1.PLC0001._System._Enabled"
End With


With FixDataSystem.Groups(strName)
For i = 1 To .DataItems.Count
.DataItems(i).Value = 0
' do the bulk group write
.Write
Next i
End With
Set FixDataSystem = Nothing
Exit Sub
ErrorHandler:
MsgBox "Could not attach to the Data System OCX" & vbCrLf & _
Err.Number & ":" & Err.Description, , Err.Source


‘=====CODE ENDS HERE ==========


3. Then create a second schedule on the same node.


Schedule Name: IGS_Enable_Device
Expression: Fix32.SCADANAME.NSD.F_SCADASTATUS=1
Event Type: On True


Add the following code to this event:


‘=====CODE STARTS HERE ==========
'This schedule enables all IGS devices if the SCADA is in Active Mode.
On Error GoTo ErrorHandler


Dim strName As String
Dim i As Integer


strName = "IGS_Devices"


'Dim mobjFixDataSystem As Object
Dim FixDataSystem As Object


'If mobjFixDataSystem Is Nothing Then
' Set mobjFixDataSystem = CreateObject("FixDataSystems.Intellution FD Data System Control")
'End If


'Set FixDataSystem = mobjFixDataSystem


Set FixDataSystem = CreateObject("FixDataSystems.Intellution FD Data System Control")


Set CreateGroup = FixDataSystem.Groups.Add(strName)


With FixDataSystem.Groups(strName).DataItems
'You will need to add the names of each one of the  Channel.Device here. This adds them all to the group.
.Add "IGS_Server.CHN1.PLC0001._System._Enabled"
End With


With FixDataSystem.Groups(strName)
For i = 1 To .DataItems.Count
.DataItems(i).Value = 1
' do the bulk group write
.Write
Next i
End With


Set FixDataSystem = Nothing


Exit Sub


ErrorHandler:
MsgBox "Could not attach to the Data System OCX" & vbCrLf & _
Err.Number & ":" & Err.Description, , Err.Source


‘=====CODE ENDS HERE ==========


4. You may have to add the iFIX Data System Access Control v1.0 Type Library in the VBA References under Tools for each schedule.


5. Then repeat this process on the Secondary SCADA node.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值