ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

CNC SINUMERIK 840​D language support

by deathaxe ST3

CNC SINUMERIK 840D language support for SublimeText

Details

Installs

  • Total 7K
  • Win 4K
  • OS X 2K
  • Linux 1K
Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11
Windows 7 1 5 2 9 9 5 9 3 6 1 5 11 7 8 4 3 0 6 8 5 2 14 5 4 4 6 12 5 9 5 8 6 11 8 6 10 3 2 11 3 8 4 9 2 4
OS X 2 1 2 2 1 3 1 2 5 2 2 1 4 2 1 3 0 1 5 2 3 3 2 0 1 1 5 3 1 5 3 4 4 5 7 3 2 0 4 3 5 2 6 4 2 2
Linux 1 0 4 1 5 2 0 1 4 0 3 1 7 7 4 3 1 4 2 1 0 4 5 0 2 1 1 3 2 2 0 2 2 2 2 0 5 3 4 3 1 0 0 0 1 1

Readme

Source
raw.​githubusercontent.​com

CNC Sinumerik 840D language support

Release The MIT License Package Control

This package provides syntax highlighting support for the SINUMERIK 840D Computerized Numerical Control to the SublimeText 3 Editor.

G-Code example

gcode

🚀 Features

NC cycles

  • file extensions: MPF, SPF, DEF, TEA
  • syntax highlighting
    • ISO G-Code
    • SINUMERIK highlevel commands
    • known NC cycles, functions and commands
    • known NC variables and machine data (NC-Version 04.07.02.01)
    • Highlight illegal usage of control keywords.
  • indention rules
  • code-snippets for most common control functions
  • commands to Minify, Beautify, Add/Update block numbers, Save Protected Program File (CPF)
  • Goto Definition
    • Show labels in local symbol list
    • Show PROC names in indexed symbol list
  • Context sensitive auto completions for:
    • variable attributes in definitions (access rights, unit)
    • ISO parameters (e.g.: SPOS= , FP=, …)
    • ISO commands (e.g.: TRANS, ROT, …)
    • functions (e.g.: COUPDEF(…))
  • tooltip support
    • *.mdat *.svar files from CreateMyConfig

EasyScreen / RunMyScreens

  • file extensions: COM
  • syntax highlighting
  • indention rules
  • code-snippets for
    • classes: ARRAY, BLOCK, DIALOG, MENU
    • methods: LOAD, UNLOAD, PRESS, …
    • functions: RNP, WNP, CP, DP, EP, …
  • Goto Definition for classes.

NC archives (text)

  • file extensions: ARC
  • embedds NC cycles and RunMyScreens syntax highlighting

Step7 PLC sources

  • AWL syntax highlighting (German mnemonics)
  • ASC symbol table syntax highlighting

💾 Installation

Package Control

For all Sublime Text 3 users install via Package Control is recommended.

  1. Install Package Control if you haven't yet.
  2. Use ctrl+shift+P then Package Control: Install Package
  3. Look for CNC SINUMERIK 840D language support and install it.

Manual Installation

Clone the repository in your Sublime Text Packages directory, located somewhere in user's “Home” directory:

git clone git://github.com/deathaxe/sublime-s840d.git "CNC Sinumerik 840D language support"

You can also download the latest source from GitHub https://github.com/deathaxe/sublime-s840d and extract the whole content into the “Packages/CNC Sinumerik 840D language support” directory.

⚙ Settings

All settings are organized per view and can therefore be placed to any valid Sublime Text settings file or may be applied temporarily for single views.

Basic Setup

If s840d_arc.sublime-settings, s840d_gcode.sublime-settings or s840d_hmi.sublime-settings don't exist in the user folder they will be automatically created to ensure the following essential syntax specific settings:

"ensure_newline_at_eof_on_save": true,
  "translate_tabs_to_spaces": true,
  "use_tab_stops": false

They are all required to ensure NC will read the resulting file correctly. You can override these settings by creating your own syntax specific setting Preferences -> Settings - Syntax Specific

G-Code block start

"s840d_gcode_block_start": 0

If not explicitly called with "start": 0815 the s840d_renumber command will use this setting as first block number. With default value 0 the first block number is automatically selected to so all block numbers have same length.

G-Code block increment

"s840d_gcode_block_increment": 10

If not explicitly called with "increment": 0815 the s840d_renumber command will use this setting to increment the block numbers.

© License

The code is available at GitHub under MIT licence.