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

Configure Group I/Os with .cm file

  • Andi_33
  • February 22, 2024 at 10:05 AM
  • Thread is Resolved
  • Andi_33
    Reactions Received
    1
    Trophies
    1
    Posts
    12
    • February 22, 2024 at 10:05 AM
    • #1

    Hello everyone,

    currently i am trying to create a .cm file to auto configure my Group I/Os. I think i have a pretty good idea on how to do it but i am missing 1 essential information. I would like to use the "KCL SET VAR" command to set the SYS vars of the Group I/Os RACK, SLOT, START PT and NUM PTS but i dont know where to find them. Has anyone an idea how these sys vars are called. Or mabye there is a better way to perform this configuration in a .cm file, like a specific command or something.

    Thanks for help

  • Go to Best Answer
  • hoitzing
    Reactions Received
    24
    Trophies
    1
    Posts
    128
    • February 22, 2024 at 1:40 PM
    • #2

    I'm not aware of any system variables that can be set for the port configuration, but afaik there are two options:

    1) Load a DIOCFGSV file containing the desired IO configuration, I would expect this can be done using a *.CM file

    2) Use a KAREL program with the built-in function SET_PORT_ASG that you can RUN with a KCL command

    Sidenote, when looking into the ASCII version of DIOCFGSV.VA, this is just a list of variables in 'program'/namespace/... [MDIO_MAIN]. This makes me wonder if it's possible to 'KCL SET VAR' on these variables to directly change port configurations from a *.CM file. If the other two options aren't quite what you need it might be worth checking out

  • EnergyAddict
    Reactions Received
    45
    Trophies
    4
    Posts
    133
    • March 6, 2024 at 2:05 PM
    • Best Answer
    • #3

    I picked this command out of another thread, and through trial and error I think I've got it somewhat figured out. "DIOASG # # # # # # #" is a CM file command.

    Below is my understanding not anything I've been able to find documentation on, however it matches similarly to the KAREL Command SET_PORT_ASG:

    EDITTING as I learn more.

    DIOASG Io_Type Range_Begin Range_Length Rack Slot Io_Type Start_Point

    • Io_Type: This determines whether you are assigning Digital Inputs, Digital outputs, UOPs, etc. It seems to follow the numbers from KLIOTYPS.KL (see THIS thread).
    • Range_Begin : Starting index of the IO that you are configuring
    • Range_Length: Number of sequential IO indices to configure
    • Rack: Physical location of the IO board/module
    • Slot: Space on the rack where the IO is connected
    • Io_Type: I don't really understand what this is supposed to be, but making it the same as the first number seems to work, Unless you want to "Clear" the IO assignment, then 0 seems to work.
    • Start_Point: Starting point within the Rack/Slot

    The Code below Configures some Digital IO:

    Code
    SPEP_OFF
    !Clears Current DIO Configuration
    DIOASG 1 1 512 0 1 0 1
    DIOASG 2 1 512 0 1 0 1
    
    !DI[1]-DI[128] Configured to PLC Rack
    DIOASG 1 1 128 89 1 1 1
    !DI[301]-DI[310] Configured to DCS CPCs
    DIOASG 1 301 10 36 6 1 1
    
    !DO[1]-DO[128] Configured to PLC Rack
    DIOASG 2 1 128 89 1 2 1
    !DO[301]-DO[310] Configured to DCS NSIs
    DIOASG 2 301 10 36 0 2 1
    
    SPEP_ON
    Display More

    Group inputs/outputs work with the same command but with a slight Adjustment:

    DIOASG Io_Type GI_GO_# Range_Length Rack Slot Io_Type Start_Point

    • Io_Type: Group Inputs are 18, Group Outputs are 19
    • GI_GO_#: Seems to be the GIO[#] that you are configuring
    • Range_Length: Number of IO indices to configure to the GI
    • Rack: Physical location of the IO board/module
    • Slot: Space on the rack where the IO is connected
    • Io_Type: I don't really understand what this is supposed to be, but making it the same as the first number seems to work, Unless you want to "Clear" the IO assignment, then 0 seems to work. UOP assignments seem to need to point at your digital IO.
    • Start_Point: It looks like this is the Starting point within the Rack/Slot

    The Code below Configures some Digital IO:

    Code
    SPEP_OFF
    !Clears Current GIO Config for lines 1 through 5
    DIOASG 18 1 0 0 1 0 1
    DIOASG 18 2 0 0 1 0 1
    DIOASG 18 3 0 0 1 0 1
    DIOASG 18 4 0 0 1 0 1
    DIOASG 18 5 0 0 1 0 1
    DIOASG 19 1 0 0 1 0 1
    DIOASG 19 2 0 0 1 0 1
    DIOASG 19 3 0 0 1 0 1
    DIOASG 19 4 0 0 1 0 1
    DIOASG 19 5 0 0 1 0 1
    
    !Configure GI[1] to inputs 1-8 from a PLC
    DIOASG 18 1 8 89 1 18 1
    !Configure GI[2] to inputs 9-16 from a PLC
    DIOASG 18 2 8 89 1 18 9
    
    !Configure GO[1] to inputs 1-8 from a PLC
    DIOASG 19 1 8 89 1 19 1
    !Configure GO[2] to inputs 9-16 from a PLC
    DIOASG 19 2 8 89 1 19 9
    
    SPEP_ON
    Display More


    Note the SPEP_OFF Command seems necessary at the top.

    I've tested all of this only in Roboguide, not on an actual robot yet, but it seems ok so far.

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

  • Group Output
  • Group Input
  • .cm
  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