Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    Example implementation for PnozMulti2 usage without EmergencySwitch AddOn available?

    Example implementation for PnozMulti2 usage without EmergencySwitch AddOn available?

    florrens
    Established Member

    The PnozMulti2 comment for the EmStopEventClass parameter contains a hint regarding missing software actions if the PnozMulti2 is used without the EmergencySwitch AddOn.

    Is there a good example implementation available for PnozMulti2 usage without EmergencySwitch AddOn?

    florrens_1-1702033701017.png

     

     

    3 REPLIES 3

    SteffenR-
    Community Moderator
    Community Moderator

    Best way would be, if you have a signal "Control On" and use the falling edge for a cancel (this is what the ControlOn add-on does).

    Alternatively this code should work (not tested):

     

    IF( _cancelSet )
    THEN
      // Cancel must be reset in the same way like Execute
      Station.Unit.Cancel := FALSE;
      _cancelSet := FALSE;
    END_IF
    
    _emStopR(CLK := PnozMultiAddon.OutImm.EmStop);
    IF( _emStopR.Q )
    THEN
      Station.Unit.Cancel := TRUE;
      _cancelSet := TRUE;
    END_IF

     

     

    But the signal is flickering during emergency stop which causes many Cancels with the code above:

    SteffenR_0-1702042157882.png

     

    You could try to add a TOF to avoid the flickering.

    florrens
    Established Member

    Thank you for the suggestion Steffen! I decided to use the inverted K910 signal from the PnozMulti2 which seems to be more stable. To be able to feed the  rEmergencyStop input of the StationLamp addon I introduced an own flag EmStopActive.

    florrens_0-1702291660965.png

    I am currently testing this solution and will feedback after I can confirm it works reliable.

    florrens
    Established Member

    This is the code I am using now and it is working for me. BinIo._K910 is the signal from the pnozMulti (/// K910 emergency Stop i.O. and bus runs / monitoring compressed air i.O. [PLC input])

    // {{{ ---- set global signal emstop active
    OutImm.Safety.EmStopActive := NOT BinIo._K910;
    // }}} ----
    
    // {{{ ---- set cancel if emstop is activated
    IF( _cancelSet )
    THEN
    // Cancel must be reset in the same way like Execute
    Station.Unit.Cancel := FALSE;
    _cancelSet := FALSE;
    END_IF
    
    _emStopR(CLK := OutImm.Safety.EmStopActive);
    IF( _emStopR.Q )
    THEN
    Station.Unit.Cancel := TRUE;
    _cancelSet := TRUE;
    END_IF
    // }}} ----
    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