Welcome, Guest. Please login or register.
September 03, 2010, 05:42:06 PM
Home Help Login Register
News: Any Problems or Experience with Industrial Robots ?
Register and place your Question / Answer to worldwide Robotexperts right here !

+  Robotforum | Support for Robotprogrammer and Users
|-+  Robot Help and Discussion Center
| |-+  Kawasaki Robots
| | |-+  C Controller, Difference between PROGRAM and PC "Program Control"?
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: C Controller, Difference between PROGRAM and PC "Program Control"?  (Read 818 times)
tdevine77
Newbie
*
Offline Offline

Gender: Male
Posts: 46



« on: February 03, 2010, 07:36:12 AM »

Hello everyone,

I was wondering if anyone can tell me what PC or Process Control program is or what it is used for.

Today I was re teaching a robot and we use the RPS selection method, this allows us to use a PLC to select which program to use Ex. pg1 or pg2.

So I normally load my program by pressing the PROGRAM button in the upper left hand corner of the pendant on the STATUS screen and then selecting the program that I want to check step. When I do this my program (ex. pg1) is displayed in the PROGRAM box, Next to the PROGRAM box is a box that allows me to view the current step # and is labled STEP. Next to the STEP box is a display box labled PC this is the PROCESS CONTROL PROGRAM # that is loaded.

THIS IS HOW I COME TO FIND OUT ABOUT PC.
So I was experimenting today and at the command prompt I typed in the command "PCEXECUTE PG1" to see what would happen, all I got was an error 1001 which was not listed in my manuals and it said the program could not be loaded (or something similar). So I say O' Well and go back to re teaching my program but when I went to select my program using the method above using the PROGRAM select button on the STATUS screen I was not allowed to select my program because it said the program was allready in use. So to make sure the program is not in use I go to the command prompt and kill the program by using the "KILL PG1" command. But I am still not allowed to load my program, So I see in the box labled PC that my program is displayed here and this must be why I can not load it under the PROGRAM selection box. So after about 30 minutes of worry and research I find that I can Kill the program in the PC box by using the command "PCKILL". So this solved my problem, but I am still wondering what is a PC program and what is it used for?

Thanks
Tommy D
Logged
tdevine77
Newbie
*
Offline Offline

Gender: Male
Posts: 46



« Reply #1 on: February 03, 2010, 08:41:46 AM »

my bad I think PC is actually process control not program control
Logged
schneereh
Newbie
*
Offline Offline

Gender: Female
Posts: 1


« Reply #2 on: February 03, 2010, 11:51:23 AM »

yes, that's right.

With pg-programs you control the robot and its movements.

pc-programs are used to control or check external devices or external signals. Or to start/kill a pg-program.
And you can run up to 5 pc-programs parallel!

pg- and pc-programms are able to communicate over internal signals or variables.

Greetings
schneereh
Logged
selquist
Newbie
*
Offline Offline

Gender: Male
Posts: 10


« Reply #3 on: February 03, 2010, 12:56:54 PM »

Hi
First of all: Sorry for my English, I don’t use it often enough...

I cant program anything without using PC-programs.  icon_wink

This I how I use the 2 types of programs:
xxx.pg: This is my motion program, this is read by the robot line by line, one by one.
xxx.pc: This is where I put my "background-programs", all my sequences, signal handling. For example: if security is down my program turns on a blue lamp, no matter what the robot is currently doing in its PG-program. The robot reads the PC-program just like a normal PLC. It scans the program continuously, looking for changes, executing program lines. You must have a “flag” (for example: start:) at the top of your PC. And a “GOTO start” at the end of the PC, to make it run in one continuous loop.

I call my PC’s: autostart.pc, autostart2.pc, autostart3.pc autostart4.pc and autostart5.pc
Start with: PCEX 1:autostart.pc or PCEX 2:autostart2.pc

The PC’s can be set to start automatic on robot-power-on, by activating them in the AUX-menu.

Hope this helps. - PeterR


Logged
SkyeFire
Global Moderator
*****
Offline Offline

Posts: 912


« Reply #4 on: February 03, 2010, 05:03:03 PM »

PC Programs are AS-language programs that can run in the background process, in parallel with whatever primary program is currently running.  They are parallel to the S-Logic program in this regard, but capable of actions which the S-Logic simply cannot do.  For example, I once used a PC program to manage TCP/IP communications with a vision system while the robot was moving about the cell performing other functions -- without the PC program, I would have had to stop the robot's motion and pause for 2-3 seconds while the robot and vision system shook hands and performed the measurements and data transfers.

