Hello, I'm working on a palletizing system using a Kawasaki CP180L, and I have a problem with the robot's continuous cycle. The condition is that if the pallet is complete and taken by a forklift, a new pallet will arrive, and the palletizing will start again. However, the current condition is different. After the finished pallet is taken by a forklift and the new pallet is ready, the robot does not start moving again. In the teach pendant, all the signals required for the robot to move again are ON, such as pallet ready, product ready, and the type currently running. However, even with all the conditions met, the robot remains at the home position in the master program.
Here is the master program in AS Language
;#################################################
;
bag_no_r = 0
bag_no_l = 0
10; Label
BASE NULL
TOOL NULL
HOME; Home Position
SIGNAL -21,-22; Job complete reset
OPENI
BREAK
;
20; Label
;
; JOB LOGIC
WAIT SIG(1001,1005) OR SIG(1002,1006) OR SIG(1008) OR SIG(1009)
; Work Reay Right C/V or Left C/V or Bag Change Right C/V or Left C/V
;
;Last Bag Change Logic
; Last Bag R C/V
IF SIG(1009) THEN; Last Bag R C/V
SIGNAL (22); Job Complete R ==> Forced pallet exit
bag_no_r = 0
GOTO 10
END
; Last Bag L C/V
IF SIG(1008) THEN; Last Bag L C/V
SIGNAL (21); Job Complete L ==> Forced pallet exit
bag_no_l = 0
GOTO 10
END
; Right C/V Ready Work
IF SIG(1002,1006) THEN; Work Ready Right C/V
; Work type check ==> call pg
IF SIG(1012,-1013) THEN; Bag line right 50KG
CALL pg21
END
IF SIG(-1012,1013) THEN; Bag line right 40KG
CALL pg22
END
BREAK
END
IF SIG(22) THEN; Job complete R
bag_no_r = 0
GOTO 10
END
;
;Left C/V Ready Work
IF SIG(1001,1005) THEN; Work ready Left C/V
; Work type check ==> call pg
IF SIG(1010,-1011) THEN; Bag Bag line left 50KG
CALL pg11
END
IF SIG(-1010,1011) THEN; Bag Bag line left 40KG
CALL pg13
END
BREAK
END
IF SIG(21) THEN; Job completed L
bag_no_l = 0
GOTO 10
END
TWAIT 0.1
;
GOTO 20
;
.END

