Addition of custom DMC commands

Getting Started

The purpose of this exercise is to modify the DMC XML used by GDK to properly parse DMC commands added to the controller firmware. Galil routinely extends the standard firmware command set to accomodate special application requirements. This chapter adds the Yaskawa Feedback NRE command set to GDK's XML. This chapter can be read strictly as an example. The following are the required components to perform this exercise.

  1. GDK supported Galil controller with Yaskawa feedback NRE (firmware and minor hardware modifications).
  2. A computer running the latest version of GDK software.
  3. A text editor such as gedit on Linux, or Notepad++ on Windows.

GDK's XML

Extending GDK's syntax parsing capabilities involves editing GDK's DMC XML. The following two chapters are helpful before continuing.

  1. GDK's XML Content
  2. DMC Language XML Details

Determine the Needed Settings

The Yasakawa special firmware adds three commands, each with operands.

AZ - Yaskawa Query Absolute Position

The AZ command is an implicit command, receiving all arguments in a comma-separated list.

The _AZ operand has no suffix.

QY - Yaskawa Last String Sent

The QY command takes no arguments, i.e. it is a Two Letter command.

The _QY operand has no suffix.

TY - Yaskawa Initial Position

The TY command takes a multi-axis mask as argument.

The _TY operand has an axis suffix, e.g. _TYA.

Make the Changes

Open dmc.xml in a text editor.

  1. In GDK's main options menu, open the settings directory by clicking Settings... and then click the Files button.
  2. Open the xml subdirectory to view the files.
  3. Open dmc.xml in a text editor.

Paste the following XML into dmc.xml as the last section before the </dmc> tag.

  <!-- ******************************************************************** -->
  <!-- **** Yaskawa ******************************************************* -->
  <!-- ******************************************************************** -->
  <subset>
    <s><m>AZ</m><d>Yaskawa Query Absolute Position</d><t>4</t></s>
    <s><m>_AZ</m><d>Yaskawa Query Absolute Position Operand</d><t>24</t></s>
    <s><m>QY</m><d>Yaskawa Last String Sent</d><t>2</t></s>
    <s><m>_QY</m><d>Yaskawa Last String Sent Operand</d><t>24</t></s>
    <s><m>TY</m><d>Yaskawa Initial Position</d><t>6</t></s>
    <s><m>_TY</m><d>Yaskawa Initial Position Operand</d><t>24</t><p>m</p></s>
  </subset>
    

Save and close the file. Open a new Editor tool. The Yaskawa commands should now properly parse.

Yaskawa commands properly recognized.

Conclusion

For Galil's standard command set, GDK's DMC parsing and formatting is taken care of behind-the-scenes, without user interaction. By editing GDK's XML content, custom DMC commands provided by a firmware NRE can easily be added.