March 23, 2019, 09:03:57 AM
Robotforum | Industrial Robots Community

 Syntax for command files (.CM)

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

0 Members and 1 Guest are viewing this topic.

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

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 09:03:57 AM
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 09:03:57 AM
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 09:03:57 AM
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


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
2758 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
12673 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
360 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
358 Views
Last post October 22, 2018, 04:04:30 PM
by panic mode