June 18, 2019, 01:35:25 PM
Robotforum | Industrial Robots Community

 Please help with Function Generator _

normal_post Author Topic:  Please help with Function Generator _  (Read 517 times)

0 Members and 1 Guest are viewing this topic.

January 08, 2019, 06:30:19 PM
Read 517 times
Offline

fuzzy_l


Please help with Function Generator .

For the groundwork took code from "Expert Documentation System Variables For KUKA System Software 8.1, 8.2 and 8.3" page 100. The same code is posted on the forum https://www.robot-forum.com/robotforum/kuka-robot-forum/how-is-the-tts-coordination-works/msg127112/#msg127112 .
When you write it in WorkVisual marked the 2nd error in 34 line.

9a26ddba99e6adbc00f22764ff362c8b-full
  • Unexpected character string 'BrackedSquareLeft' was found.
  • Unexpected character '=' found

What's wrong?

.SRC

Code: [Select]
1   &ACCESS RVP
2   &REL 40
3   &PARAM EDITMASK = *
4   &PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
5   DEF test( )
6
7     ; using sensor at analog input 1
8    SIGNAL Z_CORRECTION $ANIN[1]
9
10
11
12
13    ; Monitor sensor correction value
14   INTERRUPT DECL 11 WHEN $TECHVAL[1] > 20.0 DO UPPER_LIMIT()
15   INTERRUPT DECL 12 WHEN $TECHVAL[1] < -20.0 DO LOWER_LIMIT()
16
17
18
19  ;FOLD INI;%{PE}
20  ;FOLD BASISTECH INI
21    GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
22    INTERRUPT ON 3
23    BAS (#INITMOV,0 )
24  ;ENDFOLD (BASISTECH INI)
25  ;FOLD USER INI
26    ;Make your modifications here
27
28  ;ENDFOLD (USER INI)
29  ;ENDFOLD (INI)
30
31
32  ; Activate cyclical reading of the analog input and
33  ; scaling of $TECHIN[1]
34  ANIN ON $TECHIN[1] = SCALE * Z_CORRECTION + OFFSET
35
36  ; Define correction direction
37  $TECHSYS = #TTS
38  $TECH[1].FCTCTRL.GEOREF = #Z ; Correction is in Z direction (you may want to change it to #Y)
39  ; Sensor correction using the function generator
40  $TECH[1].CLASS = #SENSOR
41  $TECH[1].FCTCTRL.SCALE_IN = 2.0 ; Definition of control parameters
42  $TECH[1].FCTCTRL.OFFSET_IN = 0.0 ; ”
43  $TECH[1].FCTCTRL.SCALE_OUT = 20.0; ”
44  $TECH[1].FCTCTRL.OFFSET_OUT = 0.0; ”
45  $TECH[1].FCT.ORDER = 1 ; ”
46  $TECH[1].FCT.CPNUM = 3 ; ”
47  $TECH[1].FCT.CPS1.X1 = 0.0 ; ”
48  $TECH[1].FCT.CPS1.Y1 = -1.0 ; ”
49  $TECH[1].FCT.CPS1.X2 = 0.5 ; ”
50  $TECH[1].FCT.CPS1.Y2 = 0.0 ; ”
51  $TECH[1].FCT.CPS1.X3 = 1.0 ; ”
52  $TECH[1].FCT.CPS1.Y3 = 1.0 ; ”
52  $TECHPAR[1,1] = 0.056 ; Smoothing constant in s
53
54
55  PTP P1 ; initial position before correction
56  INTERRUPT ON 11
57  INTERRUPT ON 12
58
59  ; Activate sensor correction
60  $TECH[1].MODE = #CYCLE
61  LIN P2 C_DIS
62  LIN P3 C_DIS
63  LIN P4
64
65  ; Deactivate sensor correction
66  $TECH[1].MODE = #OFF
67  INTERRUPT OFF 11
68  INTERRUPT OFF 12
69
70  LIN_REL {X 0.0} ; Zero block for accepting advance run data
71
72  ; in the main run data --> Deactivation of
73  ; the function generator
74  ; Deactivate cyclical analog input
75  ANIN OFF Z_CORRECTION
76  END
77
78  DEF UPPER_LIMIT()
79  ; upper limit...
80  END
81
82  DEF LOWER_LIMIT()
83  ; lower limit...
84  END
85


.DAT

Code: [Select]
&ACCESS RVP
&REL 40
&PARAM EDITMASK = *
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
DEFDAT  test
;FOLD EXTERNAL DECLARATIONS;%{PE}%MKUKATPBASIS,%CEXT,%VCOMMON,%P
;FOLD BASISTECH EXT;%{PE}%MKUKATPBASIS,%CEXT,%VEXT,%P
EXT  BAS (BAS_COMMAND  :IN,REAL  :IN )



;ENDFOLD (BASISTECH EXT)
;FOLD USER EXT;%{E}%MKUKATPUSER,%CEXT,%VEXT,%P
;Make your modifications here

;ENDFOLD (USER EXT)
;ENDFOLD (EXTERNAL DECLARATIONS)


  DECL REAL SCALE = 0.1
  DECL REAL OFFSET = 0.5

DECL E6POS P1={X 0}
DECL E6POS P2={X 0}
DECL E6POS P3={X 0}
DECL E6POS P4={X 0}



ENDDAT

In 60 and 61 lines, too, were mistakes, there were omitted $.

Today at 01:35:25 PM
Reply #1

Advertisement

Guest

January 08, 2019, 07:13:55 PM
Reply #1
Online

SkyeFire

Global Moderator
Don't blindly trust the syntax checking in WorkVisual, especially in older versions.  Try adding that line to a program module in the robot, and see if it compiles properly.

January 08, 2019, 07:36:50 PM
Reply #2
Offline

fuzzy_l


looked at another book SOFTWARE KR C... Function Generator System Tech (KSS) 5.1

d9085052a950b70d23df64ec3101ddd5-full

it's still the same

January 08, 2019, 08:26:13 PM
Reply #3
Offline

fuzzy_l



Tried DIGIN. Also not working. Tomorrow I will try on the robot.

ae65659fee6ce4f9d70e69480f772fea-full


January 12, 2019, 08:42:34 AM
Reply #4
Offline

fuzzy_l


SkyeFire is right. The robot calmly executes this command.  :motz:

d79af9f307efe5db7ea6c4d7fcfca353-full


Share via facebook Share via linkedin Share via pinterest Share via reddit Share via twitter

xx
Function Generator

Started by wes_mcgee on KUKA Robot Forum

9 Replies
549 Views
Last post April 08, 2019, 11:36:01 AM
by panic mode
xx
weave with function generator

Started by raviswanadha on KUKA Robot Forum

0 Replies
1687 Views
Last post June 28, 2014, 03:19:41 AM
by raviswanadha
xx
Function generator for adjusting the distance

Started by Terzi on KUKA Robot Forum

6 Replies
2248 Views
Last post September 15, 2016, 03:10:25 PM
by SkyeFire
xx
Function Generator #DATALINK class

Started by fluke on KUKA Robot Forum

0 Replies
1410 Views
Last post April 23, 2015, 10:12:31 AM
by fluke