Thank you very much panic mode! I will try it tomorrow and give you feedback!😊😊
Posts by Mate_271
-
-
.. and check if your I/O are mapped correctly
One thing is quite interesting, because $STOPMESS is always TRUE, and in PLC it is not active in this form... I/O map should be good because i checked everything and everything else was good.
Therefore i tried to just switch on the CONF_MESS with timer, because as hermann says it is edge sensitive.CONF_MISS TRUE appears 2-3 sec in KUKA HMI and $STOPMESS didn't disappeared. It is still TRUE, if i change to T1/T2 mode...
It doesn't want to disappear.
-
-
Sorry for those messages... I try to test something, about ladder, thats why you see those "errors".
The only thing what, i see is that:
Programstart is disappear after few sec and everything stop like this with that stop message.
I am using Turck HMI PLC so the only cable is the ethernet and LAN cable, so it can be problem with it:(
If $STOPMESS is red, it means its TRUE -> there is some error?
and if $CONF_MESS would be TRUE -> $STOPMESS will be grey?
-
Hello guys!
This was the most similar post, which is write my problem.
I try to run AUTO_EXT, but i going to the wall with face every single time.:(
I try to read every single manual and posts what you talk about this, but my problem is not so similar like those.
I read a PLC ladder diagram what @Panicmode attached one of these posts. Name of the PLC ladder is:
ext- Ladder diagram.(Attached)
The problem is the next:
Everything goes well, until i enable move -> $MOVE_ENABLE - > TRUE
STOP message appers:
error number : 1210:
Ackn. general motion enable ->I think this will be a good new, but when i would like to dissapear STOPMESS, i can't, because it's always true, whatever i am doing.
I don't know maybe this is the main problem, but i have one more:
PLC ladder line 6:
I can start the program -> $EXT_START, but PRO_ACT don't want to appear...
I tried everything( change ladder,longer duty cycle.. etc.), but stop message don't want to dissapear and PRO_ACT don't want to be TRUE.
I spent almost my entire day on it, so now I would turn to you to see if anyone can help. I hope you can guys!
Thanks in advance!M.
C:\Users\Ivica.Kvasina.AMER\Desktop\SHORTCUT\ext.xps
C:\Users\Ivica.Kvasina.AMER\Desktop\SHORTCUT\ext.xpsC:\Users\Ivica.Kvasina.AMER\Desktop\SHORTCUT\ext.xpsC:\Users\Ivica.Kvasina.AMER\Desktop\SHORTCUT\ext.xps
-
Ohh wow, thanks you.
The end of the code is mine addition, hermann did everything correct!😊
So, it looks like i can use it!
Thank you very much guys!:)
-
Wow SkyeFire I really appreciate your detailed informations what you give to me!:)
Then i thought correctly, thanks for the confirmation:)
If you don't mind i would like to ask one question about the upper program what i commented.
Is it possible to write a declaration as GLOBAL INTERRUPT DECL 5 in cell. src like hermann did here:
DEF cell( )
INIT
BASISTECH INI
CHECK HOME
PTP HOME
Reset_IO()
AUTOEXT INI
;RESTART INTERRUPT
INTERRUPT DECL 1 WHEN bAbort_Program == TRUE DO Restart_Program()
INTERRUPT OFF 1
WAIT SEC 0.12;GLOBAL INTERRUPT DECL 5 WHEN bAbort_Program == TRUE DO Restart_Program()
;GLOBAL INTERRUPT OFF 5
;and so on
And after that, in the local .src i write in the lines an INTERRUPT ON 5?
DEF ROBOT_MAIN_PRG()
INI
PTP XHOME
PTP P1PTP P2
and so on
INTERRUPT ON 5
END
And in the cell.src:
GLOBAL DEF Restart_Program ()
BRAKE
GLOBAL INTERRUPT OFF 5
Wait SEC 1
RESUME
ENDIs this fine then?
-
NO.
The Cell should not look like that.More like this:
Code
Display MoreDEF cell( ) INIT BASISTECH INI CHECK HOME PTP HOME Reset_IO() AUTOEXT INI ;RESTART INTERRUPT INTERRUPT DECL 1 WHEN bAbort_Program == TRUE DO Restart_Program() INTERRUPT OFF 1 WAIT SEC 0.12 loop mainloop () interrupt off 1 UnknownToHome() endloop END def Mainloop() INTERRUPT ON 1 LOOP P00 (#EXT_PGNO,#PGNO_GET,DMY[],0 ) SWITCH PGNO ; Select with Program number CASE 4 P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request IF $IN_HOME==TRUE THEN Maintenance( ) ENDIF CASE 7 P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request IF $IN_HOME==TRUE THEN MasterReference( ) ENDIF CASE 8 P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request IF $IN_HOME==TRUE THEN BrakeTest( ) ENDIF CASE 9 P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request IF $IN_HOME==TRUE THEN Reset_IO ( ) ENDIF CASE 10 P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request IF $IN_HOME==TRUE THEN MAIN JOB ENDIF DEFAULT P00 (#EXT_PGNO,#PGNO_FAULT,DMY[],0 ) ENDSWITCH ENDLOOP END GLOBAL DEF Restart_Program () BRAKE INTERRUPT OFF 1 Wait SEC 1 RESUME END
Hello guys!
Hermann can I ask that why did you use GLOBAL DEF in cell.src?
Is this the only way to write a program in cell.src?
Moreover, what would happen, if i don't write the program "name" as you do, because i write the full program into case 4.
Code
Display More;Your version: CASE 4 P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request IF $IN_HOME==TRUE THEN Maintenance( ) ENDIF ;My version, for instance: CASE 4 P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request IF $IN_HOME==TRUE THEN PTP XHOME PTP P2 ; and so on ENDIF
Is that possible?
I tell yout why is it important for me. I saw your code(which i respondod) and it helped me a lot, but i would like to modify it a little bit.
-> Process is going in a loop cycle.
-> the operator push a virtual button, when would like to modify the parameters.(interrupt off))
-> The PLC got the information and waiting to the robot to end the last cycle.(in the last line interrupt on, and it trigger immediately)
->When the robot would like to start the cycle again, he won't because the program pointer went back here, and wait to the parameters and the start button:
loop
mainloop ()
interrupt off 1
UnknownToHome()
endloop
ENDThen it starts again.
That's why i would like to write the full program into cell.src
If i just write the program in case 4 like, Robot_program() and in that program i would like to make that interrupt what i mention upper, that wouldn't work.
Any advice please?:)
Thanks in advance!:)
-
Thanks for your help Panicmode
So, if i think right, the program what i would like to run in aut ext, have to be pasted to cell.src.The whole program doesn't finished, but i wanted to try the "data_transfer" between the PLC and KRC.After this, i think i can't try it in T1, can i?
Code
Display MorePGNO_TYPE=2 CASE 2 ;******************* FOR I=0 TO PGNO_LENGTH-1 STEP 4 N=0 J=1 FOR M=I TO I+3 IF $IN[PGNO_FBIT+M] THEN N=N+J IF REFLECT_PROG_NR==1 THEN $OUT[PGNO_FBIT_REFL+M]=TRUE ENDIF ENDIF J=J*2 ENDFOR IF (N>9) THEN PGNO_ERROR=2 PGNO=0 EXIT ELSE PGNO=PGNO+N*L L=L*10 ENDIF ENDFOR ENDSWITCH
As i think right this program( TP\ p00.src) contains and write everything what i need to try the connection.
(Only in Aut_ext?)
Have to define PGNO_FBIT_REFL, PGNO_LENGHT and PGNO_FBIT:
PGNO_FBIT: 80PGNO_LENGTH:16
PGNO_FBIT_REFL:0
And as i see,will i get the PGNO? That would be my lengths in DEFFCT?
Before i insert this code to $config.dat, should i declare something?
I mean:
SIGNAL PGNO $IN[80] TO $IN[95]?(and what more, if need?)
Or i can just write this code to $config.dat and use with the function name(material_length) in the main program.
CodeDEFFCT material_length() ;To $Config.dat ;SIGNAL X1_length $IN[80] TO $IN[83] ;SIGNAL X10_length $IN[84] TO $IN[87] ;SIGNAL X100_length $IN[88] TO $IN[91] ;SIGNAL X1000_length $IN[92] TO $IN[95] RETURN X1000_length*1000+X100_length*100+X10_length*10+X1_length ENDFCT
Thanks fou your help in advance!
M. -
I have attended and completed basic and advanced training on the KUKA KRC2 and as I move forward with my first project I still run into mistakes and incomprehensible things.
Really appreciate your help PanicMode it helped me a lot, but i have one or two more dark spots.
So,
I would like to use BCD (PGNO_type 2)
I would like to use 16 bits, cause i will use 4-digit numbers.(Am i think right?)The problem... i don't know why should i use cell.src?
Code
Display More1 DEF CELL ( ) … 6 INIT 7 BASISTECH INI 8 CHECK HOME 9 PTP HOME Vel= 100 % DEFAULT 10 AUTOEXT INI 11 LOOP 12 P00 (#EXT_PGNO,#PGNO_GET,DMY[],0 ) 13 SWITCH PGNO ; Select with Programnumber 14 15 CASE 1 16 P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) 17 ;EXAMPLE1 ( ) ; Call User-Program 18 19 CASE 2 20 P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) 21 ;EXAMPLE2 ( ) ; Call User-Program 22 23 CASE 3 24 P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) 25 ;EXAMPLE3 ( ) ; Call User-Program 26 27 DEFAULT 28 P00 (#EXT_PGNO,#PGNO_FAULT,DMY[],0 ) 29 ENDSWITCH 30 ENDLOOP 31 END
As you write and as i saw in the manual, i can just change in case 1 the " ; EXAMPLE1" to "myprog1" or something like that.
i would like to use the signal like this:
CodeDEFFCT material_length() ;To $Config.dat ;SIGNAL X1_length $IN[80] TO $IN[83] ;SIGNAL X10_length $IN[84] TO $IN[87] ;SIGNAL X100_length $IN[88] TO $IN[91] ;SIGNAL X1000_length $IN[92] TO $IN[95] RETURN X1000_length*1000+X100_length*100+X10_length*10+X1_length ENDFCT
But we talked about this earlier. I have to copy this to config. dat, then what should write into the cell.src cases?Which programs?:)
Where i would like to use those inputs?I hope i write everything clear
Thanks four your helps in advance!:) -
Yes thanks panic mode ,
And I'm aware of the laws involved in safety and we have booked in for the trainings few weeks from now so should be okay.Appreciate your response and thanks for your help.
Cheers
NI tried to find the other post, but it deleted. It was worked actually?:)
And what was the solution, if you fixed it?:)
Thanks for your help in advance!:)Cheers,
M.
-
We are using turck PLC which is using codesys, but if u would like to use a HMI for visualization you have to use Turck TX VisuPro.(zero information on websites...)
With this i got the following advice from the producer:
(I type a length(what i need to move the robot in x) to the HMI which is for instance 1500.With the upper method i would need 4 I/O / number. 1 - 5 - 0 -0.. etc), but 1500 in binary: 10111011100 i would need 11 bit.
Visu pro can configure the 1500 to byte to BCD. I attach a picture what i can do with it.
Memory type: Robot will get as an input buffer.
I choose offset 10.( I am not sure about it and this will be an other question. How should i made the signal declaration is this type? IN 80- IN 88?
If i type 1500 into the HMI how can i get back the full number, if i choose byte? -
Appreciate your help!:)
-
Sorry, if i wrote not understandable, but i say it overall, to this "method" what we were talking to earlier.
DEFFCT INT Tool_ID()
SIGNAL X1 $IN[1201] TO $IN[1204] ; low nibble
SIGNAL X10 $IN[1205] TO $IN[1208] ; high nibble
RETURN X10*10 + X1
ENDFCT
To this.
-
So i hope write everything good, but i would have an other question.
Which PGNO_TYPE IS THIS? 1 or 2?
Binary or BCD?
-
LSB is the lowest input so value 5 would be:
$IN[124]= 1
$IN[125]= 0
$IN[126]= 1
$IN[127]= 0
Ohh i see. Thanks a lot
So am i write everything right?If i declare these signals in config.dat and give these inputs values (to 124 and 127)from the PLC, will i get 1500(and of course i need 12 more inputs for 1 and 0 and 0) if i say in the main program:
Length = material_length() ? -
Hello guys:)
Here we go again..
I didn't have time to deal with this, so this is the time when i would like to use signals.
panic mode i thing there was a little missunderstanding between us, i think i didn't express myself well.So i would like to use PGNO_TYPE = 1 (binary coded integer)
Cause as i know this is the best method in KRC2 to transfer data. Or can i send data pack somehow?
in field:
The operator would like to produce 1500 x 500 material. The robot will dose to assembly. Every workpeace will grab by a vaccuum gripper in the center. So the robot will has a zero point and will go 250mm in x and 750 mm in y. This is the center of the material.
The operator will type these parameters in the HMI. (length - width)Question:
To stay on the example.
1500:
Signal x1: 0000Signal x10: 0000
Signal x100: 0101
signal x1000: 0001
Code
Display MoreDEFFCT material_length() ;To $Config.dat ;SIGNAL X1_length $IN[116] TO $IN[119] ;SIGNAL X10_length $IN[120] TO $IN[123] ;SIGNAL X100_length $IN[124] TO $IN[127] ;SIGNAL X1000_length $IN[128] TO $IN[131] RETURN X1000_length*1000+X100_length*100+X10_length*10+X1_length ENDFCT DEFFCT material_width() ;To $Config.dat ;SIGNAL X1_width $IN[132] TO $IN[135] ;SIGNAL X10_width $IN[136] TO $IN[139] ;SIGNAL X100_width $IN[140] TO $IN[143] ;SIGNAL X1000_width $IN[144] TO $IN[147] RETURN X1000_width*1000+X100_width*100+X10_width*10+X1_width ENDFCT
I hope everything good until this.:)
The question is how the robot know that which $IN is the binar value 1?
So stay on the exmaple: 1500.0, 0 don't care because there are no IN switching.
5 at the hundredth place value.
It is 0101 with $IN[124] TO $IN[127].
How should we see this, which inputs will switch on and how will know the robot which one is the 20
or 21 or 22 or 23 ?
$IN[124]= 0$IN[125]= 1
$IN[126]= 0
$IN[127]= 1
And firstly should we declare somehow to know the robot which is the 20 ... etc.?
I hope you understand what i would like to ask and i hope i can help somebody else too with these questions.Thanks to read this and thanks for your help in advance!
-
SOLVED!!!!
Thanks for your help guys. SkyeFire really appreciate your help! IT WORKEDJust have to changed what you said and worked!:)
So, guys unluckily i didn't get result with advance command.
I write down the important code detail:
Code
Display MoreDEF Robcell_v1() INI INTERRUPT DECL 4 WHEN $IN[5]==TRUE DO Approximation_toMaterial() INTERRUPT DECL 2 WHEN $IN[5]==FALSE DO Gripper_grab_material() ;INTERRUPT DECL 5 WHEN $IN[4]==FALSE DO Set_aside_palett() WAIT FOR $IN[3]==TRUE ;Start button on HMI WAIT FOR $IN[4]==TRUE ;Wait for material stack PTP XHOME REPEAT ;INTERRUPT ON 5 This will set aside the palett when the sensor don't sense material on the conveyor.The material what it grapped was the palett that's why the robot will set aside it. The program what i need for this not finished. Moving_totheMaterialstack() INTERRUPT OFF 2 INTERRUPT OFF 4 ;Moving_totheAssemblyMachine() $ADVANCE=3 UNTIL $IN[4]==TRUE ; this is a sensor which is sense the Material stack is in position or not in the conveyor DEF Moving_totheMaterialstack() PTP P2 ;this is a point above the material stack INTERRUPT ON 4 LIN P3 ; This point is under the material stack, what the robot never reach. PTP XHOME ; Just in case i add this point, but it never happen. INTERRUPT OFF 4 END DEF Approximation_toMaterial() WAIT SEC 0 INTERRUPT OFF 4 INTERRUPT ON 2 BRAKE PTP $POS_ACT LIN P3 ; This is the same point like in the Moving_totheMaterialstack() program, but here the Vel of the rob is 0.5 m/s. INTERRUPT OFF 2 END Gripper_grab_material() WAIT SEC 0 INTERRUPT OFF 2 BRAKE PTP $POS_INT OUT 10 'GRIPPER_ON' State=True WAIT SEC 0.2 RESUME END
I think i wrote everything in my previous comment what is important about the robot.
I attach the picture what the robot write to me:
I hope i wrote everything right.
Thanks for your help in advance (again) guys.:)
-
Anyway, thanks for your help. I’ll try it tomorrow😁👍
-
If it helps i translate the program name to english😂😂