1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. KUKA Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Kuka Found mismatched set of tokens.

  • Ryno
  • June 9, 2025 at 4:38 PM
  • Thread is Unresolved
  • Ryno
    Trophies
    2
    Posts
    70
    • June 9, 2025 at 4:38 PM
    • New
    • #1

    Kuka Found mismatched set of tokens.

    Good afternoon, I want to rewrite the program from krc2 to krc4. There are a lot of errors, but this is the first time I've seen this one. How does it work? Who knows?

    Images

    • 20250609_103452.jpg
      • 315.24 kB
      • 864 × 1,920
      • 14
  • Online
    SkyeFire
    Reactions Received
    1,051
    Trophies
    12
    Posts
    9,424
    • June 9, 2025 at 5:25 PM
    • New
    • #2

    KRC2? What KSS version?

    KRC4? What KSS version?

    The IMPORT commands are, as far as I know, no longer used under KSS 8.x. They weren't used under KSS 5.x either, but were tolerated as a holdover from old KRC1 programs from KSS 2.x, to the best of my knowledge.

    The purpose IMPORT once served is now handled by using GLOBAL Declarations.

  • Ryno
    Trophies
    2
    Posts
    70
    • June 9, 2025 at 6:55 PM
    • New
    • #3

    Good afternoon. krc2 v5.5 and krc4 kss 8.6 kuka officelite

  • MOM
    Reactions Received
    175
    Trophies
    7
    Posts
    1,424
    • June 9, 2025 at 7:25 PM
    • New
    • #4

    On KSS 5.5 IMPORT exists. On KSS 8.x IMPORT is removed.

    Quote from SkyeFire

    The purpose IMPORT once served is now handled by using GLOBAL Declarations.

  • Ryno
    Trophies
    2
    Posts
    70
    • June 9, 2025 at 7:42 PM
    • New
    • #5

    Foto

    Images

    • 20250609_204210.jpg
      • 356.31 kB
      • 864 × 1,920
      • 9
  • Ryno
    Trophies
    2
    Posts
    70
    • June 9, 2025 at 7:44 PM
    • New
    • #6

    Foto

    Images

    • 20250609_204414.jpg
      • 370.03 kB
      • 1,200 × 1,600
      • 7
  • Ryno
    Trophies
    2
    Posts
    70
    • June 9, 2025 at 8:40 PM
    • New
    • #7

    Can you tell me how to create a program correctly without using the import function?

  • Online
    SkyeFire
    Reactions Received
    1,051
    Trophies
    12
    Posts
    9,424
    • June 9, 2025 at 9:11 PM
    • New
    • #8
    Quote from Ryno

    Can you tell me how to create a program correctly without using the import function?

    You will need to make a list of every item the old program is IMPORTing. In the screenshots you provided, it appears to only be variables, but IMPORTing subroutines and functions was also done.

    For variables, the simplest way to make them Global is to DECL them in the module $CONFIG.DAT. Any variable DECL'd in CONFIG.DAT is inherently Global, dating back to the earliest versions of KSS.

    However, tampering with $CONFIG.DAT, while legal, is not the best way to do things. An alternate method would be to create a new .DAT file, DEF'd with the PUBLIC keyword, then DECL GLOBAL each variable. This is part of the KUKA ConveyorGlobals .DAT file as an example:

    Code
    DEFDAT  conveyorglobals PUBLIC
    ;FOLD CONVEYOR GLOBALS
    
    ;CONV Booleans
    DECL GLOBAL BOOL B_CALL_CONV_MOV=TRUE
    DECL GLOBAL BOOL B_QUIT_BECAUSE_MAX_DIST=TRUE
    DECL GLOBAL BOOL B_QUIT_BECAUSE_EMS=FALSE
    DECL GLOBAL BOOL B_CONTINUE_AFTER_EMS=FALSE
    
    ; many more variables here
    ENDDAT
    Display More

    Every variable in a PUBLIC .DAT file that is DECL GLOBAL becomes Global across the entire KRC, available to any routine in any module.

    HOWEVER: this creates the potential to have "local" variables and Global variables that have the same name. This usually creates a Warning in WorkVisual, but does not generate a compilation error. So it is your responsibility to ensure no name collisions occur.

  • Ryno
    Trophies
    2
    Posts
    70
    • June 9, 2025 at 10:18 PM
    • New
    • #9
    Quote from SkyeFire

    You will need to make a list of every item the old program is IMPORTing. In the screenshots you provided, it appears to only be variables, but IMPORTing subroutines and functions was also done.

    For variables, the simplest way to make them Global is to DECL them in the module $CONFIG.DAT. Any variable DECL'd in CONFIG.DAT is inherently Global, dating back to the earliest versions of KSS.

    However, tampering with $CONFIG.DAT, while legal, is not the best way to do things. An alternate method would be to create a new .DAT file, DEF'd with the PUBLIC keyword, then DECL GLOBAL each variable. This is part of the KUKA ConveyorGlobals .DAT file as an example:

    Code
    DEFDAT  conveyorglobals PUBLIC
    ;FOLD CONVEYOR GLOBALS
    
    ;CONV Booleans
    DECL GLOBAL BOOL B_CALL_CONV_MOV=TRUE
    DECL GLOBAL BOOL B_QUIT_BECAUSE_MAX_DIST=TRUE
    DECL GLOBAL BOOL B_QUIT_BECAUSE_EMS=FALSE
    DECL GLOBAL BOOL B_CONTINUE_AFTER_EMS=FALSE
    
    ; many more variables here
    ENDDAT
    Display More

    Every variable in a PUBLIC .DAT file that is DECL GLOBAL becomes Global across the entire KRC, available to any routine in any module.

    HOWEVER: this creates the potential to have "local" variables and Global variables that have the same name. This usually creates a Warning in WorkVisual, but does not generate a compilation error. So it is your responsibility to ensure no name collisions occur.

    Thank you so much for your reply! Tomorrow I'll try to do as you said.

  • Ryno
    Trophies
    2
    Posts
    70
    • June 11, 2025 at 5:27 AM
    • New
    • #10
    Quote from SkyeFire

    You will need to make a list of every item the old program is IMPORTing. In the screenshots you provided, it appears to only be variables, but IMPORTing subroutines and functions was also done.

    For variables, the simplest way to make them Global is to DECL them in the module $CONFIG.DAT. Any variable DECL'd in CONFIG.DAT is inherently Global, dating back to the earliest versions of KSS.

    However, tampering with $CONFIG.DAT, while legal, is not the best way to do things. An alternate method would be to create a new .DAT file, DEF'd with the PUBLIC keyword, then DECL GLOBAL each variable. This is part of the KUKA ConveyorGlobals .DAT file as an example:

    Code
    DEFDAT  conveyorglobals PUBLIC
    ;FOLD CONVEYOR GLOBALS
    
    ;CONV Booleans
    DECL GLOBAL BOOL B_CALL_CONV_MOV=TRUE
    DECL GLOBAL BOOL B_QUIT_BECAUSE_MAX_DIST=TRUE
    DECL GLOBAL BOOL B_QUIT_BECAUSE_EMS=FALSE
    DECL GLOBAL BOOL B_CONTINUE_AFTER_EMS=FALSE
    
    ; many more variables here
    ENDDAT
    Display More

    Every variable in a PUBLIC .DAT file that is DECL GLOBAL becomes Global across the entire KRC, available to any routine in any module.

    HOWEVER: this creates the potential to have "local" variables and Global variables that have the same name. This usually creates a Warning in WorkVisual, but does not generate a compilation error. So it is your responsibility to ensure no name collisions occur.

    The main program uses a subroutine in which these problem points are used. It is quite clear to me how to register them in the main program.

    Images

    • 20250609_204414.jpg
      • 370.03 kB
      • 1,200 × 1,600
      • 3
    • 20250611_060638.jpg
      • 355.77 kB
      • 1,200 × 1,600
      • 1
  • Ryno
    Trophies
    2
    Posts
    70
    • June 11, 2025 at 5:28 AM
    • New
    • #11

    Foto

    Images

    • 20250611_061936.jpg
      • 381.15 kB
      • 1,200 × 1,600
      • 3
    • 20250611_062226.jpg
      • 175.78 kB
      • 1,200 × 1,600
      • 2
  • Ryno
    Trophies
    2
    Posts
    70
    • June 11, 2025 at 5:31 AM
    • New
    • #12

    Foto

    Images

    • 20250611_063011.jpg
      • 444.74 kB
      • 1,200 × 1,600
      • 6
  • Ryno
    Trophies
    2
    Posts
    70
    • June 11, 2025 at 5:32 AM
    • New
    • #13

    Foto

    Images

    • 20250611_063221.jpg
      • 539.66 kB
      • 1,200 × 1,600
      • 4

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Tags

  • Kuka Found mismatched set of

Users Viewing This Thread

  • 1 Guest
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download