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. Kawasaki 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

Error when passing arguments to AS subroutine using Duaro 2 robot

  • dohlfhauldhagen
  • October 10, 2019 at 4:30 PM
  • Thread is Unresolved
  • dohlfhauldhagen
    Reactions Received
    7
    Trophies
    3
    Posts
    59
    • October 10, 2019 at 4:30 PM
    • #1

    Hey all. I'm working with a Duaro 2 robot.

    I am trying to pass an argument to a program via a subroutine call from an AS program. The AS program I am calling looks like this:

    .PROGRAM PlaceWarmTray(.Arg1)

    <code here>

    .END

    I try to call it from my main program like this:

    CALL PlaceWarmTray(1)

    Every time I try to run the program, I get “Error Code 2018 Check the argument settings in macro pg” on the tablet. The confusing thing is, when I call the program from a tablet program and enter in an argument that way, it works just fine. It just doesn’t work when the program is called from an AS program. Has anyone run into this before?

    Thanks!

  • kwakisaki
    Reactions Received
    694
    Trophies
    12
    Posts
    4,770
    • October 10, 2019 at 4:53 PM
    • #2

    In program PlaceWarmTray, are you referencing .arg1 at all?

    View my channel at Industrial Robotics Consultancy Limited - YouTube

  • dohlfhauldhagen
    Reactions Received
    7
    Trophies
    3
    Posts
    59
    • October 10, 2019 at 5:58 PM
    • #3
    Quote from kwakisaki

    In program PlaceWarmTray, are you referencing .arg1 at all?

    Yes. Here is the full program:

  • kwakisaki
    Reactions Received
    694
    Trophies
    12
    Posts
    4,770
    • October 10, 2019 at 6:37 PM
    • #4

    Your syntax maybe incorrect here.

    I've never come across the ELSEIF instruction as a valid syntax in any Kawasaki Robot.

    The Duaro may have some additional AS instruction to incorporate ELSEIF, but looking the AS Manual for Duaro, it doesn't appear to be there.

    The equivalent is CASE OF statement:

    CASE .arg1 OF

    VALUE 0:

    ………………

    VALUE 1:

    ………………

    VALUE 2:

    ………………

    ANY :

    ………………

    END

    Try that and see if it makes any difference.

    *** With the ANY instruction make sure to include a space after and before the colon, otherwise it's treated as a label ***

    View my channel at Industrial Robotics Consultancy Limited - YouTube

  • Alexandru
    Reactions Received
    49
    Trophies
    6
    Posts
    407
    • October 10, 2019 at 9:19 PM
    • #5

    if you want to stop the robot at ANY condition you can write something like this:

    ANY :

    PRINT "Invalid value"

    PAUSE

    END

    It will pause the cycle on from the robot and the robot will stop.

  • Motouser
    Reactions Received
    39
    Trophies
    4
    Posts
    288
    • October 11, 2019 at 12:40 PM
    • #6
    Quote from kwakisaki

    I've never come across the ELSEIF instruction as a valid syntax in any Kawasaki Robot.

    YASKAWA EMPIRE strikes back:grinning_squinting_face::grinning_squinting_face::grinning_squinting_face:.

    This is a big difference between kawa and yaska: in AS language the if and else is a little poor, otherwise in Yaskawa(and even in STAUBLI) the elseif command is like the case of a SWITCH..CASE instruction.

  • kwakisaki
    Reactions Received
    694
    Trophies
    12
    Posts
    4,770
    • October 11, 2019 at 4:40 PM
    • #7

    For sure, many OEM's use different IF syntax (I'm encountering something similar with Fanuc at the moment) but it is what it is.

    What is puzzling me is the error.

    It is not a standard Kawasaki error I have come across and has no reference in the Kawasaki Troubleshooting Manual.

    If it was a file loaded in via KRTerm (PC to Controller) you would receive a different error.

    I think files transferred from tablet to controller use internal macro's and I think this error is a tablet generated error as it cannot compile it.

    I have tried to locate this error in the Duaro docs I have, but haven't found anything.

    Something to feedback to Kawasaki I think if indeed this is down to incorrect syntax.

    View my channel at Industrial Robotics Consultancy Limited - YouTube

  • kwakisaki
    Reactions Received
    694
    Trophies
    12
    Posts
    4,770
    • October 11, 2019 at 5:12 PM
    • #8

    Another thing, I have come across in the documents I have is the attached release notes relating to the addition of the CALL program function.

    If refers to the CALL program specifically and relates the argument towards a location only and not a real variable.

    Not being completely conversant with Duraro, I wonder whether this also has a bearing on this problem to.

    Be worthwhile checking this with Kawasaki and also the software version etc.

    Files

    duAro_Release Notes_007_20161103.pdf 350.2 kB – 13 Downloads

    View my channel at Industrial Robotics Consultancy Limited - YouTube

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
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • 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
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000
  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