A PC program can do just about anything a regular AS-Language program can do, except for motion commands.  Only the "primary" robot program can contain motion-related commands.  PC programs cannot command motion, and if I recall correctly they cannot make changes to frames, TCP values, payloads, etc -- anything that would change how the "primary" program is moving the robot.   The last time I used PC programs on a Kawasaki, you could have up to 3 running in parallel, and you could call/cancel/start/stop various PC programs from your primary program. 
Logged
tdevine77
Newbie
*
Offline Offline

Gender: Male
Posts: 46



« Reply #5 on: February 03, 2010, 06:59:10 PM »

You guys are awesome thanks alot for the information.
Tommy D
Logged
rdixiemiller
Newbie
*
Offline Offline

Gender: Male
Posts: 43


« Reply #6 on: February 08, 2010, 06:35:54 AM »

 Here is an example of a small pc program that I use to calculate the skew angle of a rectangular object on a conveyor. There are 2 sensors on the tool that watch the part go by at 400-600 mm/sec, I capture the time difference between the sensor detects, then use the ATAN2 function to do an angle calculation. This is a basic While.....Do loop.

.PROGRAM angle_find2.pc();ANGLE FIND FOR PICK ON THE FLY
1
UTIMER @a = 0
WHILE NOT (detect[1] AND detect[2]) DO ;IF SENSOR FLAGS NOT SET, LOOP UNTIL BOTH SENSORS HAVE MADE
IF SIG(1013) AND NOT detect[1] THEN
detect[1] = ON ;   ;SET SENSOR 1 FLAG
UTIMER @a = 0 ;   ;START UTIMER @A
END
;
IF SIG(1015) AND NOT detect[2] THEN
detect[2] = ON ;   ;SET SENSOR 2 FLAG
travel_time = UTIMER(@a) ;   ;travel_time TAKES THE VALUE OF UTIMER (@a)
o_length = travel_time*line_speed
rotate_val = ATAN2(o_length,a_length)
END
;
;-------------------ROTATE VALUE MIN MAX CHECK------------------------
;
IF (rotate_val>20) OR (rotate_val<0) THEN
detect[1] = OFF
detect[2] = OFF
travel_time = 0
o_length = 0
rotate_val = 0
GOTO 1
END
;
;-------------------END ROTATE VALUE MIN MAX CHECK--------------------
;
END
.END






The next one is a signal monitor Autostart that runs in the background. It keeps Binary words updated, and has filter timers, etc. running.
.PROGRAM autostart5.pc();SIGNAL MONITOR
;*****POSITION 430 CHEHALIS*****
;
;******* SETUP AND HELP NOTES *******
;
;BITS 2015-2020. RESERVED FOF SETUP/NOTES CALL AS NEEDED
;
10;   ;START OF LOOP
pc_count = pc_count+1
IF pc_count==10 THEN
pc_cycle = (UTIMER(@a))/10
UTIMER @a = 0
pc_count = 0
END


