What if you check the status of a flag in the beginning of the program?
If flag = ON, go to "maintenance position" and pause?
What happens when the tip burns out, will the robot just follow the program without welding or will it come to a stop?
Posts by vkoppelo
-
-
Hi tsiodim,
As mentioned before:Quote...the lowest FRVRC (virtual robot controller) on RoboGuide is 5.30/RJ3, so You can try with this version and see what happens.
Send me the source and I´ll compile it for you. -
My personal preferences:
Fanuc > ABB >>> URFanuc has better UI than ABB.
I wouldn´t recommend UR.
Price is way too high for some hollow aluminum tubing and electronics. Up there with the big guys (Fanuc/ABB) in price.
Compare Fanucs M-10iD/12 with UR10.29kg vs 145kg (Fanuc being heavier, best $$$/kg).
Huge difference in max. speed (Fanuc being faster).
2kg more payload (Fanuc carrying more).
Internal routing for pneumatic hoses/tubing (Fanuc has, UR doesn´t).
Price is about the same (±15%).I would only consider UR if I was looking for a beginner-friendly system or if I were to place the robot in a "collaborative-setup".
TLDR; Personal opinion: Fanuc is the best, ABB second. UR are crazy/greedy with their pricing. -
You beat me to it, Fabian.
There´s no need for the "JMP LBL[1]".
The code will be repeated anyways.
Also, if a IF-condition isn´t met, it will continue execution of the program.A more "correct" example would be this:
If DI[7] = ON, jump to LBL 1 else continue to next row. On next row jump to LBL 2 (the end).
Fabian, do you know why I get a "syntax error" when I try to enable this on a R-J3iB controller (running V6.40)?
I know that JMP LBLs work in BG logic on a R-30iB (running V8.30?), is it a software limitation in older units?Fabian's answer : As far as I know it is, same with TIMER or WAIT
Nova,
If I understand you correctly.
You pulse reverse in order to stop the spindle faster? To stop the forward momentum faster vs. letting it freespin to a stop?
If you get ON on DI[7], do you want to pulse the reverse output for a couple of seconds?
Is forward spin and reverse spin mapped to 2 digital outputs?You are currently using RO[8] as a registry bit (ON/OFF?). Flags can be used for this aswell. R[ * ] are for numerical values, F[ * ] are for ON/OFF.
-
Ok.
B(ack)G(round) logic is like the name suggests. It´s programs that run in the background in parallel with your "main program".
To create a program to be run in the background, create a new program like you normally do.
Create your logic.
Thereafter enable it in the "BG Logic"-menu.
As long as it is enabled the program will run each 8 millisecond (default?).On my teach pendant I find "BG Logic" under "[Menu]" > "6. Setup" > "BG Logic".
Can you find it in on yours?So you want to watch DI[7] for a ON-signal, then send ON/OFF to the VFD to shut it off?
What output is the VFD wired to?Keep in mind that programs for BG logic does have some limitations (calls etc. just like Fabian mentioned).
Usually it just errors when trying to enable the program under "BG Logic" if this is the case. -
If I understand you correctly, you want to:
1. Check for request to open fence.
2. If yes, wait X seconds before unlocking fence/door.
3. During this time you want the router/spindle to stop?Would it work with a BG logic?
Translation: If program not running and is spindle is on, send OFF to spindle.UO[3] is "Prg running" on my robot, it´s set to ON while program is executing. OFF while it isn´t.
With this BG logic active you can never run the spindle without the program running.
Do you check a DI/flag for "fence open requests"? -
-
Here´s a "palletizer" I´ve made.
Registers 1-11 are used. I´d recommend you to set register 9/10/11 to a value of 1.
Point register 1 is used.1. Grab a part with the robot and jog to the first position in the pallet. Record/touch up this point. This will be the origin for the palletizer.
2. Adjust the variables in the program.
3. In the main program, grab the part from the machine, position yourself at some safe distance above pallet.
4. Make a CALL to the program below.Keep in mind:
- That the part counter will not reset if you terminate the program.
You´ll have to reset the values of register 9/10/11 to 1 for it to start at the 1st position. - When X stacks of X parts has been stacked (according to set variables), it starts over from 1.
- I have only tested the code in the simulator and it seems to work.
Code
Display More1: !################################ ; 2: !##### Palletizer ############### ; 3: !################################ ; 4: UFRAME_NUM=1 ; 5: UTOOL_NUM=1 ; 6: ; 7: !Number of rows ; 8: R[1]=4 ; 9: !Items per row ; 10: R[2]=1 ; 11: !Stack height ; 12: R[3]=100 ; 13: ; 14: !X step ; 15: R[4]=100 ; 16: !Y step ; 17: R[5]=(-100) ; 18: !Part Height ; 19: R[6]=3 ; 20: ; 21: !Drop offset ; 22: R[7]=10 ; 23: !Safe Z ; 24: R[8]=500 ; 25: ; 26: !R[9] X counter ; 27: !R[10] Y counter ; 28: !R[11] Z counter ; 29: ; 30: PR[1,1]=((R[9]-1)*R[4]) ; 31: PR[1,2]=((R[10]-1)*R[5]) ; 32: PR[1,3]=R[8] ; 33: ; 34:L P[1] 300mm/sec FINE Offset,PR[1] ; 35: PR[1,3]=(((R[11]-1)*R[6])+R[7]) ; 36:L P[1] 100mm/sec FINE Offset,PR[1] ; 37: PR[1,3]=(((R[11]-1)*R[6])) ; 38:L P[1] 10mm/sec FINE Offset,PR[1] ; 39: PR[1,3]=R[8] ; 40:L P[1] 300mm/sec FINE Offset,PR[1] ; 41: R[11]=(R[11]+1) ; 42: ; 43: IF (R[11]>R[3]),R[9]=(R[9]+1) ; 44: IF (R[11]>R[3]),R[11]=(1) ; 45: IF (R[9]>R[1]),R[10]=(R[10]+1) ; 46: IF (R[9]>R[1]),R[9]=(1) ; 47: IF (R[10]>R[2]),R[10]=(1) ;
You will find the FOR/ENDFOR-instructions here.
- That the part counter will not reset if you terminate the program.
-
Quote
FOR...ENDFOR Statement
Purpose: Looping construct based on an INTEGER counter
For each run of the loop, the R[4/5/6] value will get + 1. Last execution will be when R[4] = R[1], R[5] = R[2] and so on.Useful if you want to repeat a movement with a certain pattern/spacing.
In the example from I3ooI3oo, R[4] represents the column of the grid (X-axis), R[5] the row (Y-axis) and R[6] the current height (Z-axis).TLDR; R[4/5/6] are basically counters.
-
Sorry for hijacking the thread.
What are the options for cameras on a M-10iA/12 with R30iB?
1) Sony XC-56 (640x480).
2) Kowa(?) digital (1280x960?).
3) Basler GigE camera (1920x1080?).Am I correct? Will the controller be able to handle a 1080P-camera?
-
So it works more as a counter then where the start Count is R[5] in FOR R[5]=3 TO R[13:Number of Thread]; and the end is at R[13]?
In between the FOR and ENDFOR you can do calculations based on the value in the FOR command which will have an increasing effect in your calculations?Is that a correct understanding?
Yes.Quote
FOR...ENDFOR Statement
Purpose: Looping construct based on an INTEGER counterFor each run of the loop, the R[5] value will get + 1. Last execution will be when R[5] = R[13].
If you want to repeat a movement with a certain pattern/spacing, you can use the R[5] value (in an equation) when calculating the offset.
See the code below for an example.-------------------------------------------------------------------------
FOR/ENDFOR används för att loopa, för varje körning av loopen så plussar den värdet på R[5].
När R[5] värdet är detsamma som R[13] så körs loopen en sista gång.
Om du tex. ska montera skruv med en jämn delning mellan skruvhålen så kan du använda dig av en FOR-loop.
Då räknar du ut den nya offseten vid varje loop m.ha. R[5]-värdet.
Se exempel nedan.Code
Display More// 0 to 9, 10 runs; FOR R[5]=0 TO 9; // PR10 X = R[5]*100; // R[5] = 1 = 1*-100 = -100; // R[5] = 2 = 2*-100 = -200; // R[5] = 3 = 3*-100 = -300; // and so on; PR[10,1]=R[5]*(-100); // PR10 Z = 100; PR[10,3]=100; // Move to P1 with Z-offset; L P[1] 250mm/sec CNT100 Offset,PR[10] ; // Move to P1; L P[1] 30mm/sec FINE ; // Retract to P1 with Z-offset; L P[1] 250mm/sec CNT100 Offset,PR[10] ; ENDFOR;
-
A better solution would be to set individual flags to the process that only use what programs you want to run. So you can use logic to skip over the call function.Lets says you have 10 subroutines. Assign a flag to correspond to each subroutine. So in your logic provided we see lbl 50,60, and 70. If you would assign flag 5 to 50, 6 to 60, and 7 to 70.
So if job "Test_Example" does not use subroutine "leave part at testpoint" then set a flag 6 to on. Then use logic to prevent the job from being called. For example, IF (F[6]=ON),JMP LBL[70] would be after lbl[60] and before CALL B_CALL(60). This would allow you to jump to the next label. This would prevent the error.
Yeah, I had something like that in mind at also (but with a BG logic checking at R[4:Article number] and settings flags). It would be better with a bunch of registers in the beginning of the program like you have suggested.
However, I have made a "ifcall"-function (=call if exists) in Karel. I have tried it in the simulator and it seems to work. Fingers crossed that the robot has the required options for running Karel, if not, I´ll go with your suggestion.My first program in Karel.
Code: ifcall.kl
Display MorePROGRAM ifcall VAR ptype:INTEGER pint:INTEGER prvalue:REAL pstr:STRING[32] pstatus:INTEGER prog_index:INTEGER BEGIN --get argument 1, program name as string GET_TPE_PRM(1, ptype, pint, prvalue, pstr, pstatus) --check if string length > 0 IF (STR_LEN(pstr)>0) THEN --get program type of input program name GET_ATTR_PRG(pstr, AT_PROG_TYPE, pint, pstr, pstatus) --if NOT status code = 7073 (program not found) then IF NOT ( pstatus=7073) THEN --call program CALL_PROG(pstr, prog_index) ENDIF ENDIF END ifcall
-
Is the error you are receiving INTP-222("A_0001, 50)Call program failed MEMO-073 Program does not exist? Is an operator mistyping the article number, creating a program name that does not correspond with you job list.
The problem is that some jobs doesn´t use a certain sub-routine, for example, "leave part at testpoint". So the error that is generated is the ones you´re mentioning.
A solution would be to create blank sub-programs, but this would quickly clog the program list with programs that doesn´t fill any function.
In TP, as far as I know, there is no way to test if a program exists before calling it. You could do it in Karel fairly easily though.
Ok, thanks. I´ll look into Karel. -
Hello,
I´m trying to clean up in the code that we are using.A_0001 = Main loop with a popup asking operator for R[4:Article number].
C_XXXX_LBLYY = Part specific sub programs, XXXX is a 4-digit part number. YY, 2-digit number for the step in the progress (loading, unloading etc).The problem I´m having right now is that when a sub/part program is missing, it generates an error.
Is there a fix/bypass for this?Controller: R-30iB
Code
Display More!Put in new part at left LBL[50] CALL B_CALL(50) !Leave finished part at testpoint LBL[60] CALL B_CALL(60) !Leave finished part at outlet LBL[70] CALL B_CALL(70)
-
Hello,
I was wondering how collections work.
I have a R-30iB controller and I can enter a "COLLECTION"-value under the details of each program.Today we are using alot of programs using the following pattern for naming: B_LBL**_****
LBL** = Step in the process, inlet/outlet/loading machine etc. 2 digit ID, 20/30/40 etc.
**** = 4 digit ID for the job.Can I have several programs named the same (B_LBL20, B_LBL30 etc), but seperating them by collections?
Or do I have to use the same pattern for naming that I´m using today (unique name for each program), making collections just a easier way to filter the programs in the list?The most optimal option would be to use folders for each job, but AFAIK that isn´t possible. Correct?