@micahstuh did you able to manage to solve this issue?
If yes, could you please share the code or details.
I am also having the same issue but couldn't find the concrete answers anywhere.
@micahstuh did you able to manage to solve this issue?
If yes, could you please share the code or details.
I am also having the same issue but couldn't find the concrete answers anywhere.
Thank you !!
I did the grouping for external axis and set the SBH signal accordingly.
Robot: KR 50 R2500, KRC5 - 8.7.7, Safe Operation 3.6.2
What is the safest way to implement this?
Robot: KR 50 R2500, KRC5 - 8.7.7, 2 External axis - Positioners, Turn-Table is controlled by PLC
Wanted to Create a safe working area and tools as in sketch:
Only the laser (Laser Beam) must be "On" in a defined workspace (marked with dotted lines); it switches off if the limit is exceeded.
Would like to Create a virtual safe TCP = safe tool that prevents laser radiation from being emitted onto the cabinet or cell wall when the optics are tilted
Hello gpunkt,
Nope, there is no possibitlity to upgrade.
Do you have the possibility to upgrade the system software to v8.30P/xx?
I believe that was when they added IF/THEN/ELSE/ENDIF statements.
This was informative and Thank you !
I would highly recommend you NOT automatically abort simply because the robot is faulted, that is just throwing the baby out with the bathwater.
For example, do you really think it is a good idea to abort your program when you're stepping through in manual and you get a fault because you released the dead-man switch? Or, when the robot faults because of a program bug, do you really want the robot to go back to line zero of the program, or would you rather debug from the line of code that generated the fault?
I prefer to use a user alarm with an adequate severity to abort the robot when needed, rather than aborting for any and all faults.
Definienetly you are right, I have a thought on this as well and the condition for automatic will be added in the abort command.
Regarding the process, we can't or shouldn't continue because we have a deburing application that requires that any error during the process must result in an NIO part. And this is the result, I want to abort the programme at any point and go back home, so we have dropped NIO part on the NIO conveyor belt.
This is what I stated earlier I cannot use THEN and ENDIF condition in V8.20, this is why I am siking for a solution...
Here I am encountering an issue while creating a BG Logic program. My objective is to abort the program upon encountering an error, specifically when the condition (UO[6] Fault = ON) is met due to any issues with the robot.
Although CSTOPI for Abort is available, I prefer to incorporate it with the fault condition. This way, the robot can initiate the recovery to its home position whenever an error occurs during the execution of any program.
Controller details:
Model: LR Mate 200iD/7L
Communication protocol: PROFIBUS-DP
Software Version: V8.20P/35
I have attempted various methods (refer to the attached picture) to achieve this, but consistently encounter the error INTP-443 (%s^4, %d^5) - Invalid item for Mixed Logic.
Can someone assist me in comprehending how the IF statement works without the THEN and ENDIF conditions?
Display MoreI wanted to set the values like parameters for laser.
EX.
H1 = 1000 ; Set Laser Power to 1000 Watt
M20 ; Set Laser to ready
M21 ; Start Laser
These below user defined variables will Communicate with PLC. Similarly GET and SEND data.
HCodeREQ
HCodeACQ
Display MoreWhy don't you open a new thread? You have a complete different question.
What do you mean by 'it is not working'?
Imho this code even won't be compiled. So it can't work.
F.e. you define an array of integer: FANUC_OUT
then you use FANUC_OUT as a structure FANUC_OUT.bHCodeREQ[i].
This will not be compiled.
Your main program
Code--SECTION 4: MAIN PROGRAM ------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------ BEGIN WRITEHM END WRITEHM
doesn't do anything but calling itself, so what other things should this program do instead of nothing?
Even worse, this is a endless recursive calling, you will get a stack overflow or something similar.
Hello Hermann,
Sorry I would have created a new thread.
Exactly, I'm trying to compile the file but have so many errors that it doesn't work.
That's where I would need your help to fix these errors.
As mentioned before, I am new to KAREL. I am reading documents and learning through the threads created here.
Hello all!!
I am just posting here without creating a new thread.
I am new to Karel but trying to understand all the functions.
I have created the code to send and receive the values from the controller to the PLC via a ProfiNET.
But unfortunately it is not working.
I would like to get some help from the experts out here.
------------------------------------------------------------------------------------------------------------------------
--SECTION 1: Program environment
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
PROGRAM WRITEHM
%COMMENT = 'WRITEHM'
%NOLOCKGROUP
%NOBUSYLAMP
%NOPAUSE = ERROR+COMMAND+TPENABLE
%PRIORITY = 1 -- Priority for task execution -> 0 is highest priority
%TIMESLICE = 8 -- Time slicer for tasks having the same priority, 1 is highest.
%DELAY = 8 -- Each 256ms a task is delayed by default 8ms
%ALPHABETIZE
%NOPAUSESHFT
--%INVISIBLE
--%
--%CMOSVARS
%NOABORT= ERROR + COMMAND
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
--SECTION 2 constant and variables declaration
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
CONST
CLR_SCRN = 128
VAR
-- M and H code SPS_IN FANUC_OUT
iMCode : ARRAY [5] OF INTEGER
bMCodeREQ : ARRAY [5] OF BOOLEAN
iHCode : ARRAY [3] OF INTEGER
bHCodeREQ : ARRAY [5] OF BOOLEAN
rHCode : ARRAY [3] OF REAL
-- M and H code SPS_OUT FANUC_IN
bMCodeACQ : ARRAY [5] OF BOOLEAN
bHCodeACQ : ARRAY [5] OF BOOLEAN
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
--SECTION 3: ROUTINES
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
ROUTINE tp_err(message:STRING;abort_flag:BOOLEAN)
-- Writes on th TP error line a message & aborts the program if required
BEGIN
WRITE TPERROR (CHR (CLR_SCRN) , message, CR)
IF abort_flag THEN ABORT; ENDIF
END tp_err
ROUTINE SetHCode (iHCode: INTEGER; rHCodeVal: REAL; bQuick: BOOLEAN)
-- Suche "freien H-Code"
VAR
iSet : INTEGER
I : INTEGER
FANUC_OUT : ARRAY [5] OF INTEGER
FANUC_IN : ARRAY [5] OF INTEGER
BEGIN
iSet=0 ;
FOR I=1 TO 3 DO
IF NOT (FANUC_OUT.bHCodeREQ[I]) THEN
iSet=I;
ENDIF
ENDFOR
IF (iSet=0) THEN
--WRITE TPPROMPT(’FEHLERMELDUNG AND BEWEGUNGSSTOP OR WARTEN BIS EIN H-Code FREI IST’,CR)
else
FANUC_OUT.iHCode[iSet]=iHCode;
FANUC_OUT.rHCode[iSet]=rHCodeVal;
FANUC_OUT.bHCodeREQ[iSet]=TRUE;
ENDIF
IF NOT (bQuit) THEN
--BEWEGUNGSSTOP / PRGSTOP;
WHILE NOT(FANUC_IN=bHCodeACQ[iSet]) DO
--WARTE EINEN ZYKLUS;
ENDWHILE
FANUC_OUT.bHCodeReq[iSet] = FALSE;
ENDIF
RETURN
END SetHCode
ROUTINE QuitHCodes()
--am Ende oder Anfang des ZYKLUS
BEGIN
-- Quittiere alle H-Code
FOR I:=1 TO 3
IF FANUC_IN.bHCodeACQ[I] THEN
FANUC_OUT.bHCodeREQ[I]:= FALSE;
ENDIF
ENDFOR
RETURN
END QuitHCodes
ROUTINE GetHCode()
-- am Anfang oder Ende des ZYKLUS
BEGIN
-- Suche "gesetzen H-Code"
iSet:=0;
FOR I:=1 TO 3
IF SPS_IN.bHCodeREQ[I] THEN
actHCode := SPS_IN.iHCode[I]
actHCodeVal := SPS_IN.rHCode[I]
ExecuteHCode(actHCode, actHCodeVal);
SPS_OUT.bHCodeACQ[I]:=TRUE;
ENDIF
ENDFOR
QuitHCodes();
RETURN
END GetHCode
ROUTINE QuitHCodes()
BEGIN
-- Rücksetzen des Acquire-Bits
FOR I:=1 TO 3
IF NOT(SPS_IN.bHCodeREQ[I]) THEN
SPS_OUT.bHCodeACQ[I]:=FALSE;
ENDIF
ENDFOR
RETURN
END QuitHCodes
END WRITEHM
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
--SECTION 4: MAIN PROGRAM
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
BEGIN
WRITEHM
END WRITEHM
Display More
Hello Oats,
I agree with you but i would have suggested the same, using a absolute value must solve your issue.
Hello Oats,
It will be more easy to look into problem if you share your pseudocode
Hello All,
I am going to use Laser Cladding apllication for my coming project.
Just trying to gather the data and inputs from you all expertise people around here.
Basically i am using Fanuc M20ID35-30P-A-CENR, Controller g R-30iB Plus Type A, Fieldbus ProfiNET with FANUC/MOLEX card (yet to finallise), DCS, ProfiNET Safety and iRProgrammer.
What all the things must be taken into account before hand for this special application
I also have developed pseudocode for my understanding.
Any reference backup would also help me to understand the concepts.
Thanks and Regards,
RK
Hello,
currenly I am working on Tucker device (stud weld) and willing to pass on all the errors from tucker device to the plc.
thank you in advance
Thank you dewitm
I have checked these codes and its working perfect.
Can i ask you one more thing, is it possible to seperate robot error and slave devices error?
hello dewitm,
I only need to send alarm code and not the complete string. and you said it is possible sending only code, how do we do that
Isn't any other option for sending alarm
I am not sure about this but is it possible to receive alarm code from tucker system in one byte and just send it to plc. and later plc will display those alarm code using data block.
Hello All,
I am willing to send active alarms in robot to the PLC over Profi-bus protocol. ( using R-30ic controller)
Active alarms like Tucker faults or welding faults in robot pendent wanted to show on HMI. Adding to this, tucker device is having more than 750 alarms.
Your help is highly appreciated!
Thank you