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

0 Members and 1 Guest are viewing this topic.

Offline bidzej

  • Hero Member
  • *****
  • Thank You
  • -Given: 22
  • -Receive: 103
  • Posts: 645
Re: Syntax for command files (.CM)
« Reply #30 on: September 08, 2017, 12:45:34 PM »
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.

Offline rf103

  • Full Member
  • ***
  • Thank You
  • -Given: 4
  • -Receive: 29
  • Posts: 201
Re: Syntax for command files (.CM)
« Reply #31 on: September 09, 2017, 01:08:25 PM »
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.

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

Offline cliff.knasinski

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
Re: Syntax for command files (.CM)
« Reply #32 on: September 13, 2017, 07:54:55 PM »
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.

Offline bidzej

  • Hero Member
  • *****
  • Thank You
  • -Given: 22
  • -Receive: 103
  • Posts: 645
Re: Syntax for command files (.CM)
« Reply #33 on: October 05, 2017, 12:46:35 PM »
try finding the appropriate variables in the system and then editing them in the .CM file.

Offline Likoli

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
Re: Syntax for command files (.CM)
« Reply #34 on: August 03, 2018, 09:01:36 AM »
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 :)

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

Offline bidzej

  • Hero Member
  • *****
  • Thank You
  • -Given: 22
  • -Receive: 103
  • Posts: 645
Re: Syntax for command files (.CM)
« Reply #35 on: August 21, 2018, 10:29:01 AM »
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.

Offline bidzej

  • Hero Member
  • *****
  • Thank You
  • -Given: 22
  • -Receive: 103
  • Posts: 645
Re: Syntax for command files (.CM)
« Reply #36 on: September 11, 2018, 07:37:07 AM »
Added @path:\file.cm instruction to OTHER INSTRUCTIONS section.
It executes another .CM file from within the current .CM.

Offline Nation

  • Hero Member
  • *****
  • Thank You
  • -Given: 23
  • -Receive: 228
  • Posts: 809
  • Typical robot error message.
    • www.SynapticRobotics.com
Re: Syntax for command files (.CM)
« Reply #37 on: September 18, 2018, 07:32:22 PM »
Figured out another command:

DELAY #

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