How to achieve Event Redundancy?

We have a redundant SCADA system,

Where we require to run an event from any one computer at a time. (Same as Report server run as disables tandem processing of reports).

Here we are unable to comply the outcome using Reports.

Parents
  • I have done similar where I needed to record batch information to an SQL server, but only wanted the code to run on the primary report server (not have each event log twice).

    I don't recall exactly which forum I found the information, but basically I run a function on start-up that subscribes to the "trigger" tags and sets up the callback function

    FUNCTION FM_Subscribe()
    TagSubscribe("Hmi_MB2_Grp1_Rec_Status" ,250, "Raw",0,"FM_evtRecMB2_Grp1", 1 ,0);
    TagSubscribe("Hmi_MB2_Grp2_Rec_Status" ,250, "Raw",0,"FM_evtRecMB2_Grp2", 1 ,0);
    .
    .
    .
    END


    Then in each callback function check if the server is primary, if so (and for this application, bit 8 of the tag is high), run the function. If not, do nothing

    FUNCTION Fm_EvtRecMB2_Grp1(INT handle)
    INT subsVal
    INT iTask
    IF StrToInt(ServerInfoEx("Report",0,"")) = 1 THEN
    DebugMsg("MB2_Grp1 - This is Primary Server")

    subsVal = SubscriptionGetAttribute(handle, "Value");
    DebugMsg("Subscr MB2_Grp1="+IntToStr(subsVal)+","+IntToStr(subsVal BITAND 256));
    IF (subsVal BITAND 256) > 0 THEN
    iTask =TaskNew("_FM_Rec_Ing_MB2_Grp1","",8);
    TraceMsg("EvtRecMB2_Grp1 TaskID"+IntToStr(iTask));
    END!IF

    ELSE
    DebugMsg("MB2_Grp1 - this is standby server, nothing done")
    END!IF
    END!FUNCTION
Reply
  • I have done similar where I needed to record batch information to an SQL server, but only wanted the code to run on the primary report server (not have each event log twice).

    I don't recall exactly which forum I found the information, but basically I run a function on start-up that subscribes to the "trigger" tags and sets up the callback function

    FUNCTION FM_Subscribe()
    TagSubscribe("Hmi_MB2_Grp1_Rec_Status" ,250, "Raw",0,"FM_evtRecMB2_Grp1", 1 ,0);
    TagSubscribe("Hmi_MB2_Grp2_Rec_Status" ,250, "Raw",0,"FM_evtRecMB2_Grp2", 1 ,0);
    .
    .
    .
    END


    Then in each callback function check if the server is primary, if so (and for this application, bit 8 of the tag is high), run the function. If not, do nothing

    FUNCTION Fm_EvtRecMB2_Grp1(INT handle)
    INT subsVal
    INT iTask
    IF StrToInt(ServerInfoEx("Report",0,"")) = 1 THEN
    DebugMsg("MB2_Grp1 - This is Primary Server")

    subsVal = SubscriptionGetAttribute(handle, "Value");
    DebugMsg("Subscr MB2_Grp1="+IntToStr(subsVal)+","+IntToStr(subsVal BITAND 256));
    IF (subsVal BITAND 256) > 0 THEN
    iTask =TaskNew("_FM_Rec_Ing_MB2_Grp1","",8);
    TraceMsg("EvtRecMB2_Grp1 TaskID"+IntToStr(iTask));
    END!IF

    ELSE
    DebugMsg("MB2_Grp1 - this is standby server, nothing done")
    END!IF
    END!FUNCTION
Children
No Data