Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    24 tips (Advent calendar) for Control plus programmers

    24 tips (Advent calendar) for Control plus programmers

    SteffenR-
    Community Moderator
    Community Moderator

    Hey, it’s december. The time when the day starts with opening a door of an Advent calendar.

    Check out the official BCI Advent calendar on LinkedIn with some interesting piece of information every day.

    But just these days I noticed in a discussion that there are so many small improvements from Control plus bundle V1.0 to V2.3 that some of you maybe missed. What would be more obvious than showing you a tip every day ...

    #01  #02  #03  #04  #05  #06
    #07  #08  #09  #10  #11  #12
    #13  #14  #15  #16  #17  #18
    #19  #20  #21  #22  #23  #24

    24 REPLIES 24

    SteffenR-
    Community Moderator
    Community Moderator

    One of the most common errors:
    You want to change the operation mode, but the HMI sticks in the old operation mode. It looks like the machine or HMI does not react.

    The reason is that an unit or add-on sticks in the ExecState CANCEL. You can find the origin easily in the sequence analysis view (every station must have this view!). The newer HMI versions can even filter for specific ExecStates with the filter symbol.

    SteffenR_0-1639557809152.png

    Alternatively you can check the StateOverview PRG while you are logged in. The StateOverview PRG is a PLC-side solution of the HMI sequence analysis.

    SteffenR_1-1639557809162.png

    SteffenR-
    Community Moderator
    Community Moderator

    Fasten the engineering time by using partial exports instead of the full export in Control plus Studio.

    For example just export the PLC or HMI without all other runtimes and services:

    SteffenR_0-1639643063984.png

    By the way: If you edit an existing view and you don't add new variables or labels an HMI export is not necessary. Just save and deploy.

     

    For the PLC you can even export only some single units or tree areas in Control plus Studio:

    SteffenR_1-1639643063987.png

    And while the export is running you can still work in the PLC editor. For example after creating a new enumeration in Control plus Studio, run the export and continue coding while the export is running.

    SteffenR-
    Community Moderator
    Community Moderator

    Variables that are declared in the VAR area in methods lose their value after leaving the method.

    Use the VAR_INST area to keep the variable in the memory and to get the same behaviour like the variable would have been declared in the function block itself.

    SteffenR_0-1639729255791.png

    For the VAR area the timer will never have Q=TRUE because the timer starts from beginning with every call of the method:

    SteffenR_1-1639729357875.png

    SteffenR-
    Community Moderator
    Community Moderator

    In the Targets folder of the station folder you can find several useful functions regarding the target system.

    Drag and drop the NXHC file on a batch file to execute this function with the corresponding target system, for example map network drives with the VPB40, by default Y: for C:\OpconApp and Z: for D:\OpconData.

    SteffenR_0-1639815102753.png

     

    The other batch files provide functions

    • to enable/disable the write filter on the active mPad (Fbwf = file based write filter)
    • to logoff/logon, restart and shutdown Windows (Os = operating system)
    • to enable/disable Remote Desktop (Rdp = remote desktop protocol)

     

    And how to remember if you must use the NXDC or NXHC file?

    • NXDC = Nexeed deploy configuration = the checkboxes of the deployment dialog in Control plus Studio
    • NXHC = Nexeed host configuration = hostname and logon credentials

    SteffenR-
    Community Moderator
    Community Moderator

    For Beginners the automatic IntelliSense is quite helpful:

    SteffenR_2-1639901900757.png

    But there is always a short delay when typing the first letter. You can deactivate the automatic IntelliSense and open it manually with CTRL+SPACE in case you really need it:

    SteffenR_0-1639901809111.png

     

    To automatically insert complete code snippets you can use the open source software AutoHotKey (download from autohotkey.com). You can download a AutoHotKey script template for Control plus from our website.

    Programming a step chain has never been as fast as now:

    2021-12-19_09h15_07.gif

    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