Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    Double event entry in event recorder when event text contains a variable text via placeholder {0}

    Double event entry in event recorder when event text contains a variable text via placeholder {0}

    Tardigrade
    Established Member

    We are using Event Recorder App V1.5.5 on a machine. I noticed that whenever I set an event with text that contains a place holder {0} and clear the event in the next step.  I always get minimal 2 entrys in the event recorder. I also tried waiting 2 seconds between set and clear event but i still get minimal 2 event in the event recorder. The only way to prevent it, is to remove the place holder {0} then everything works fine, but I need that place holder for the variable data. Is there some way to prevent this double entry and use the place holder?

    7 REPLIES 7

    nexidator
    Community Moderator
    Community Moderator

    This looks really weird, but actually I am quite sure there is no general problem with event texts using {0}.

    • What version of the EventRecorder Service (= Runtime) are you using?
    • Can you post the source code of the step where you set the event?

    (Alternatively, you can contact our helpdesk so we can give you directions how you can send us your project for analysing the behavior.)

    Event runtime version seems to be V 1.5.5.4

    Tardigrade_0-1677655823298.png

    The even recorder app seems to be V1.5.5

    Tardigrade_1-1677655909081.png

    step N246:

    // Info Message with current holder nr: if holder was changes
    IF ( YZAxis.Unit.OutCmd.HolderNo = _holderNoMemory )
    THEN
    _retVal := OK;
    ELSE
    IF (_eventPlc = 0)
    THEN
    _eventPlc := SetEvent(OpconEventClass.INFO, INFO_HOLDER_NR, INT_TO_STRING(YZAxis.Unit.OutCmd.HolderNo), Lock:= FALSE);
    _holderNoMemory := YZAxis.Unit.OutCmd.HolderNo;
    _retVal := OpconSetTimeout(_waitTimeEvent,_waitTimer);
    ELSE
    _retVal := RUNNING;
    END_IF
    END_IF

    step N247:

    // Clear holder Nr info message
    IF (_eventPlc <> 0)
    THEN
    IF ( OpconCheckTimeout(_waitTimer) = OK )
    THEN
    ClearEvent(OpconEventClass.INFO, _eventPlc);
    _eventPlc := 0;
    _retVal := OK;
    ELSE
    _retVal := RUNNING;
    END_IF
    ELSE
    _retVal := OK;
    END_IF

    Tardigrade_2-1677656613698.png

     

    nexidator
    Community Moderator
    Community Moderator

    Thanks for posting your code. As expected, it doesn't look like it can be the reason for the duplicate entry. (I am not sure if  "ELSE _retVal:=RUNNING" in the first step makes much sense, but I don't see how it could run into this line anyway.)

    One thing I forget to ask: Does the event appear twice in the HMI as well? I guess not, and otherwise this must really be a problem of the EventRecorder service.

    Can you try if it helps to update to the latest version of the EventRecorder service (V1.5.9)? I have seen in the change history that some bugs have been fixed since the version you are using.

    I Installed the new version of eventrecorder service V1.5.9.1 and event recorder app V1.5.7.7 , export, deployed including std. but the result stays the same.

    Tardigrade_0-1677760647208.png

    On the HMI I only see one Message.

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist