Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    Error in MES when you send Global NIO from PLC // (nioBits="2147483648" />)

    Error in MES when you send Global NIO from PLC // (nioBits="2147483648" />)

    Roshan
    Member

    Hello Guys,

    Have you tried sending Global NIO from PLC anytime which is connected to MES,

    because when I tried to do this Iam getting below error from MES,

    content of MES telegram :

    <result returnCode="-1">MES detected an error.</result>
    <trace>
    <trace level="error" code="700200103" text="The following variables could not be found within the current event data: resHead.nioBits. " source="" />

    Roshan_0-1666012054546.png

    The reason why is this error appear is because the value sent by PLC for Global  NIO bit is "2147483648", where as MES expects the max value only until "2147483647" (Tested), for the data type DINT, everything is as per standards in PLC and MES.

    PLC considers the value as unsigned int where in MES as signed int.

    Does anybody have similar experience ? Do we have a standard fix for this problem from the MES side ?

    We are facing this problem in some of our exsisting machines.

     

    4 REPLIES 4

    SteffenR-
    Community Moderator
    Community Moderator

    I currently have the same problem.  You only get this error if you declare the NioBits / NokBits variable as DWORD.

    The OpconXml standard requires DINT, therefore there will be no change or easy solution on MES site.

    On the other hand the PartCounter and NokCounter add-ons in Control plus require a DWORD.

    Currently there is no other option than using two variables (NokBitsPlc : DWORD, NokBitsMes : DINT) or never use the highest bit.
    But I am also investigating this topic to have a better solution.

    Yes and this is not solved by the MES end Even If I configure the nio bits as DWORD in MES.

    Below is the error response:-😑

    <?xml version="1.0" encoding="utf-8" standalone="yes"?><root><header eventId="0" eventName="partProcessed" version="1.0" eventSwitch="40" timeStamp="2022-10-18T11:42:21.7370200+02:00" contentType="3"><location lineNo="116" statNo="20" statIdx="1" fuNo="1" workPos="6" toolPos="0" application="PLC" processName="" processNo="0" /></header><event><result returnCode="-1">MES detected an error.</result><trace><trace level="error" code="700004022" text="DC ReturnCode: 102&#xD;&#xA;Description: Value was either too large or too small for an Int32." source="DataCollectorAccess" /></trace></event><body /></root>

     

    You can see in response "Value was either too large or too small for an Int32", Some where its still defined as INT by the compiler,

    I am writing here because need official solution for this issue, otherwise what is the purpose of declaring the GLOBAL_NIO bit inside PLC, which we all are using since ages.

     

    SteffenR-
    Community Moderator
    Community Moderator
    1. We found a solution to work only with DWORD in the PLC (as required by PartCounter) but send DINT values to MES (according to OpconXml specification).
      Until the update is soon released, the only possibility is to use two variables in the PLC (NokBitsPlc:DWORD + NokBitsMes:DINT).

    2. It depends on the customer/Bosch plant which bit is defined as GLOBAL_NOK. In the past it was the highest bit, but nowadays sometimes it is the lowest bit. If there is no definition, assume the highest bit. Only since Control plus Studio V5.3 it is possible to define individual bit numbers and to have gaps. Before CpStudio V5.3 you have to define a constant by your own or you have to create always 32 NOK bits and define all other as "reserve".

    3. The GLOBAL_NOK bit was introduced as a kind of fallback: You set it when processing starts and in case something is canceled, at least the GLOBAL_NOK bit is set.
      If there is no NOK bit set the rework stations can not handle these NOK parts. The rework client only has access to the NOK bits, not to the result data. Without any NOK bit, the part can not be reworked (because the operator does not know the NOK reason).

      In the current version of the example project "Digital Machine" I have implemented another usage of the GLOBAL_NOK:
      Before setting a part "good", it checks that only the GLOBAL_NOK bit is set. If this bit is not set, then the application code did a OpconMemSet on the WpcData/PartData by accident. But this kind of implementation is not standard (maybe not yet 😉).

    Hello Steffen, Thank you for your answer.😉

    So considering your point number 1, Do we have any update coming sooner which will be fixing this problem ?

     

    also your statement in Point number3,

    "If there is no NOK bit set the rework stations can not handle these NOK parts. The rework client only has access to the NOK bits, not to the result data. Without any NOK bit, the part can not be reworked (because the operator does not know the NOK reason)"

    We normally do not configure rework application with NIO bits, we just use the process numbers for rework, and Handling Rework with NIO bits is complicated and misleading if the PLC program not handled correctly, and the effort is more.

    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