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.
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.