January 18, 2019, 04:15:33 AM
Robotforum | Industrial Robots Community

 Please help with Function Generator _


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

0 Members and 1 Guest are viewing this topic.

January 08, 2019, 06:30:19 PM
Read 269 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.


  • 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 $.

Linkback: https://www.robot-forum.com/robotforum/index.php?topic=30255.0
  • Like    Thanks

Today at 04:15:33 AM
Reply #1

Advertisement

Guest

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

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.
  • Like    Thanks

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



it's still the same
  • Like    Thanks

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

fuzzy_l



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



  • Like    Thanks

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

fuzzy_l


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


  • Like    Thanks


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

xx
weave with function generator

Started by raviswanadha on KUKA Robot Forum

0 Replies
1439 Views
Last post June 28, 2014, 03:19:41 AM
by raviswanadha
xx
Function Generator #DATALINK class

Started by fluke on KUKA Robot Forum

0 Replies
1302 Views
Last post April 23, 2015, 10:12:31 AM
by fluke
xx
Sensor offset using function generator

Started by mduncan78 on KUKA Robot Forum

0 Replies
1446 Views
Last post October 02, 2013, 11:08:17 PM
by mduncan78
xx
Function generator absolut correction

Started by ceyhan on KUKA Robot Forum

0 Replies
1054 Views
Last post March 12, 2016, 10:43:55 PM
by ceyhan