Issue with Continuous Cycle in Kawasaki CP180L Palletizing System
-
Gus_akira -
March 12, 2025 at 4:34 AM -
Thread is Resolved
-
-
Also Can you help me send a counter from the teach pendant using variable data display to the PLC? I'm using a Siemens S7-1200 PLC with Profinet communication.
-
However, even with all the conditions met, the robot remains at the home position in the master program.
Two areas to look at:
- Field/PLC signals to robot failure
- Robot code.What is displayed on the teach pendant during this instance.
Can you post a screenshot?
Is the robot displaying red 'Wait' symbol?WAIT SIG(1001,1005) OR SIG(1002,1006) OR SIG(1008) OR SIG(1009)
If it is waiting on this line, I would consider using alternative code representation.
If it is not waiting and scanning, then check your field/PLC inputs to the robot or possibly consider alternative code representation for your IF signal condition checks.
When placing any instruction within parenthesis it is seen as a condition and argument.
If you have multiple signals within parenthesis I have seen this can cause issues so it may be that your SIGNAL and WAIT SIGNAL instructions are causing these issues.I always write IF SIGNAL and WAIT SIGNALS as the following:
IF ((SIG(1010)==FALSE) AND (SIG(1001)==TRUE))WAIT ((SIG(1001)==TRUE AND (SIG(1005)==TRUE)) OR ((SIG(1002)==TRUE) AND (SIG(1006)==TRUE))
Also Can you help me send a counter from the teach pendant using variable data display to the PLC? I'm using a Siemens S7-1200 PLC with Profinet communication.
Variable data is setting a variable with a value only.
You would need to create a medium of reading this value, converting to BCD and setting the relevant bits to send to the PLC from a programmatical perspective.
Such a using the BITS command to represent the variable value.
You also have digital switch and digital display IFP functions which can directly drive signals instead of using BITS command.This information is available in the Operation Manual for IFP functionality and configurations and AS Language Manual for BITS command.
-
10; Label
BASE NULL
TOOL NULL
HOME; Home Position
SIGNAL -21,-22; Job complete reset
OPENI
BREAK
;After finishing one pallet, the robot returns to the master program and stays at the home position. Before that, the 'pallet ready' and 'product type' signals are ON, but 'product ready' is OFF because the product has not yet reached the pick station. At this point, a wait signal is displayed. However, once the product reaches the pick station and all signals are ON for picking the product again, the robot remains in the master program, and the wait signal turns OFF. To restart the robot, I need to manually go to step 0 in the master program and cycle start again.
The program stays at this step that I mentioned. -
1001 is product ready for pickup
1005 is pallet ready
1011 is the product type right now -
1. Is this a system that has been running for sometime (mature) and this issue has just occurred?
2. Is this system under development and testing of robot IO exchanges?Are the correct signals showing for the correct operation request?
-
1. Is this a system that has been running for sometime (mature) and this issue has just occurred?
2. Is this system under development and testing of robot IO exchanges?Are the correct signals showing for the correct operation request?
The system is new, and I am currently testing the I/O with the PLC to ensure it runs correctly. However, the problem is that it won't run continuously after finishing one pallet. The I/O configuration in both the robot and the PLC is correct and matches.
-
Are the correct signals showing for the correct operation request?
If so, then I assume the master program is now scanning and not waiting.Do you know about SWITCH (Aux 0502).
Go to it and set DISP.EXESTEP (page 4 usually).
- You will need to turn off motor power to change this.When running with this SWITCH enabled, the cursor will not sit always on just the motion step, you should see the teach pendant cursor scanning.
This will suggest it is not finding a suitable condition with your IF's.Usually I use the PAUSE command to try and stop the scanning in places I want to stop the scan.
Obviously it will not PAUSE if there is an issue.
Then I would look at that part of the code and try and invoke the PAUSE by modifying the code previously to it to try and catch it.I would suggest the following to try:
;Left C/V Ready Work
IF ((SIG(1001)==TRUE) AND (SIG(1005)==TRUE)) THEN; Work ready Left C/V
PAUSE;
; Work type check ==> call pg
IF ((SIG(1010)==TRUE) AND (SIG(1011)==FALSE)) THEN; Bag Bag line left 50KG
CALL pg11
END
IF ((SIG(1010)==FALSE) AND (SIG(1011)==TRUE)) THEN; Bag Bag line left 40KG
CALL pg13
END
BREAK
ENDThe PAUSE is being used to check the evaluation of the IF condition check to stop the scan.
I would also suggest to change you initial WAIT too to a similar format.
-
If you want to send a number to PLC, you need to allocate some output space and use the BITS command. For example you can allocate 8 output signals:
BITS o.startsignal_value, 8 = number you want to send
On the interface panel you can use the lamps from the input signals to view which signal is missing. Instead of WAIT function you can have a WHILE loop or IF conditions:
IF SIG(1001) == FALSE and SIG (1005) == FALSE THENGOTO 10
END
I think that you dont need the WAIT function since the program scans for signals again.
-
;#################################################
;
bag_no_r = 0
bag_no_l = 0
10; Label
BASE NULL
TOOL NULL
HOME; Home Position
SIGNAL -21,-22; Job complete reset
OPENI
BREAK
;
20; Label
;
; JOB LOGIC
WAIT ((SIG(1001)==TRUE) AND (SIG(1005)==TRUE)) OR ((SIG(1002)==TRUE) AND (SIG(1006)==TRUE)) OR (SIG(1008)==TRUE) OR (SIG(1009)==TRUE)
; Work Ready Right C/V or Left C/V or Bag Change Right C/V or Left C/V
;
;Last Bag Change Logic
; Last Bag R C/V
IF (SIG(1009)==TRUE) THEN; Last Bag R C/V
SIGNAL (22); Job Complete R ==> Forced pallet exit
bag_no_r = 0
GOTO 10
END
; Last Bag L C/V
IF (SIG(1008)==TRUE) THEN; Last Bag L C/V
SIGNAL (21); Job Complete L ==> Forced pallet exit
bag_no_l = 0
GOTO 10
END
; Right C/V Ready Work
IF ((SIG(1002)==TRUE) AND (SIG(1006)==TRUE)) THEN; Work Ready Right C/V
; Work type check ==> call pg
IF ((SIG(1012)==TRUE) AND (SIG(1013)==FALSE)) THEN; Bag line right 50KG
CALL pg21
END
IF ((SIG(1012)==FALSE) AND (SIG(1013)==TRUE)) THEN; Bag line right 40KG
CALL pg22
END
BREAK
END
IF (SIG(22)==TRUE) THEN; Job complete R
bag_no_r = 0
GOTO 10
END
;
;Left C/V Ready Work
IF ((SIG(1001)==TRUE) AND (SIG(1005)==TRUE)) THEN; Work ready Left C/V
; Work type check ==> call pg
IF ((SIG(1010)==TRUE) AND (SIG(1011)==FALSE)) THEN; Bag Bag line left 50KG
CALL pg11
END
IF ((SIG(1010)==FALSE) AND (SIG(1011)==TRUE)) THEN; Bag Bag line left 40KG
CALL pg13
END
BREAK
END
IF (SIG(21)==TRUE) THEN; Job completed L
bag_no_l = 0
GOTO 10
END
;
GOTO 20
;
.END
So I edited the signal program like this and used DISP.EXESTEP, but after one pallet is finished and another pallet is ready, the program loops between the master and the palletizing program, and I see the counter keeps counting. -
So it's going in and out of a call from your video.
There must be issues within your CALLS then.
You can use my PAUSE technique inside the CALL of pg13 now to start pin pointing where the issue is.What is pg13?
Please don't post the code, post it as an attachment as it is easier to read. -
So I edited the program as you suggested, but the result is the same as shown in the video. The program starts at the first pickup position, places the bag, moves to the safe position, and then the cycle stops. I have to manually press cycle start again to continue.
-
A copy of your main program is no use, we need the CALLS you are using.
pg11, pg14, pg21, pg22You have a PAUSE after CALL pg14...........remove this.
-
Yes, I tried to place it, but I still can't find the problem. If I don't add a pause, it will loop like in the last video.
Here is a copy of the PG 14 program.
-
If you prime the master and have pg14 selected as an initial run.
Does it execute the first bag place?
If so, does it then continuously loop or does it actually go back into pg14 and out again? -
It actually goes back to the master program.
The flow is like this:
After VALUE 1, for example, the program goes back to the master program.
CALL PG 14
END
BREAK
END
After that, it returns to PG 14 to continue with the next bag.
-
I am asking what is happening live, not how the code structure is working.
What happens if you prime the master and run it?
1. Does it complete the first bag and then just loop without doing the next bag.
2. Does it go onto the next bag, next bag and next bag etc. -
Oh, sorry! I misunderstood your question.
So, if the master program starts from 0, the robot keeps running until the pallet is finished. But after that, the new pallet doesn’t start again, and it just loops between the master program and PG 14.
If I want to start palletizing again, I need to switch the key to ‘Teach’ and move to 0 in the master program. Then, I switch the key back to ‘Playback’ and press ‘Start’ for the robot to move again.”
-
So, if the master program starts from 0, the robot keeps running until the pallet is finished. But after that, the new pallet doesn’t start again, and it just loops between the master program and PG 14
So it completes the pallet then?
-
Code
Display More; Last Bag R C/V IF (SIG(1009)==TRUE) THEN; Last Bag R C/V SIGNAL (22); Job Complete R ==> Forced pallet exit bag_no_r = 0 GOTO 10 END ; Last Bag L C/V IF (SIG(1008)==TRUE) THEN; Last Bag L C/V SIGNAL (21); Job Complete L ==> Forced pallet exit bag_no_l = 0 GOTO 10 END
SIGNAL (21) and SIGNAL (22) look like they need swapping.
pg14 uses SIGNAL 21 for last bag right, but above you have SIGNAL (22)?Also recommended not to place SIGNAL outputs in parenthesis either:
SIGNAL 21
SIGNAL 22 -