diff --git a/.gitignore b/.gitignore index 733481e..79184c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules out -dist \ No newline at end of file +dist +*.vsix diff --git a/.vscodeignore b/.vscodeignore index 751d592..d8a3b86 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -2,4 +2,7 @@ .vscode-test/** .gitignore vsc-extension-quickstart.md - +node_modules +tsconfig.json +test +vite.config.js \ No newline at end of file diff --git a/package.json b/package.json index 3007d0e..81aea8e 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "cdl", + "name": "vscode-cdl-support", "displayName": "vscode-cdl-support", "description": "", "version": "0.0.1", diff --git a/test/file.cdl b/test/file.cdl new file mode 100644 index 0000000..9660e9a --- /dev/null +++ b/test/file.cdl @@ -0,0 +1,497 @@ +MACHINE DEFAULT +EVENT dummy_event_start +{ + UI_LABEL "------------SAMSON UDES------------" + PARAM new_item + { + TYPE g + DEFVAL "start_open" + UI_LABEL "New Item" + } + PARAM new_item_end + { + TYPE g + DEFVAL "end" + } +} +EVENT samson_coolant +{ + POST_EVENT "coolant_on" + UI_LABEL "SAMSON: Coolant On" + CATEGORY MILL LATHE DRILL + PARAM command_status + { + TYPE o + DEFVAL "Active" + OPTIONS "Active", "Inactive" + UI_LABEL "Status" + } + PARAM coolant_mode + { + TYPE o + DEFVAL "KSM Spindel Aussen (M8)" + OPTIONS "KSM Spindel Aussen (M8)", "KSM Spindel Innen (M7x)", "KSM Spindel aussen + innen (M8 + M7x)", "LUFT Spindel Innen (M92)" + UI_LABEL "Type" + } + PARAM samson_high_pressure_group + { + TYPE g + DEFVAL "start_closed" + UI_LABEL "Druckstufen" + } + PARAM samson_pressure_option + { + TYPE o + DEFVAL "7" + OPTIONS "7","71","72","73","74","75","76" + UI_LABEL "Druckstufen" + } + PARAM samson_high_pressure_group_end + { + TYPE g + DEFVAL "end" + } +} +EVENT samson_motion_setting +{ + UI_LABEL "SAMSON: Bahnsteuerbetrieb" + PARAM samson_motion_setting + { + TYPE o + DEFVAL "G60" + OPTIONS "G60","G64","G645" + UI_LABEL "Bahnsteuerbetrieb" + } +} +EVENT samson_retract +{ + UI_LABEL "SAMSON: Freifahren" + PARAM positionen + { + TYPE g + DEFVAL "start_open" + UI_LABEL "Positionen" + } + PARAM csys_option + { + TYPE o + DEFVAL "WKS" + OPTIONS "MKS", "WKS" + UI_LABEL "Koordinatensystem" + } + PARAM safe_pos_X + { + TYPE d + DEFVAL "0.000000" + UI_LABEL "Pos. X" + } + PARAM safe_pos_Y + { + TYPE d + DEFVAL "0.000000" + UI_LABEL "Pos. Y" + } + PARAM safe_pos_Z + { + TYPE d + DEFVAL "0.000000" + UI_LABEL "Pos. Z" + } + PARAM Positionen_end + { + TYPE g + DEFVAL "end" + } + PARAM retract_order + { + TYPE o + DEFVAL "Z" + OPTIONS "Z", "None" + UI_LABEL "Freifahr Optionen" + } +} +EVENT subprogram_output +{ + UI_LABEL "SAMSON: Unterprogramm Ausgabe" + PARAM subprogram_output + { + TYPE o + DEFVAL "1-Ja" + OPTIONS "1-Ja", "2-Nein" + UI_LABEL "Unterprogramm Ausgabe" + } +} +EVENT group_output +{ + UI_LABEL "SAMSON: Group Ausgabe" + PARAM output_group + { + TYPE o + DEFVAL "1-ON" + OPTIONS "0-OFF", "1-ON" + UI_LABEL "Ausgabe Group" + } +} +EVENT vh_wp_output +{ + UI_LABEL "SAMSON: _VH_WP Ausgabe" + PARAM output_vh_wp + { + TYPE o + DEFVAL "1-ON" + OPTIONS "0-OFF", "1-ON" + UI_LABEL "Ausgabe _VH_WP" + } +} +EVENT cycle_70 +{ + UI_LABEL "SAMSON: CYCLE70" + CATEGORY MILL DRILL + PARAM cycle_thread_inside_outside + { + TYPE o + DEFVAL "0-Inside Thread" + OPTIONS "0-Inside Thread", "1-Outside Thread" + UI_LABEL "Inside/Outside Thread" + } + PARAM cycle_thread_depth + { + TYPE d + DEFVAL "1.200000" + UI_LABEL "Thread Depth" + } + PARAM cycle_finishing_stock + { + TYPE d + DEFVAL "0.000000" + UI_LABEL "Finishing stock" + } + PARAM cycle_depth_of_cut + { + TYPE d + DEFVAL "10.000000" + UI_LABEL "Depth of cut" + } + PARAM cycle_direction_type + { + TYPE o + DEFVAL "22-Bottom/up finishing right-hand" + OPTIONS "12-Top/down finishing right-hand", "22-Bottom/up finishing right-hand", "11-Top/down roughing right-hand", "21-Bottom/up roughing right-hand", "122-Top/down finishing left-hand", "121-Bottom/up finishing left-hand", "111-Top/down roughing left-hand", "112-Bottom/up roughing left-hand" + UI_LABEL "Direction Type" + } + PARAM legend_group + { + TYPE g + DEFVAL "start_closed" + UI_LABEL "Legend" + } + PARAM ctrl_s840d_CYCLE_70 + { + TYPE l + DEFVAL "$POST_LIB_CURRENT_BMP_DIR/sinumerik_840d_CYCLE70.bmp" + } + PARAM legend_group_end + { + TYPE g + DEFVAL "end" + } +} +EVENT samson_header +{ + UI_LABEL "SAMSON: Header" + PARAM header_part_number + { + TYPE s + DEFVAL " " + UI_LABEL "Materialnummer:" + } + PARAM header_description + { + TYPE s + DEFVAL " " + UI_LABEL "Bezeichung:" + } + PARAM header_drawing + { + TYPE s + DEFVAL " " + UI_LABEL "Zeichnung:" + } + PARAM header_drawing_idx + { + TYPE i + DEFVAL "1" + UI_LABEL "Zeichnungsrevision:" + } + PARAM header_material + { + TYPE s + DEFVAL " " + UI_LABEL "Werkstoff:" + } + PARAM header_setup + { + TYPE i + DEFVAL "1" + UI_LABEL "Aufspannung:" + } + PARAM header_num_of_parts + { + TYPE i + DEFVAL "1" + UI_LABEL "Teile pro Palette:" + } + PARAM header_av + { + TYPE s + DEFVAL " " + UI_LABEL "AV:" + } + PARAM header_av_id + { + TYPE i + DEFVAL "1" + UI_LABEL "Programmiererkennung:" + } + PARAM header_run_on_machine + { + TYPE s + DEFVAL " " + UI_LABEL "Gelaufen:" + } + PARAM s_tec_group + { + TYPE g + DEFVAL "start_open" + UI_LABEL "_S_TEC" + } + PARAM s_tec_option + { + TYPE o + DEFVAL "1-_S_TEC" + OPTIONS "1-_S_TEC", "2-NX" + UI_LABEL "S_TEC Optionen" + } + PARAM s_tec_group_end + { + TYPE g + DEFVAL "end" + } +} +EVENT lib_event_cycle_60 +{ + + # + #Engraving - CYCLE60 + #CYCLE60(STRING[200] _TEXT, REAL _RTP, REAL _RFP, REAL _SDIS, REAL _DP, REAL _DPR, REAL _PA, REAL _PO, REAL _STA, REAL _CP1, REAL _CP2,REAL _WID, REAL _DF, REAL _FFD, REAL _FFP1, INT _VARI, INT _CODEP,INT _UMODE, INT _GMODE, INT _DMODE, INT _AMODE) + # + #Gravurzyklus - CYCLE60 + #CYCLE60(STRING[200] _TEXT, REAL _RTP, REAL _RFP, REAL _SDIS, REAL _DP, REAL _DPR, REAL _PA, REAL _PO, REAL _STA, REAL _CP1, REAL _CP2,REAL _WID, REAL _DF, REAL _FFD, REAL _FFP1, INT _VARI, INT _CODEP,INT _UMODE, INT _GMODE, INT _DMODE, INT _AMODE) + + UI_LABEL "SAMSON: Gravieren (CYCLE60)" + UI_HELP "Detailierte Zyklus Beschrieb" "file://${POST_LIB_CURRENT_BMP_DIR}/CYCL60_DE.pdf" + CATEGORY DRILL MILL + + # + # Engraving Text (maximum 100 character) + # + # zu gravierender Text (maximal 100 Zeichen) + + PARAM cycle60_engraving_text + { + TYPE s + DEFVAL "EMPTY" + UI_LABEL "Gravur Text _TEXT" + } + + # + # String variable as engraving text + # + # String Variable als Gravurtext + + PARAM cycle60_engraving_text_as_var + { + TYPE b + DEFVAL "FALSE" + UI_LABEL "Gravur Text als Variable _TEXT" + } + + # + # Text direction, angle of the text line in relation to the 1st axis + # + # Textrichtung, Winkel der Textlinie bezogen auf die 1. Achse + + PARAM cycle60_engraving_angle + { + TYPE d + DEFVAL "0.0" + UI_LABEL "Gravur Winkel _STA" + } + + # + # Engraving Depth needs for Mill Control Operation + # + # Graviertiefe wird ben tigt fuer eine Mill Control Operation + + PARAM cycle60_engraving_depth + { + TYPE d + DEFVAL "0.2" + UI_LABEL "Gravur Tiefe (Ink) bei Mill_CONTROL Operation _DPR" + } + + # + # Character height + # + # Zeichenh he + + PARAM cycle60_engraving_character_height + { + TYPE d + DEFVAL "3" + UI_LABEL "Zeichenhoehe _WID" + } + + # + # Character distance + # + # Zeichenabstand + + PARAM cycle60_engraving_character_distance + { + TYPE d + DEFVAL "0.5" + UI_LABEL "Zeichenabstand, Breite, Winkel _DF" + } + + # # + # # Text direction + # # + # # Textrichtung + # + # PARAM cycle60_engraving_text_direction + # { + # TYPE o + # DEFVAL "1-Normal" + # OPTIONS "0-Spiegel","1-Normal" + # UI_LABEL "Text direction" + # } + + # + # Text orientation + # + # Textausrichtung + + PARAM cycle60_engraving_text_orientation + { + TYPE o + DEFVAL "1-Linie" + OPTIONS "1-Linie","2-Kreisbogen oben","3-Kreisbogen unten" + UI_LABEL "Textausrichtung Bit ZEHN _VARI" + } + + # + # Origin horizontal + # + # Bezugspunkt horizontal + PARAM cycle60_engraving_text_bez_h + { + TYPE o + DEFVAL "0-Links" + OPTIONS "0-Links","1-Mittig","2-Rechts" + UI_LABEL "Bezugsp. Horizontal Bit TAUSEND _VARI" + } + + # + # Origin vertical + # + # Bezugspunkt vertikal + PARAM cycle60_engraving_text_bez_v + { + TYPE o + DEFVAL "0-Unten" + OPTIONS "0-Unten","1-Mittig","2-Oben" + UI_LABEL "Bezugsp. Vertikal Bit ZEHNTAUSEND _VARI" + } + + # + # Text width + # + # Textbreite + PARAM cycle60_engraving_text_width + { + TYPE o + DEFVAL "0-Zeichenabstand" + OPTIONS "0-Zeichenabstand","1-Breite (nur Linear)","2-Winkel (nur Kreisbogen)" + UI_LABEL "Textbreite Bit HUNDERTTAUSEND _VARI" + } + + PARAM cycle60_engraving_SDIS + { + TYPE d + DEFVAL "3" + UI_LABEL "Sicherheitsabstand _SDIS" + } + + PARAM legend_group_mp + { + TYPE g + DEFVAL "start_closed" + UI_LABEL "Kreis Mitte (Ausrichten auf Kreis)" + } + PARAM cycle60_engraving_CP1 + { + TYPE d + DEFVAL "0" + TOGGLE off + UI_LABEL "Position 1. Achse _CP1" + } + + PARAM cycle60_engraving_CP2 + { + TYPE d + DEFVAL "0" + TOGGLE off + UI_LABEL "Position 2. Achse _CP2" + } + + PARAM legend_group_mp_end + { + TYPE g + DEFVAL "end" + } + + PARAM legend_group + { + TYPE g + DEFVAL "start_closed" + UI_LABEL "Legend" + } + PARAM ctrl_s840d_CYCLE_60 + { + TYPE l + DEFVAL "$POST_LIB_CURRENT_BMP_DIR/sinumerik_840d_CYCLE60.bmp" + } + PARAM legend_group_end + { + TYPE g + DEFVAL "end" + } +} +EVENT dummy_event_end +{ + UI_LABEL "------------END------------" + PARAM new_item + { + TYPE g + DEFVAL "start_open" + UI_LABEL "New Item" + } + PARAM new_item_end + { + TYPE g + DEFVAL "end" + } +} + +