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
  5. Manuals, Software and Tools for Fanuc Robots (you should look here first before posting)
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

Syntax for command files (.CM)

  • Nation
  • November 28, 2016 at 5:13 PM
  • Thread is Resolved
  • cliff.knasinski
    Trophies
    3
    Posts
    1
    • September 13, 2017 at 9:54 PM
    • #21

    Do you have example code of how User Frames can be created using a .cm program? I am able to create User Models and CPC models easily, but having trouble finding the variables needed to create frames in the system for CPC user frame definitions.

  • Likoli
    Trophies
    3
    Posts
    1
    • August 3, 2018 at 11:01 AM
    • #22
    Quote from lexx905


    Ciao


    MKDIR UD1:test
    IGALBKUP UD1:\test
    EXIT


    This code will automatically create a TEST folder on the USB and put AOA and IMAGE on it :smiling_face:

    Does anyone know how to create an image backup on the USB instead of an AOA?

  • Nation
    Typical Robot Error
    Reactions Received
    529
    Trophies
    9
    Posts
    1,908
    • September 18, 2018 at 9:32 PM
    • #23

    Figured out another command:

    DELAY #

    Delays execution of the .cm file by that many milliseconds. DELAY 1000 will wait 1 second.

    Check out the Fanuc position converter I wrote here! Now open source!

    Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

  • SEAN-DUDE
    Reactions Received
    1
    Trophies
    3
    Posts
    65
    • February 28, 2019 at 1:44 PM
    • #24
    Quote from cliff.knasinski


    Do you have example code of how User Frames can be created using a .cm program? I am able to create User Models and CPC models easily, but having trouble finding the variables needed to create frames in the system for CPC user frame definitions.

    Just wondering if anybody had some luck with this. There is the Variable $MNUFRAME and MNUTOOL, but there is no way to access the individual XYZWPR elements. I seen in some Karel and tp programs you can assign data to a pr and reference the pr to transfer the values, but a XYZWPR variable needs to be declared.

    Is it possible to create variables within the CM file to transfer the data?

  • SEAN-DUDE
    Reactions Received
    1
    Trophies
    3
    Posts
    65
    • February 28, 2019 at 7:59 PM
    • #25

    Ok thanks. I did find out how to write to the MNUFRAME and MNUTOOL:

    Each element on the is equal to the XYZWPR respectively

    KCL SET VARIABLE $MNUTOOL[1, 1 ]= 1 , 2 , 3 , 4 , 5 , 6

    I am having trouble with the payload variables. they are all write protected even controlled start. Any ideas on how to get around this. I have something like this:

    KCL SET VARIABLE $PLST_GRP1[1].$COMMENT = 'Hello World'
    KCL SET VARIABLE $PLST_GRP1[1].$PAYLOAD = 12.706
    KCL SET VARIABLE $PLST_GRP1[1].$PAYLOAD_X = 0.0410
    KCL SET VARIABLE $PLST_GRP1[1].$PAYLOAD_Y = -1.3870
    KCL SET VARIABLE $PLST_GRP1[1].$PAYLOAD_Z = 3.2050
    KCL SET VARIABLE $PLST_GRP1[1].$PAYLOAD_IX = 0.9010
    KCL SET VARIABLE $PLST_GRP1[1].$PAYLOAD_IY = 1.3140
    KCL SET VARIABLE $PLST_GRP1[1].$PAYLOAD_IZ = 1.3140

  • Varguit
    Trophies
    3
    Posts
    1
    • March 8, 2019 at 10:56 AM
    • #26

    Hi,
    anyone knows how to prompt user before continuing with cm execution?
    Something like press ok to continue, or press 1 to do this and 2 to do that...

    Thanks in advance

  • derock
    Reactions Received
    1
    Trophies
    3
    Posts
    16
    • March 25, 2019 at 2:40 PM
    • #27

    I am creating a CM load file, and Im trying to set the collision detection in there but I get variable write protected. If i create a TP program I can set collision guard, but isnt allowing me to in CM load, was using KCL variable.

    Is there something I am doing wrong or can I not do it unless in a TP load?? any advice would be great

    Thanks :help:

  • derock
    Reactions Received
    1
    Trophies
    3
    Posts
    16
    • March 25, 2019 at 4:13 PM
    • #28

    When I run a TP program with this variable it works ;
    150: !Set Coll Guard to 140;
    151: $HSCDMNGRP[1].$THRESHOLD=140;
    ****************************************************
    Heres the CM file ive created and am trying to set collision guard within it..

    !
    PRINT "Set Coll Guard to 140"
    KCL SET VAR $HSCDMNGRP[1].$THRESHOLD=140
    !
    PRINT "Enable Coll Guard"
    KCL SET VAR $HSCDMNGRP[1].$COLL_MODE=True
    !

    And it gives me the write protected error

    Thank you,
    Derock

  • derock
    Reactions Received
    1
    Trophies
    3
    Posts
    16
    • March 25, 2019 at 4:20 PM
    • #29

    :smiling_face:

  • Robo_Eng_13
    Reactions Received
    26
    Trophies
    4
    Posts
    432
    • April 22, 2019 at 4:29 PM
    • #30

    Has anyone found a way to set up the password protection system using .cm files? We are looking at 30-50 users on 90 robots, and i have had nothing but disaster trying to load SYSPASS files from robot to robot. Being able to go through and set up each robot with a cm file would be incredible.

  • Robo_Eng_13
    Reactions Received
    26
    Trophies
    4
    Posts
    432
    • April 22, 2019 at 4:53 PM
    • #31

    Another useful CM file i would be interested in would be one that would read through the entire System Variable tree and print the name of the variable and the value. I would then be able to make small controlled changes and compare the print out before and after to narrow down exactly which system variable controls what parameters.

  • montanaro87
    Reactions Received
    4
    Trophies
    3
    Posts
    13
    • May 15, 2019 at 1:25 PM
    • #32

    In attached a simple config that show how fanuc charge each option inside the controller.

    They create a simple orderfil.dat including the variuous option and then by using a simple usb or cf reboot the controller and select the option "software install" in boot mode.

    The CM file inside the device automatrically add each option inside the desidered path and load each components of controller.

    I found this by debugging a Fanuc mistake...

    Example of option charge

    Code
    ! Generated by XX (XXXXXXX)
    PRINT "menu.com for VXXXXXX(XXXXXXX)"
    !
    ! h510.fd - Kernel + Basic S/W
    !
    IF ORDER H510 H541 H590 H573 H596 H558 H549 H574 H552 H551 H548
    ASLOAD h510
    ENDIF  ! h510.fd
    !
    ! h510.fd - Kernel + Basic S/W
    !
    IF ORDER H510 H541 H590 H573 H596 H558 H549 H574 H552 H551 H548
    ASLOAD h560
    ENDIF  ! h510.fd
    !
    ! h541.fd - ArcTool
    !
    IF ORDER H541
    ASLOAD alarms
    ENDIF  ! h541.fd
    !
    ! h510.fd - Kernel + Basic S/W
    !
    IF ORDER H510 H541 H590 H573 H596 H558 H549 H574 H552 H551 H548
    IF ORDER H560
    ELSE
    ASLOAD rj2
    ENDIF
    ASLOAD crmn
    ASLOAD password
    ENDIF  ! h510.fd
    !
    ! spotplug.fd - Spot Plug-in
    !
    IF ORDER SPPG H590 H573
    ASLOAD swipen
    ENDIF  ! spotplug.fd
    !
    ! sftpanel.fd - Common softpanel
    !
    IF ORDER CMSP H541 H590 H573 R645 H549 H574
    ASLOAD csfpanel
    ELSE
    IF ORDER H548 H551 H552 ! Primary
    IF ORDER R590 R813 R593 J949 J989 ! Tertiary
    ELSE
    ASLOAD csfpanel
    ENDIF  ! Tertiary
    ENDIF  ! Primary
    ENDIF  ! sftpanel.fd
    !
    ! iwc.fd - Integral Weld Control
    !
    IF ORDER R555
    ASLOAD swdep
    ASLOAD iwmd
    ENDIF  ! iwc.fd
    !
    ! swtolutl.fd - Program ToolBox
    !
    IF ORDER R598 H590 H573
    IF ORDER H573
    ASLOAD splus
    ASLOAD alarms
    ENDIF  ! h573.fd
    !
    ! paint.fd - PaintTool (N. A.)
    !
    IF ORDER H596
    ASLOAD paint
    ASLOAD alarms
    ENDIF  ! paint.fd
    !
    ! h558.fd - LR PaintTool (N. A.)
    !
    IF ORDER H558
    ASLOAD paint
    ASLOAD alarms
    ENDIF  ! h558.fd
    !
    ! j944.fd - iRPickTool Basic
    !
    IF ORDER J944 J945
    ASLOAD j944
    ENDIF  ! j944.fd
     and so on.....
    Display More

    Best regards

    :justice:

  • montanaro87
    Reactions Received
    4
    Trophies
    3
    Posts
    13
    • May 27, 2019 at 6:02 PM
    • #33
    Quote from Robo_Eng_13


    Has anyone found a way to set up the password protection system using .cm files? We are looking at 30-50 users on 90 robots, and i have had nothing but disaster trying to load SYSPASS files from robot to robot. Being able to go through and set up each robot with a cm file would be incredible.

    Hello, try this... else as you already used replace the syspass [it work well only on the same fw relase...]

    The following program cracks the rbt passwd, remember that in this case you will lost the older psw.

    Let us know.

    Regards

    M

    Code
    program jumPass	
    -- 
    %nolockgroup
    %environment regope
    %comment = 'PASS REM'
    --
    var
    
    
     entry, status, i :integer
     montanaro87: string[25]  
    --
    begin
     
     montanaro87 = ''
     set_var(entry,'*system*','$passsuper.$password',montanaro87,status)
    
    
     set_var(entry,'*system*','$passsuper.$name',montanaro87,status)
     set_var(entry,'*system*','$passsuper.$level',0,status)
     set_var(entry,'*system*','$passsuper.$time_out',0,status)
    
    
     set_var(entry,'*system*','$passname[1].$name',montanaro87,status)
     set_var(entry,'*system*','$passname[1].$level',0,status)
     set_var(entry,'*system*','$passname[1].$time_out',0,status)
    
    
     set_var(entry,'*system*','$passname[2].$name',montanaro87,status)
     set_var(entry,'*system*','$passname[2].$level',0,status)
     set_var(entry,'*system*','$passname[2].$time_out',0,status)
    
     set_var(entry,'*system*','$passname[3].$name',montanaro87,status)
     set_var(entry,'*system*','$passname[3].$level',0,status)
     set_var(entry,'*system*','$passname[3].$time_out',0,status)
    
    
     set_var(entry,'*system*','$passname[4].$name',montanaro87,status)
     set_var(entry,'*system*','$passname[4].$level',0,status)
     set_var(entry,'*system*','$passname[4].$time_out',0,status)
    
    
     set_var(entry,'*system*','$passname[5].$name',montanaro87,status)
     set_var(entry,'*system*','$passname[5].$level',0,status)
     set_var(entry,'*system*','$passname[5].$time_out',0,status)
    
    
     set_var(entry,'*system*','$passname[6].$name',montanaro87,status)
     set_var(entry,'*system*','$passname[6].$level',0,status)
     set_var(entry,'*system*','$passname[6].$time_out',0,status)
    
    
     set_var(entry,'*system*','$passname[7].$name',montanaro87,status)
     set_var(entry,'*system*','$passname[7].$level',0,status)
     set_var(entry,'*system*','$passname[7].$time_out',0,status)
    
    
     set_var(entry,'*system*','$passname[8].$name',montanaro87,status)
     set_var(entry,'*system*','$passname[8].$level',0,status)
     set_var(entry,'*system*','$passname[8].$time_out',0,status)
    
    
     set_var(entry,'*system*','$passname[9].$name',montanaro87,status)
     set_var(entry,'*system*','$passname[9].$level',0,status)
     set_var(entry,'*system*','$passname[9].$time_out',0,status)
    
    
     set_var(entry,'*system*','$passname[10].$name',montanaro87,status)
     set_var(entry,'*system*','$passname[10].$level',0,status)
     set_var(entry,'*system*','$passname[10].$time_out',0,status)
    
    
     set_var(entry,'*system*','$passname[1].$name',montanaro87,status)
     set_var(entry,'*system*','$passname[1].$level',0,status)
     set_var(entry,'*system*','$passname[1].$time_out',0,status)
    
    
    end jumPass
    Display More

    :dance2:

  • Werner Hampel August 17, 2019 at 10:45 AM

    Moved the thread from forum Fanuc Robot Forum to forum Downloads, Manuals, Tools and Freeware for Fanuc Robots (No copyright manuals permitted).
  • LRMate
    Trophies
    3
    Posts
    3
    • September 5, 2019 at 10:07 AM
    • #34

    Is there a way to generate a Folder named like a System variable?

    I tryed with the KCL code but it dose not work. In Karel i got it work with this code:

    KCL('MKDIR UD1:\E'+$APPLICATION[3]+'',STATUS)

  • Tisonus
    Reactions Received
    1
    Trophies
    3
    Posts
    12
    • January 14, 2020 at 3:54 PM
    • #35
    Quote from Robo_Eng_13

    Another useful CM file i would be interested in would be one that would read through the entire System Variable tree and print the name of the variable and the value. I would then be able to make small controlled changes and compare the print out before and after to narrow down exactly which system variable controls what parameters.

    You can do that with Robogoide.

    In the Workcell tree, you can go to Variables, SystemVariables, right click, save, save as *.VA
    Then you get the ASCII Code of the System Variables.

    If you do that before and after your changes, you can compare the two files with a texteditor / compare program like Meld

  • Tobas
    Trophies
    3
    Posts
    2
    • February 6, 2020 at 11:24 AM
    • #36

    Very usefull! Thank you very much for sharing this! :winking_face:

  • Jhubb
    Reactions Received
    1
    Trophies
    3
    Posts
    6
    • February 8, 2020 at 6:31 PM
    • #37

    Does anyone here know how to use a .cm file to configure the I/O on a FANUC robot? (i.e. Rack, Slot, Starting point) I have placed an example of the file that I am attempting to use, but it will only map the flags I/O as I have it written. (Rack 33 and 34).

    !MAPS DIGITAL INPUTS

    DIOASG 1 1 16 34 1 0 1

    DIOASG 1 17 16 34 1 0 17

    !MAPS DIGITAL OUTPUTS

    DIOASG 2 1 16 34 1 0 1

    DIOASG 2 17 16 34 1 0 17

    Also, there are 7 digits in this assignment. what does the 6th digit represent? The digit that is currently a "0" in the two above examples.

    The above code will work on an actual robot, and Roboguide. But if I try and use it to map another types of I/O, it does nothing.

    Thanks for you knowledge and time.

  • ZBJxC
    Trophies
    3
    Posts
    8
    • May 12, 2020 at 4:01 PM
    • #38

    I'm writing a .CM file and cannot figure out how to set the Program select mode through the variables.

    Under $SHELL_CFG. $SEL_TYPE I can change the mode from PNS to RSR and STYLE, but NOT "OTHER".

    Anyone able to help me out?

  • HawkME
    Reactions Received
    568
    Trophies
    10
    Posts
    3,268
    • May 12, 2020 at 4:51 PM
    • #39

    $SHELL_CFG.$SEL_TYPE=9

  • ZBJxC
    Trophies
    3
    Posts
    8
    • May 12, 2020 at 5:22 PM
    • #40

    Thanks HawkME!!!

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