April 25, 2019, 12:05:18 PM
Robotforum | Industrial Robots Community

 Syntax for command files (.CM)

Author Topic:  Syntax for command files (.CM)  (Read 28434 times)

USURP_RUR and 2 Guests are viewing this topic.

September 01, 2017, 05:11:59 PM
Reply #25
Online

bencor21


If the .tp file already exists in the Robot controller, say TEST.tp & the TPLOAD UT1:Test.tp command is given, there will be a message displayed "Program already exists" & you will have it hit F4 (OK), it's the only choice given.  At that point, the .cm file has not completed.  Just to be on the redundant side, on the line before the TPLOAD command, give it the DELTP TEST, & even if that file does not exist in the Robot, all will be fine.

Today at 12:05:18 PM
Reply #26

Advertisement

Guest

September 01, 2017, 05:16:39 PM
Reply #26
Offline

bidzej


great, thanks! This is actually what I was already missing a couple of times, never came to an idea to try that one.

September 06, 2017, 05:52:02 PM
Reply #27
Offline

robotomation


Another way to work around the overwriting problem is to use the Karel equivalent in the CM file:

KCL LOAD TP <FILENAME> <OVERWRITE - OPTIONAL>
KCL LOAD TP ALARM OVERWRITE

Instead of:
TPLOAD ALARM.TP (which will abort the CM if the file already exists)
- - - MH - - -

September 07, 2017, 12:28:00 PM
Reply #28
Offline

bidzej


actually that is how I solved the problem some time ago :)

September 08, 2017, 12:24:36 PM
Reply #29
Offline

mortoch


Will these work in the RJ2?
We have a sh*t load of these dinosaurs they bought from a defunct GM plant for dirt.
 :wallbash:

September 08, 2017, 12:45:34 PM
Reply #30
Offline

bidzej


I'm not sure, I've seen something similar on the R-J2's but these were called .cf files and were actually a set of KCL commands.

September 09, 2017, 01:08:25 PM
Reply #31
Offline

rf103



yes. According to the Karel manual (Chapter: File System): ".CF: KCL command files are ASCII files that contain a sequence of KCL commands for a command procedure."

Today at 12:05:18 PM
Reply #32

Advertisement

Guest

September 13, 2017, 07:54:55 PM
Reply #32
Offline

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.

October 05, 2017, 12:46:35 PM
Reply #33
Offline

bidzej


try finding the appropriate variables in the system and then editing them in the .CM file.

August 03, 2018, 09:01:36 AM
Reply #34
Offline

Likoli



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

August 21, 2018, 10:29:01 AM
Reply #35
Offline

bidzej


the code that you quoted seems to create both AoA and Image backup.
I've found some other instruction regarding backups, it's called ALL_BKUP, so it probably creates only an AoA.

September 11, 2018, 07:37:07 AM
Reply #36
Offline

bidzej


Added @path:\file.cm instruction to OTHER INSTRUCTIONS section.
It executes another .CM file from within the current .CM.

September 18, 2018, 07:32:22 PM
Reply #37
Offline

Nation


Figured out another command:

DELAY #

Delays execution of the .cm file by that many milliseconds. DELAY 1000 will wait 1 second.
Check out the position converter I wrote here!

February 28, 2019, 12:44:16 PM
Reply #38
Offline

SEAN-DUDE



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?

Today at 12:05:18 PM
Reply #39

Advertisement

Guest

February 28, 2019, 06:17:39 PM
Reply #39
Offline

bidzej


it's not possible to create variables in .cm files. What you  can do is create a small Karel program to do what you need, load, execute and delete it.

February 28, 2019, 06:59:28 PM
Reply #40
Offline

SEAN-DUDE


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

March 08, 2019, 09:56:46 AM
Reply #41
Offline

Varguit


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

March 25, 2019, 01:40:15 PM
Reply #42
Offline

derock


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:

March 25, 2019, 02:04:05 PM
Reply #43
Offline

bidzej



not possible afaik.

a .CM load file? can you elaborate?

March 25, 2019, 03:13:33 PM
Reply #44
Offline

derock


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

March 25, 2019, 03:20:29 PM
Reply #45
Offline

derock


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

not possible afaik.

a .CM load file? can you elaborate?

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

Today at 12:05:18 PM
Reply #46

Advertisement

Guest

March 25, 2019, 03:28:53 PM
Reply #46
Offline

bidzej


Try

SETVAR $HSCDMNGRP[1].$THRESHOLD 140
SETVAR $HSCDMNGRP[1].$COLL_MODE 1

April 22, 2019, 02:29:49 PM
Reply #47
Offline

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.

April 22, 2019, 02:53:57 PM
Reply #48
Offline

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.


Share via facebook Share via linkedin Share via pinterest Share via reddit Share via twitter

xx
S controller command syntax

Started by tdevine77 on Kawasaki Robot Support Forum

4 Replies
2809 Views
Last post September 09, 2015, 10:15:33 AM
by kwakisaki
xx
Syntax Help using LPOS

Started by ovoyevoda on Fanuc Robot Forum

14 Replies
12951 Views
Last post January 23, 2015, 05:58:55 PM
by ovoyevoda
xx
Syntax problem

Started by zicki_88 on KUKA Robot Forum

3 Replies
388 Views
Last post July 11, 2018, 10:15:21 AM
by Fubini
xx
Syntax of INTERRUPT

Started by rmacumber on KUKA Robot Forum

5 Replies
394 Views
Last post October 22, 2018, 04:04:30 PM
by panic mode