You'll need to use IF NOT $PRO_ACT or IF $PRO_ACT == FALSE , if you want the action to happen when a program is NOT running. See the screenshot below from the Operating and Programming manual.
Posts by Carleton Hall
-
-
Is it possible under the Safety Distributed Bus there are two ranges of bits assigned to be used by KRC4 controller? I'm unfamiliar with Schneider and EIP, but here's what it looks like in Siemens TIA Portal (using ProfiSafe/ProfiNet) if it helps at all. Since you no longer have any safety faults and are able to jog, run programs, etc, it seems like the safety bits are assigned and integrated properly into the PLC program.
-
It's a good idea to ping the IP of the robot (192.168.1.238) to ensure you are able to reach the robot from the computer at least (since you can upload the WV project I imagine this isn't an issue, just a sanity check)
Also within TIA portal under the properties of your 64 safe digital I/O (can be seen in the device view of KRC4), make sure the F_Dest_Add matches the device number configured in WorkVisual, I believe these defaults to 7 which should work fine.
-
Did you use $tool_c to check? $tool is advance run $tool_c main run. So the tool of the currently running motion is tool_c.
Fubini
Thank you for the tip, I added a wait to stop the advanced run and everything is working properly.
-
Hello,
I am trying to dynamically change the TCP of our spindle to be along the bit based on a specified cut depth. We have software that is sending XYZABC coordinates that are normal to the surface we are attempting to mill and we are wanting a pocket cut that follows the shape. If we are able to move the TCP by 1/2 an inch up, we should be able to do this successfully, however when running this code, it does not use the new calculated TCP but rather the one saved in TOOL_DATA[9].
Code
Display MoreDEF millingSide1 ( ) DECL int count, resetCounter DECL FRAME millingOffsetTCP, millingOffsetTCPSave E6POS currentPos $STOPNOAPROX = FALSE toolpathPosIndex = 0 robUpdateToolpathArr = FALSE ;FOLD INI;%{PE} ;FOLD BASISTECH INI GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( ) INTERRUPT ON 3 BAS (#INITMOV,0 ) ;ENDFOLD (BASISTECH INI) ;FOLD USER INI ;Make your modifications here count = 1 ;ENDFOLD (USER INI) ;ENDFOLD (INI) FOR resetCounter = 1 to 10000 STEP 1 ToolpathData[resetCounter] = {X 0,Y 0,Z 0,A 0,B 0,C 0,E1 0,E2 -90,E3 90,E4 0.0,E5 0.0,E6 0.0} ENDFOR goHome(1) WAIT SEC 0 ;FOLD TOOLPATH LOADING AND INITIALIZATION robUpdateToolpathArr = TRUE ;REQUEST POINTS TO BE SENT WAIT FOR $IN[57] ;SOFTWARE STARTING TO SEND ;MOVE TO SAFE POS SLIN XP28 WITH $VEL = SVEL_CP(1.0, , LCPDAT32), $TOOL = STOOL2(FP28), $BASE = SBASE(FP28.BASE_NO), $IPO_MODE = SIPO_MODE(FP28.IPO_FRAME), $LOAD = SLOAD(FP28.TOOL_NO), $ACC = SACC_CP(LCPDAT32), $ORI_TYPE = SORI_TYP(LCPDAT32), $APO = SAPO(LCPDAT32), $JERK = SJERK(LCPDAT32), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0) C_Spl SPTP XP25 WITH $VEL_AXIS[1] = SVEL_JOINT(50.0), $TOOL = STOOL2(FP25), $BASE = SBASE(FP25.BASE_NO), $IPO_MODE = SIPO_MODE(FP25.IPO_FRAME), $LOAD = SLOAD(FP25.TOOL_NO), $ACC_AXIS[1] = SACC_JOINT(PPDAT20), $APO = SAPO_PTP(PPDAT20), $GEAR_JERK[1] = SGEAR_JERK(PPDAT20), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0) C_Spl WAIT FOR NOT $IN[57] ;SOFTWARE DONE SENDING robUpdateToolpathArr = FALSE ;REQUEST POINTS TO NOT BE SENT ;ENDFOLD millingOffsetTCP = TOOL_DATA[9] millingOffsetTCP.Z = millingOffsetTCP.Z - softMillingCutDepth $TOOL = millingOffsetTCP WHILE count < toolpathArrSizeInt IF count == 1 THEN $VEL.CP = 0.3 $APO.CDIS = 0 $ACC.CP = 1 SLIN ToolpathData[count] WITH $TOOL = millingOffsetTCP toolpathPosIndex = toolpathPosIndex + 1 count = count + 1 WAIT SEC 0 enableSpindle() WAIT SEC 0 ELSE $VEL.CP = softToolpathVelocity $APO.CDIS = 1 $ACC.CP = 1 SLIN ToolpathData[count] WITH $TOOL = millingOffsetTCP C_DIS toolpathPosIndex = toolpathPosIndex + 1 count = count + 1 ENDIF ENDWHILE LIN ToolpathData[count-1]:{X 0,Y 0,Z -150,A 0,B 0,C 0} WAIT SEC 0 disableSpindle() WAIT SEC 0 ;MOVE TO SAFE POS SLIN XP26 WITH $VEL = SVEL_CP(1.0, , LCPDAT30), $TOOL = STOOL2(FP26), $BASE = SBASE(FP26.BASE_NO), $IPO_MODE = SIPO_MODE(FP26.IPO_FRAME), $LOAD = SLOAD(FP26.TOOL_NO), $ACC = SACC_CP(LCPDAT30), $ORI_TYPE = SORI_TYP(LCPDAT30), $APO = SAPO(LCPDAT30), $JERK = SJERK(LCPDAT30), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0) C_Spl SPTP XP29 WITH $VEL_AXIS[1] = SVEL_JOINT(50.0), $TOOL = STOOL2(FP29), $BASE = SBASE(FP29.BASE_NO), $IPO_MODE = SIPO_MODE(FP29.IPO_FRAME), $LOAD = SLOAD(FP29.TOOL_NO), $ACC_AXIS[1] = SACC_JOINT(PPDAT23), $APO = SAPO_PTP(PPDAT23), $GEAR_JERK[1] = SGEAR_JERK(PPDAT23), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0) C_Spl ;ENDFOLD goHome(1) END
I'm honestly not sure where the error in this is as my program compiles correctly and when I attempt to debug and monitor my millingOffsetTCP values, they are populated correctly, the motion is just using the wrong tool. I am currently running KSS 8.5.8 on a KUKA KRC4 controller, and any help would be much appreciated! Thank you and have a good day.
-
add line before loop
$STOPNOAPROX=TRUE
this will cause program to stop when approximation is not possible, giving you chance to explore and see what the values of variables are.
btw you did not post your DAT file that accompanies the SRC file.
for example what is the value of LCPDAT12. that will override your line 13
$APO.CDIS = 5
I've added $stopnoapprox=true to the code and I'm able to run through the program without stopping. It appears when increasing the APO.CDIS to 10, it stops frequently. A low APO.CDIS of 0.1 or so is able to run through the motion but still appears fairly jittery.
Here is an updated version of the code I am currently running:
Code
Display MoreFOR resetCounter = 1 to 10000 STEP 1 ToolpathData[resetCounter] = {X 0,Y 0,Z 0,A -91.36,B -1.65,C 1.19,E1 -3500,E2 -90,E3 90,E4 0.0,E5 0.0,E6 0.0} ENDFOR goHome(1) WAIT SEC 0 robUpdateToolpathArr = TRUE ;REQUEST POINTS TO BE SENT WAIT FOR $IN[57] ;SOFTWARE STARTING TO SEND POINTS ;MOVE TO READY POS SLIN XP3 WITH $VEL = SVEL_CP(0.1, , LCPDAT2), $TOOL = STOOL2(FP3), $BASE = SBASE(FP3.BASE_NO), $IPO_MODE = SIPO_MODE(FP3.IPO_FRAME), $LOAD = SLOAD(FP3.TOOL_NO), $ACC = SACC_CP(LCPDAT2), $ORI_TYPE = SORI_TYP(LCPDAT2), $APO = SAPO(LCPDAT2), $JERK = SJERK(LCPDAT2), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0) C_Spl SPTP XP1 WITH $VEL_AXIS[1] = SVEL_JOINT(50.0), $TOOL = STOOL2(FP1), $BASE = SBASE(FP1.BASE_NO), $IPO_MODE = SIPO_MODE(FP1.IPO_FRAME), $LOAD = SLOAD(FP1.TOOL_NO), $ACC_AXIS[1] = SACC_JOINT(PPDAT1), $APO = SAPO_PTP(PPDAT1), $GEAR_JERK[1] = SGEAR_JERK(PPDAT1), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0) C_Spl ;ENDFOLD WAIT FOR NOT $IN[57] ;SOFTWARE DONE SENDING POINTS robUpdateToolpathArr = FALSE ;REQUEST POINTS TO NOT BE SENT WAIT SEC 0 $ADVANCE = 3 $STOPNOAPROX = TRUE WHILE stepCounter < toolpathArrSizeInt $APO.CDIS = 0.1 SLIN ToolpathData[stepCounter] C_DIS toolpathPosIndex = toolpathPosIndex + 1 stepCounter = stepCounter + 1 ENDWHILE
-
Did you checked APO_DIST in LCPDAT12 ?
My apologies, I'm actually not using the extra syntax of the motion. Part of my rabbit hole troubleshooting was thinking that adding C_DIS after the motion command wasn't allowing it to approximate and that I needed the remaining syntax. I've since removed it and updated the main post.
Is it possible my error is due to the advance program pointer not taking into consideration the incremented step counter and is attempting to move to the same position until the main pointer increments step counter?
-
Hello,
I am trying to create a program that is able to smoothly execute a motion path generated by custom software and sent to the robot. I currently have a .sps file running that writes the desired points into an array of E6POS.
SPS:
CodesoftWriteIndexInt = softWriteIndex //This is needed due to softWriteIndex being a real and casting into an int variable ToolpathData[softWriteIndexInt+1].X = plcReqXPos //there is a +1 due to software index beginning to write at 0 whereas KRL array begins at 1 ToolpathData[softWriteIndexInt+1].Y = plcReqYPos ToolpathData[softWriteIndexInt+1].Z = plcReqZPos
This function is working properly and we are able to populate all of the desired points into the array prior to executing any motion. Once the array is populated, I am wanting to execute a while loop to loop through all of the motion points.
SRC:
Code
Display More$ADVANCE = 3 stepCounter = 1 WHILE stepCounter < toolpathArrSizeInt //Array size is a variable passed from software ToolpathData[stepCounter].E1 = -3500 //external axis positions and rotation values are temporarily static ToolpathData[stepCounter].E2 = -90 ToolpathData[stepCounter].E3 = 90 ToolpathData[stepCounter].A = -91.36 ToolpathData[stepCounter].B = -1.65 ToolpathData[stepCounter].C = 1.19 $APO.CDIS = 5 SLIN ToolpathData[stepCounter] C_DIS toolpathPosIndex = toolpathPosIndex + 1 stepCounter = stepCounter + 1 ENDWHILE
Running this for loop, I am able to move to all of the desired points, however, the motion is quite jumpy, and smooth motion is desired. I believe what is causing the issue is the advanced program pointer, however, I'm quite stuck on how to edit the program to move smoothly. I was able to find a topic that somewhat addresses my issue, however in the example provided, it appears that the amount of points sent to the robot is a fixed amount, however, in this application the amount of points is variable.
Advance pointer trick with a WHILE LOOP KUKA KRC4 8.x
Please let me know if more information is needed to help provide a solution. I am currently running KSS 8.5.8 on a KUKA KRC4 controller. Thank you.
-
I have updated to WV V6.0.17_Build0734 however the error still persists
-
well you could describe your steps and exact WoV version. I use WoV6.0.12 all the time, both with KRCs and OL - Never had an issue.
I am using WorkVisual 6.0 V6.0.3_Build0360. It appears 6.0.12 is a newer version, do I need to reinstall work visual entirely for this or is there an update option within WV?
if problem persists, post a screenshot and list of steps to reproduce it
1. Launch WV, cancel project open and move into Programming and diagnosis workspace
2. Create and open a connection to my controller
3. Establish controller state
4. For demonstration, I will try to add a new home position to the $config.dat, here is a screenshot of before and after edits.
-
Hello,
I'm trying to make edits to my code within the WorkVisual programming and diagnosis workspace, however after completing edits and attempting to transfer to the controller, WorkVisual states there are no differences found. I've attempted to restart WV multiple times and my computer also but each time the error persists. I've also disconnected from the robot, deleting my working directly, and reconnecting but this also doesn't fix the issue.
I am using work visual 6.0 and my controller is using KSS 8.5.8.
Any suggestions? Thank you
-
Hello,
I'm trying to install RSI on my controller, however when generating the code for the project I get the following errors
12:23:19 PM puff: Failed to build file "Config:\User\Common\PNIODriver.xml".
12:23:19 PM puff: Failed to build file "Config:\User\Common\pndev1.xml".
12:23:20 PM Unable to generate code for project <26110745350000120003035603>! Reason: The code generation failed.
I'm using work visual 6.0 and KSS 8.5.8, let me know what other information may be needed to diagnose the issue.
To me, it looks like there is an issue with the KUKA.PROFINET MS option, so I tried creating a new profile and reinstalling all of the options and redeploying, but no luck.
Thank you
-
This thread may help: How to use the Profisafe communication in TIA portal?
Key point is to make sure that the Profisafe addresses match in both Work Visual (or SmartPad) and in TIA, the default address is 7 on the Kuka side of things. After that, you need to acknowledge the communication handshake, if I recall there is a safe DB in TIA that you will need to read and write from to handle the acknowledgement, or use the global ack block in your F program.
Overlooked this when previously setting up, this is it! Possibly using the global ack block instead of the one specifically for DB30000 may fix it?
-
Try executing a global safety acknowledge function block in your safety program.
I was getting the same error and once I executed the global safety acknowledge everything was happy.
F_ACK_GL
Shortly after replying I discovered DB(30000) that is created when adding the 64 safe digital i/o module (I also needed to reset my F_Dest_Add to the proper safety address). There is a safety acknowledge ACK_REI and it got ProfiSafe working. Setting the first 2 SafeOperation input byes enables everything nicely except for motion enable. Were you able to fix this?
We also have the same issue when after making any changes to the project and uploading, my 64 safe digital i/o module faults out, and in order to fix it I must delete the module and add it back and reset the F_Dest_Add safety address and it's all happy again. Any clue on how to overcome this?
-
i worked with both CipSafety and ProfiSafe. once you get it to work, life is easy.
i guess Kuka could do a better job in sharing instructions and maybe working example projects (PLC and WoV as a pair).
Example projects would be extremely useful. It feels like as if we've hit a wall and any threads, documentation,are manuals are telling us the same parameters to change and we don't know what else we can do, for CIPSafety and ProfiSafe.
We have now managed to get standard communication using both AB and Siemens PLC's but still no safety comms.
but also there is an issue how much or little effort users are willing to put in. so many don't even read. maybe video instructions...?
woah... replacing tech package, entire PLC wiring, obtaining and learning new PLC software... that is a major move.
what was the firmware version of your AB PLC? did you make use of two network cards or AOP? AOP can be used only with newer firmware... if you have PLC with older firmware the only option is to use two network modules (one for safety and one for standard comms).
Sorry I cant remember the firmware version of the PLC currently but we had a demo model sent to us. I tried setup using two generic modules - one standard, one safety, and also using the KUKA AOP. When using the AOP, no communication was achieved, but with the two separate modules, standard comm work, but no safety comm.
I believe I may be getting on the right track.
I receive these two errors on the 64 safe digital i/o module. I located the ACK_REI tag within DB30000 and set it to true.
The top error in the screenshot reads as follows:
Check the PROFIBUS DP/PROFINET IO connection and ensure that there are no external interference sources.
Check the F-monitoring time of the F-I/O in the hardware and network editor.
Check the diagnostics information of the F-I/O.
You can find more information by searching for the event ID in the STEP 7 online help.
Any suggestions? Thank you all for the help thus far.
-
well, that is not the easiest way to start. both sides can be rather challenging and require a lot of previous knowledge.
15002 is a generic message "Safe device communication error {0}"
the curly braces are placeholder for name of specific device. you did not say what device is that, it could be anything else too. there should be more messages. to toggle message view, click on top message, The message is a safe device communication error ProfiNet device
also what is the exact version of your products (KSS, VoW, GSDML, TIA,...)?
KSS 8.5.4
GSDML is KRC4-ProfiNet_4.1
TIA Version 15.1 Update 4
Work Visual 6.0
also do not rely only on forum. read the manuals.
I've looked through all of manuals I can get a hold of regarding this topic and also got a hold of two internal KUKA webinars regarding setting up ProfiNet and ProfiSafe communication, with an example using a Siemens PLC. I've walked through the steps and match settings without luck.
From my understanding, it should be as simple as setting up 64 safety bits and getting the safety number on WorkVisual, importing the GSDML into TIA and setting the device number and F_DEST_ADD to the safety number found previously.
your PLC is master. what does it say about connection? is the exchange of standard data ok? only ProfiSafe not working? did you set all reserved signals to true?
On the PLC side I have no errors from what I can tell, my project and it's modules are all configured properly. I've mapped the first 4 bits to test in WorkVisual and have a basic program running in TIA setting the bits to true, however they aren't being flipped on the smartPad.
This is our second try getting safety communication working with the KRC4. Previously we were using an AB plc and tried CIP Safety over EthernetIP and also was unable to get safety communication working either. Standard communication worked just fine.
-
Hello all,
I'm having issues setting up Profisafe communications between a Seimens S7-1500 PLC and Kuka KRC4 controller. I've spent weeks looking throughout forum posts, replicating configurations and still can't seem to find the solution (maybe I'm overlooking something). This is my first time working with KUKA robots and TIA portal.
On the TIA Portal Side:
I've setup the KRC4-ProfiNet_4.1 module and assigned 64 safe in/outputs to slot 1 and 256 non-safe in/outputs to slot 2. The device number and F_Dest_Add have been set to 2 in correspondence to the Safety number on the KUKA side.
On the WorkVisual Side:
Network adapter Intel(R) Ethernet Connection l217-LM
Device name - ultron
No. of safe i/o's 64
No. of i/o's 256
Compatibility mode: KRC4-ProfiNet 4.1
Once both of these are setup, some type of connection is established and the two devices recognize each other, however I receive error KSS15002 on the smartPAD.
Please let me know if more information is needed to be provided to find a solution.