Developer Portal Community

    Showing results for 
    Search instead for 
    Did you mean: 

    Sub Chain Limit - Is There A Way To Increase The Maximum Limit?


    Sub Chain Limit - Is There A Way To Increase The Maximum Limit?

    Is there a way that I can have more Sub Chains please? If I add many Sub Chains (e.g. to Station Mode Handler) I get the error shown in the photo below.

    What are the maximum Sub-Chain limits please?  e.g.

    - 10 Sub Chains per Mode Handler ?

    - 10 Sub Chains per Command Handler?


    Many thanks! 😊

    4 REPLIES 4
    New Poster

    Re: Sub Chain Limit - Is There A Way To Increase The Maximum Limit?

    you can change it in OpconBaseConfig in OpconBase library, the default value is 10, after change it, you should do "Clean Solution" -> "Rebulid Solution" and login to make it effective.



    Community Moderator

    Re: Sub Chain Limit - Is There A Way To Increase The Maximum Limit?

    Some libraries have constants that can be changed in the PLC application ("library parameters"). This feature prevents that the developer must build a new library version just to increase an array/string size.

    You may change the constants in the PLC library manager (double click on "References" or any referenced library/placeholder):



    Very important:

    1. After changing such a constant value you must "clean project" and "activate configuration" again. Don't do an online change!
      If you don't clean and activate the configuration the SIZEOF function won't work correctly (maybe only in older Codesys/TwinCAT versions)!
    2. Ensure that you have all TwinCAT 4016/4020 patches from the Bosch internal release server or ask our helpdesk. Especially TwinCAT 3.1.4020.28 can loose changes of library constants without the patches!


    Additional note:

    If you have started your project with an OpconBase version less than, you must remove this placeholder/library from your project and export again (using at least OpconBase V1.0.7.0).


    Useful examples:

    • OpconBase: max. number of chains / add-ons / children / modes
    • OpconScannerBase / AtmoCognexInsightBase: max. code length
    • OpconPartCounter: type no. length
    • OpconTcpDDL: max. array size or items (note that the default values correspond to the maximum limits in Control plus Studio)


    Some constants may affect variables used in the HMI:

    • Arrays:
      In both cases you must manually edit the array size in Control plus Studio:
      • If the PLC array size is bigger than the Control plus Studio / HMI array size, you won't see the additional items in the HMI.
      • If the PLC array size is smaller than the Control plus Studio / HMI array size, you'll get an error during HMI startup.
    • Strings:
      • The HMI ignores the string size configured in Control plus Studio and checks each string variable before accessing it. Therefore you need not edit the string size in Control plus Studio (but you can).

    Re: Sub Chain Limit - Is There A Way To Increase The Maximum Limit?

    Thanks Steffen! 😊


    Re: Sub Chain Limit - Is There A Way To Increase The Maximum Limit?

    • Thank you!!! 😊