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

array variable with program name

  • Robo_Dk
  • November 14, 2023 at 12:53 PM
  • Thread is Unresolved
  • Robo_Dk
    Trophies
    2
    Posts
    56
    • November 14, 2023 at 12:53 PM
    • #1

    Hello Everyone!!!!

    hope all members are doing well!!!

    I want to use local variables (.variable) with the program name, so anyone can help me or explain me how to use local variable with program.

    I am beginner for the AS language, so if anyone help me its helpful for me.

    test program for example,

    .PROGRAM Test(.variable)

    ;----------------------------------------

    .a = offseto/10

    .b = offseta/10

    .c = offsett/10

    CASE .variable OF

    VALUE 0:

    POINT base = base0;

    VALUE 1:

    POINT base = base1;

    VALUE 2:

    POINT base = base2;

    END

    In above sample program how .variable value coming?, if anyone knows please explain how the value coming ???

  • Alexandru
    Reactions Received
    49
    Trophies
    6
    Posts
    407
    • November 14, 2023 at 1:05 PM
    • #2

    .PROGRAM main

    instructions....

    CALL Test (r.variable)

    .....

    instructions

    If you change the variable value and call test program, the parameter has that value

  • Robo_Dk
    Trophies
    2
    Posts
    56
    • November 14, 2023 at 3:16 PM
    • #3
    Quote from Alexandru

    .PROGRAM main

    instructions....

    CALL Test (r.variable)

    .....

    instructions

    If you change the variable value and call test program, the parameter has that value

    Display More

    Thank you so much for your reply.

    I understood about Call instructions with array variable but I want to understand about this local .variable , how I get this value and how to use this value with CASE command?

  • kwakisaki
    Reactions Received
    694
    Trophies
    11
    Posts
    4,770
    • November 14, 2023 at 7:21 PM
    • #4

    Check in AS manual, there are some very simple and basic examples that show the process.

    Do a search for Subroutine with parameters and look at example 1.

    Also do a search for local variable in AS manual, again it is explained.

    Local is local to program, so it needs to be defined locally in the program to be used....hence the term 'local'.

    It is differentiated by a 'dot' in front of the variable name and is local and not globally accessible.

    CALL monkey(1);

    .PROGRAM monkey(.variable):

    ;=========================

    ; .variable will be defined by CALL parameter

    ; CASE will then pick CALL chimp to execute

    ;=========================

    CASE .variable OF

    VALUE 0:

    CALL ape

    VALUE 1:

    CALL chimp

    ANY :

    HALT

    END

    .END

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

Similar Threads

  • Kawasaki problem with DELETE Multi Dimensional Array

    • elvicash
    • October 25, 2023 at 6:32 PM
    • Kawasaki Robot Forum
  • Staubli CS8: FTP Directory for VAL3 Programs

    • painful_staubli
    • June 21, 2023 at 7:33 PM
    • Stäubli & Bosch Robot Forum
  • Automating program upload to KRC4 via Ethernet

    • nicok
    • February 23, 2023 at 5:46 PM
    • KUKA Robot Forum
  • Traversing a Point List and/or Auto-Generating and Using Point Variable Names

    • EngineerTex
    • November 30, 2022 at 12:11 AM
    • KUKA Robot Forum
  • KRL Styleguide

    • Hes
    • October 29, 2022 at 1:10 PM
    • KUKA Robot Forum
  • Reverse-engineering AS programs

    • SkyeFire
    • May 31, 2022 at 9:35 PM
    • Kawasaki Robot Forum
  • Algorithm for Recording Unspecified Number of Points KRC2

    • EngineerTex
    • April 7, 2021 at 12:36 AM
    • KUKA Robot Forum
  • Base transformation

    • benjamin21
    • August 11, 2020 at 1:23 PM
    • KUKA Robot Forum
  • Using interrupt to store values

    • chis
    • February 25, 2020 at 11:10 PM
    • KUKA Robot Forum
  • KRL to KAREL match cases

    • Latoff
    • February 13, 2020 at 9:52 PM
    • Fanuc Robot Forum

Tags

  • kawasaki
  • kawasaki robot control class
  • Kawasaki robot
  • kawasaki controller
  • Kawasaki Robot Controller
  • Kawasaki RS20
  • Kawasaki E Controller

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