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