RobotStudio event

Grouping Inputs

Options
I have Attached the part of the program where Iam using the grouped inputs to test their value and execute the specific case. But for some reason the Program doesnt enter the case and goes into Default. Could some one tell me what might be the mistake? Should I be defining the Variable (group input)SENSOR_GROUP at the beginingof the program eg: as PERS String SENSOR_GROUP. I have activated the Group inputs in the Control panel, under i/o. I have set the unit mapping as 3-5, 8-9 and signal identification level as X3:4-X3:6, X4:9- X4:10.

 !!!!!!!!!!!!!!Check for the correct fixture ICH04,ICH05,ICH06!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !
   !Here I have grouped inputs ICH04(fixture check senser for VW3), ICH05(fixture check senser for VW1P), ICH06(fixture check ssenser for VX4)
   !
   !ICH09(PART CLAMPED SENSOR), ICH10(PART CLAMPED SENSOR)
   !
   !IAM NAMING THE GROUP AS SENSOR_GROUP
   !USING A TEST STATEMENT TO CHECK THE VALUES OF THE SENSOR AND GIVING THE OUTPUT
   !
   !AT A TIME ONE OF THE SENSORS FOR FIXTURES ICH04,ICHO5,ICH06 SHOULD BE HIGH AND BOTH ICH09 AND ICH10 SHOULD BE HIGH
    !THE THREE BINARY INPUT POSSIBILITIES ARE 10011 = 19 ,01011 = 11 ,00111 = 7
    !
    TEST SENSOR_GROUP
    CASE 19:
    IF stCurrModel = "VW3" THEN
    TPWRITE"THE"+stCurrProduct+"WILL BE DRILLED";
    ELSE
    !SET BEACON ALARM
     Set OCH01;
     WaitTime 1;
    !!!!!!!!!!!!!!!!!
    !RESET BEACON ALARM
    Reset OCH01;
    !SET RED BEACON
    Set OCH02;
    !!!!!!!!!!!!!!!!!!
    !RESET GREEN BEACON
    Reset OCH03;
    !
    TPWRITE "THE FIXTURE DOES NOT MATCH THE MODEL SELECTED BY THE OPERATOR";
    !
    ENDIF
    WaitUntil ICH03 = 1;
    EXITCYCLE;
     CASE 11:
    IF stCurrModel = "VW1P" THEN
    TPWRITE"THE"+stCurrProduct+"WILL BE DRILLED";
    ELSE
    !SET BEACON ALARM
     Set OCH01;
     WaitTime 1;
    !!!!!!!!!!!!!!!!!
    !RESET BEACON ALARM
    Reset OCH01;
    !SET RED BEACON
    Set OCH02;
    !!!!!!!!!!!!!!!!!!
    !RESET GREEN BEACON
    Reset OCH03;
    !
    TPWRITE "The Program selected and model placed in the machine doesnt match";
    !
    ENDIF
    WaitUntil ICH03 = 1;
    EXITCYCLE;
    CASE 7:
    IF stCurrModel = "VX4" THEN
    TPWRITE"THE"+stCurrProduct+"WILL BE DRILLED";
    ELSE
    !SET BEACON ALARM
     Set OCH01;
     WaitTime 1;
    !!!!!!!!!!!!!!!!!
    !RESET BEACON ALARM
    Reset OCH01;
    !SET RED BEACON
    Set OCH02;
    !!!!!!!!!!!!!!!!!!
    !RESET GREEN BEACON
    Reset OCH03;
    !
    TPWrite "The Program selected and model placed in the machine doesnt match";
    !
    ENDIF
    WaitUntil ICH03 = 1;
    EXITCYCLE;
    DEFAULT:
    !SET BEACON ALARM
     Set OCH01;
     WaitTime 1;
    !!!!!!!!!!!!!!!!!
    !RESET BEACON ALARM
    Reset OCH01;
    !SET RED BEACON
    Set OCH02;
    !!!!!!!!!!!!!!!!!!
    !RESET GREEN BEACON
    Reset OCH03;
    !
    TPWRITE "Please check the fixture and whether the model is clamped properly";
    WaitUntil ICH03 = 1;
    EXITCYCLE;
    !
    ENDTEST
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!%Procedure call% it calls the procedures local to the task
    %stCurrProduct%;
    !!!!!!!!!!!!!!!
    !SET RED BEACON
    Set OCH03;
    !!!!!!!!!!!!!!!!!
    !RESET GREEN BEACON
    Reset OCH02;
    !WaitTime 0.1;
    !!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!Notify the operator of the end of cycle!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !SET BEACON ALARM
    Set OCH01;
     WaitTime 1;
    !!!!!!!!!!!!!!!!!
    !RESET BEACON ALARM
    Reset OCH01;
       ENDIF


Bharat Suvarna

Comments

  • RussD
    Options
    You can read the value of the group input directly, i.e. there is no need to declare a variable to read in the value. If you have made the following declaration PERS String SENSOR_GROUP it will always fail, because you have overridden the signal name by declaring a local variable with the same name but a different type (string) and it will never match the test values, which are of the type num.
    Russell Drown
  • charon
    Options



    im not sure with IRC5 controller but as far as i know u cant divide group input into two parts at S4C+ (3-5 / 8-9). ur unit mapping should be like this for five signals (3-7)

    -Name "SENSOR_GROUP" -SignalType "GI" -Unit "board_name" -UnitMap "3-7"

    !AT A TIME ONE OF THE SENSORS FOR FIXTURES ICH04,ICHO5,ICH06 SHOULD BE HIGH AND BOTH ICH09 AND ICH10 SHOULD BE HIGH
    !THE THREE BINARY INPUT POSSIBILITIES ARE 10011 = 19 ,01011 = 11 ,00111 = 7

    According to ur group input decleration ur clamp bits are most valuable bits.
    For VW3 u generate 11001 = 25, for VW1P 11010 = 26 and for VX4 11100 = 28

    www.robotmer.com


    charon2009-05-04 23:47:06
    Erdem Karaçeper
  • stud.bs
    Options
    I have seen some where in the IRC 5 documentation that U can combine the inputs in this way 3-5/8-9. But Iam not sure why it wasnt working that way. I will try it in 9-8/5-3. To suit Vw3 11001=25, VW1P 26, VX$ 11100= 28. 
    Bharat Suvarna
  • RussD
    Options
    That mapping is valid, they don't have to be consecutive.
    Russell Drown
  • stud.bs
    Options
    The Grouped inputs work fine.. I would like to thank all of you for helping me out. I had to grouped inputs together (3-7). Now they work fine.

    **Does the grouped output work in the similar way?
    for instance I give a decimal number and the controller converts it into bits.

    Bharat Suvarna