Author Topic: Fanuc makro in VKRC4  (Read 205 times)

0 Members and 1 Guest are viewing this topic.

Offline T-Bjorn

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
Fanuc makro in VKRC4
« on: June 27, 2018, 07:57:53 AM »
Hello, i have a issue with logic in VKRC

I need to use IF and THEN , but as you know, in VKRC they are not available , how to bypass it ? ( I need to do simple Macros and in our company we want to have it standardized between most of the robot types) ? 
Syntax from Fanuc macro that i need to implement in VKRC  4 :

   1:  DO[314:Wait for TSLock]=ON ;
   2:  WAIT (DI[315:TScan Lock]=ON AND DI[320:Lock 6D Valid]=ON OR DI[313:Live Bit]=OFF OR DI[321:Lock TimeOut]=ON OR DI[323:AS Run]=OFF)    ;
   3:  IF (DI[315:TScan Lock]=ON AND DI[320:Lock 6D Valid]=ON) THEN ;
   4:  DO[318:Trigger Start]=ON ;
   5:  WAIT (DI[319:Trigger Started]=ON OR DI[321:Lock TimeOut]=ON OR DI[313:Live Bit]=OFF OR DI[323:AS Run]=OFF)    ;
   6:  ENDIF ;
   7:  DO[314:Wait for TSLock]=OFF ;

---
Thanks for answer

Offline fluke

  • Sr. Member
  • ****
  • Thank You
  • -Given: 12
  • -Receive: 66
  • Posts: 495
Re: Fanuc makro in VKRC4
« Reply #1 on: June 27, 2018, 09:26:54 AM »
 1:  DO[314:Wait for TSLock]=ON ;
   2:  WAIT (DI[315:TScan Lock]=ON AND DI[320:Lock 6D Valid]=ON OR DI[313:Live Bit]=OFF OR DI[321:Lock TimeOut]=ON OR DI[323:AS Run]=OFF)    ;
   3:  IF (DI[315:TScan Lock]=ON AND DI[320:Lock 6D Valid]=ON) THEN ;
   4:  DO[318:Trigger Start]=ON ;
   5:  WAIT (DI[319:Trigger Started]=ON OR DI[321:Lock TimeOut]=ON OR DI[313:Live Bit]=OFF OR DI[323:AS Run]=OFF)    ;
   6:  ENDIF ;
   7:  DO[314:Wait for TSLock]=OFF ;


Hello this is only example and is not correct logic. You can write as you wish. KUKA have a lot of logic command just like IF, While, Until, Switch Case etc. but some logic commands is not seen on HMI. You must be read "Expert Programming Manual"

$OUT[314]=TRUE
WAIT FOR ($IN[315] OR $IN[320] OR $IN[313])
IF ($IN[315] AND $IN[320]) THEN
$OUT[318]=TRUE
ENDIF





Offline massula

  • Sr. Member
  • ****
  • Thank You
  • -Given: 73
  • -Receive: 52
  • Posts: 355
    • Robotistas
Re: Fanuc makro in VKRC4
« Reply #2 on: July 06, 2018, 10:01:31 PM »
Well, if You can write the code in regular KRL and put it inside VW_USER, You can follow the example done by fluke.

But If You need this same logic written in VKRL, things could be trickier.

But I think it is possible, using a logic like this one:

Code: [Select]
1: A314 = EIN
2: WARTE BIS (E315 & E320) + !E313 + E321 + !E323
3: F951 = E315 & E320
4: GOTO Label 1 = !F951
5: A318 = EIN
6: WARTE BIS E319 + E321 + !E313 + !E323
7: Label 1
8: A314 = AUS
« Last Edit: July 06, 2018, 10:14:45 PM by massula »