Hello, im doing this on a KR125L90/2 Tj, KS v4.93 (old one).
The thing im working with is a screwfeeder connected with 2 screwdrivers on a robot tool, the screwsystem (böllhoff) has no plc so it's running through the robot. the feeder is running through the sps and i have a sub program to control the screwdrivers, at this time it all works. but it has this limitation that the tool has to be in 90degrees to the woodpart, and now i want to use it on curved parts so i can't get a fixed distans between the woodpart and the tool, so the depth signal that has been used is now connected with a pressure transmitter so i can get signals from torque instead, and for the problem that is
1. screwdriver is up and i toggle the output to send it down.
2. pressure signal is false until it hits the screw.
3. pressure signal is true and it screwing.
4. torque is ok, pressure signal is false
that is what im trying to figure out how to program, and i will also start a timer when the pressure signal is true incase torque fails. until this point i have had the easy part to only watch the signal to be true, but now it's false, true some millisecs (depending on screwlength), false. and it's the last false signal i need to continue, unless the timer sets in. i hope you understand my english and what im trying to achive.
KUKA Automating Screw process
-
Anwal -
September 26, 2018 at 11:50 AM -
Thread is marked as Resolved.
-
-
In my opinion, your only option is to hire someone knowledgeable
-
Your description is... unlcear. But if I have understood it correctly, you want to do something like this:
Code
Display MoreDECL REAL Timeout SIGNAL I_Pressure $IN[1] ; adjust value as needed, obviously SIGNAL I_TORQUE $IN[2] ; Adjust as needed SIGNAL O_ExtendScrewDriver $OUT[1] ; adjust as needed SIGNAL O_RotateScrewDriver $OUT[2] ; adjust as needed Timeout = 5.1 ; seconds, adjust as needed ; begin screw-driving sequence O_ExtendScrewDriver = TRUE ; extend screw driver $TIMER[1] = -1000 * Timeout ; convert to milliseconds, set negative $TIMER_STOP[1] = FALSE ; start timer WAIT FOR (I_Pressure OR $TIMER_FLAG[1]) ; wait for screw driver to make contact, or timeout $TIMER[1] = -1000 * Timeout ; convert to milliseconds, set negative $TIMER_STOP[1] = TRUE ; stop timer IF I_Pressure THEN O_RotateScrewDriver = TRUE $TIMER_STOP[1] = FALSE ; start timer WAIT FOR (I_TORQUE OR $TIMER_FLAG[1]) ; wait for torque or timeout IF I_TORQUE THEN ; Success, continue cycle ELSE HALT ; timed out waiting for Torque ENDIF ELSE HALT ; failure to make contact ENDIF
-
SkyeFire you're pretty much spot on!! I appreciate the time you took, and im pretty sure it solves it now.