;
IF SIG(2020) THEN ; PRINT ULTRASONIC SENSOR SETUP NOTES
;IF PANEL 4 WIDTH AND 4 LINES MAX
;IF PANEL MESSAGE WINDOW RETURN LIMIT------------------|2-----------------------------------------|3-----------------------------------------|4-----------------------------------------|
;IFPWPRINT 4="GOTO KEYBOARD FOR ULTRASONIC SENSOR        SETUP/NOTES - FOR Keyboard PRESS MENU,     HIGHLIGHT OR TOUCH Keyboard,PRESS SELECT,  CANEL BUTTON WILL EXIT Keyboard"
;MAX 13 PRINT LINES FOR ALL DISPLAY ON KEYBOARD
;KEYBOARD MESSAGES MAY EXTEND OVER TO THIS POINT--------------------------------|
PRINT " **SETUP AND HELP NOTES*******                                       ";1
PRINT " SUCTION FRAME ULTRASONIC SENSOR TEACH NOTES:                        ";2
PRINT " TO TEACH SENSORS USE sensor_set PROGRAM, CHECK STEP THROUGH PROGRAM ";3
PRINT " AS NEEDED TO TEACH SENSORS, SENSORS 1-3 1013-1015 ARE SET FOR ON IN ";4
PRINT " IN A RANGE OF 55mm TO 140mm FROM GLASS, OR FLOOR WHEN        ";5
PRINT " TEACHING WITH sensor_teach PROGRAM, SENSOR 4 1016 IS SET FOR ON IN A ";6
PRINT " A RANGE OF 15mm to 25mm COMPRESSION WHEN TEACHING  ";7
PRINT " WITH sensor_teach PROGRAM, REF TO BANNER SENSOR DOCUMENT P/N 119287 ";8
PRINT " PAGE 4 FOR TEACHING PROCEDURES OF THE BANNER ULTRASONIC SENSOR MODEL";9
PRINT " # QS18UPAQB,THE RANGE INDICATOR OPERATES AS FOLLOWS:GREEN=TARGET IN ";10
PRINT " IN SENSING RANGE, RED TARGET OUTSIDE SENSING RANGE, OFF SENOR POWER ";11
PRINT " OFF,THE TEACH/OUPUT INDICATOR OPERATES AS FOLLOWS:YELLOW=TARGET IN  ";12
PRINT 2: " TAUGHT LIMITS,OFF=TARGET OUTSIDE TAUGHT LIMITS,RED=SENSOR IN TEACH MODE.";13
;MAX 13 LINES TO KEYBOARD AND EXTEND TO THIS POINT-------------------------------|
SIGNAL (-2020);   ;NOT (2020)
END
;
;
;
;**************************SIGNAL STATE MONITORING*************************
;
;
;
IF SIG(1052) AND SIG(2038) THEN ;;IF(RACK FAULT ACK)AND(RACK FAULT RESET)
SIGNAL (-50) ;   ;NOT(RACK FAULT)
END
;
IF SIG(-50) THEN ;   ;IF NOT(RACK FAULT)
SIGNAL (-2038) ;   ;NOT (RACK FAULT RESET)
END
;      
IF (SIG(54) OR SIG(55)) THEN ;;IF (SEARCH FAULT A) OR (SEARCH FAULT B)
SIGNAL (2024) ;   ;(SEARCH FAULT LAMP)
ELSE ;   ;IF NOT(SEARCH FAULT A) OR (SEARCH FAULT B)
SIGNAL (-2024) ;   ;NOT (SEARCH FAULT LAMP)
END
;
IF SIG(2025) THEN ;   ;IF (SEARCH FAULT RESET)
SIGNAL (-54) ;   ;NOT (SEARCH A FAULT)
SIGNAL (-55) ;   ;NOT (SEARCH B FAULT)
SIGNAL (-2025) ;   ;NOT (SEARCH FAULT RESET)
END
;
IF SIG(2001) THEN ;    ;IF(A VERTICAL MODE)
SIGNAL (-2003) ;   ;NOT(A HORIZONTAL MODE)
END
;
IF SIG(2003) THEN ;    ;IF(A HORIZONTAL MODE)
SIGNAL (-2001) ;   ;NOT(A VERTICAL MODE)
END
;
IF SIG(2002) THEN ;    ;IF(B VERTICAL MODE)
SIGNAL (-2004) ;   ;NOT(B HORIZONTAL MODE)
END
;
IF SIG(2004) THEN ;    ;IF(B HORIZONTAL MODE)
SIGNAL (-2002) ;   ;NOT(B VERTICAL MODE)
END
;
;-----------------------------SENSOR LOGIC----------------------------
;
IF BITS(1013,4)==0 THEN ;IF NOT(SENSOR 1 OR 2 OR 3 OR 4)
TIMER (4) = 0 ;   ;RESET TIMER 4
END
;
IF BITS(1013,3)>0 AND TIMER(4)>t4_pre THEN ;IF ANY (SENSOR 1 OR 2 OR 3) AND (TIMER 4)> VARIABLE
SIGNAL (2021);   ;(ANY SENSOR)
ELSE ;   ;IF (NOT (SENSOR 1 OR 2 OR 3))AND (TIMER 4)>SETPOINT
SIGNAL (-2021);   ;NOT (ANY SENSOR)
END
;
IF BITS(1013,3)==7 THEN ;    ;IF (SENSORS 1 AND 2 AND 3)
SIGNAL (2022);   ;(SENSORS 1 and 2 and 3)
ELSE
SIGNAL (-2022);   ;NOT (SENSORS 1 and 2 and 3)
END
;
;-----------------------------OVER COMPRESSION LOGIC------------------
;
IF BITS(1013,4)==15 THEN ;;   IF (SENSOR 1 AND 2 AND 3 AND 4)
SIGNAL (2023);   ;(ALL SENSORS)USED FOR OVER COMPRESSION ROUTINE,
; SENSOR 4 TAUGHT RANGE 15MM COMPRESSION TO MAX COMPRESSION OF PLUNGERS
ELSE ;   ;IF (NOT (SENSOR 1 OR 2 OR 3))
SIGNAL (-2023);   ;NOT (ALL SENSORS)
END
;
;-----------------------------END SENSOR LOGIC------------------------
;
;
;-------------------TABLE POSITION INDICATOR LOGIC--------------------
;
IF SIG(-1045) THEN ;   ;IF NOT (TABLE A IN POS)
SIGNAL (-2005) ;   ;NOT(TABLE A IN POSITION INDICATOR)
SIGNAL (2007) ;   ;(TABLE A OUT OF POSITION)
ELSE ;   ;IF (TABLE A IN POS)
SIGNAL (-2007) ;   ;NOT(TABLE A OUT OF POSITION)
SIGNAL (2005) ;   ;(TABLE A IN POSITION INDICATOR)
END
;
;
IF SIG(-1046) THEN ;   ;IF NOT (TABLE B IN POS)
SIGNAL (-2006) ;   ;NOT(TABLE B IN POSITION INDICATOR)
SIGNAL (2008) ;   ;(TABLE B OUT OF POSITION)
ELSE ;   ;IF (TABLE B IN POS)
SIGNAL (-2008) ;   ;NOT(TABLE B OUT OF POSITION)
SIGNAL (2006) ;   ;(TABLE B IN POSITION INDICATOR)
END
;
;
;-------------------END TABLE POSITION INDICATOR LOGIC----------------
;
IF SIG(2026) THEN ;   ;IF (BOTTOM PLACE)
SIGNAL (-2027) ;   ;NOT(TOP PLACE)
END
;
IF SIG(2027) THEN ;   ;IF (TOP PLACE)
SIGNAL (-2026) ;   ;NOT(BOTTOM PLACE)
END
;
IF SIG(1048) OR SIG(44) THEN ;IF(RACK A EMPTY ACK) OR(NEW RACK A ACK)
rack_a1_empty = 0 ;   ;MAKE RACK A1 EMPTY BIT FALSE
rack_a2_empty = 0 ;   ;MAKE RACK A2 EMPTY BIT FALSE
pick_retry_a1 = 0 ;   ;RESET THE PICK A1 RETRY COUNTER TO ZERO
pick_retry_a2 = 0 ;   ;RESET THE PICK A2 RETRY COUNTER TO ZERO
SIGNAL (-52) ;   ;NOT(RACK A EMPTY)
END ;    ;END IF STATEMENT      
; ;
;
IF SIG(1049) OR SIG(45) THEN ;IF(RACK B EMPTY ACK) OR(NEW RACK B ACK)
rack_b1_empty = 0 ;   ;MAKE RACK B1 EMPTY BIT FALSE
rack_b2_empty = 0 ;   ;MAKE RACK B2 EMPTY BIT FALSE
pick_retry_b1 = 0 ;   ;RESET THE PICK B1 RETRY COUNTER TO ZERO
pick_retry_b2 = 0 ;   ;RESET THE PICK B2 RETRY COUNTER TO ZERO
SIGNAL (-53) ;   ;NOT(RACK B EMPTY)
END ;    ;END IF STATEMENT      
; ;
IF (a_pick_1_dx<100) OR (a_pick_2_dx<100) THEN
pickspeed_a = pickspeed_s
ELSE
pickspeed_a = pickspeed_f
END
;
;   
IF (b_pick_1_dx<100) OR (b_pick_2_dx<100) THEN
pickspeed_b = pickspeed_s
ELSE
pickspeed_b = pickspeed_f
END
;
;*****************************BINARY WORD LIST************************
;
pickspeed_s = BITS(2030,3) ;   ;SLOW PICKSPEED
pickspeed_f = BITS(2033,5) ;   ;FAST PICKSPEED
search_dist = BITS(2040,7);   ;SEARCH DISTANCE FROM IFP
side_shift_a = BITS(2047,5);   ;SIDE SHIFT A DISTANCE WHEN PLACING ON CONVEYOR
side_shift_b = BITS(2052,5);   ;SIDE SHIFT B DISTANCE WHEN PLACING ON CONVEYOR
index_dist = BITS(1078,6)/10; ;PICK POINT SHIFT AMOUNT
BITS 56,7 = MSPEED ;   ;SENDS BITS 56-62 OUT AS BINARY CODE FOR MONITOR SPEED
;
;*****SENSOR TOOLS FOR ORIGINAL TOOL ONLY P430*****
;
POINT s[1] = TRANS(9,325.8,255.9,0,0,0) ;SENSOR 1 TOOL COORDINATE
POINT s[2] = TRANS(-306,325.8,255.9,0,0,0) ;SENSOR 2 TOOL COORDINATE
POINT s[3] = TRANS(9,-325.8,255.9,0,0,0) ;SENSOR 3 TOOL COORDINATE
;
;
SIGNAL -2010 ;    ;NOT(PC PROGRAM RUNNING CHECKER)
GOTO 10;   ;GO TO PROGRAM LOOP START
.END

Very useful programs once you learn how to use them!
Logged

Regards
Robert Miller
Fanuc P50, 145,155,200,ArcMate 100,120, Kawasaki FS30,MX500, old Kobelco/Kawasaki Painters
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!