|
1 | | -# ControlForge Structured Text - VS Code Extension |
| 1 | +# ControlForge Structured Text |
2 | 2 |
|
3 | | -Professional development environment for IEC 61131-3 Structured Text PLC programming in Visual Studio Code. |
| 3 | +[](https://marketplace.visualstudio.com/items?itemName=ControlForgeSystems.controlforge-structured-text) |
| 4 | +[](https://marketplace.visualstudio.com/items?itemName=ControlForgeSystems.controlforge-structured-text) |
4 | 5 |
|
5 | | -## Features |
| 6 | +Professional **Structured Text (IEC 61131-3)** development environment for **PLC programming** in Visual Studio Code. |
6 | 7 |
|
7 | | -- **Syntax Highlighting**: Full support for Structured Text programming language |
8 | | -- **Language Support**: Complete IEC 61131-3 standard compliance |
9 | | -- **Code Validation**: Built-in syntax validation to catch errors early |
| 8 | +## ✨ Key Features |
10 | 9 |
|
11 | | -## Language Features |
| 10 | +- 🎯 **Function Block IntelliSense**: Auto-complete for FB outputs (`myTimer.Q`, `upCounter.CV`) |
| 11 | +- 🌈 **Rich Syntax Highlighting**: Complete IEC 61131-3 language support |
| 12 | +- 💡 **Smart Code Completion**: Context-aware suggestions for keywords, types, and variables |
| 13 | +- 🔧 **Code Validation**: Built-in syntax validation and error detection |
| 14 | +- 📝 **Code Snippets**: Pre-built templates for common PLC patterns |
12 | 15 |
|
13 | | -- Comprehensive syntax highlighting for: |
14 | | - - Keywords (IF, THEN, ELSE, FOR, WHILE, etc.) |
15 | | - - Data types (BOOL, INT, REAL, STRING, etc.) |
16 | | - - Operators (AND, OR, NOT, arithmetic operators) |
17 | | - - Comments (// and (* *)) |
18 | | - - String literals |
19 | | - - Numeric literals (decimal, hex, binary, octal) |
| 16 | +## 📸 Screenshots |
20 | 17 |
|
21 | | -- Smart editor features: |
22 | | - - Auto-closing brackets and quotes |
23 | | - - Comment toggling support |
24 | | - - Intelligent word pattern matching |
| 18 | +### Syntax Highlighting & IntelliSense |
| 19 | + |
| 20 | +*Rich syntax highlighting for all IEC 61131-3 constructs* |
25 | 21 |
|
26 | | -## Usage |
| 22 | +## 🚀 Getting Started |
27 | 23 |
|
28 | | -1. Open any `.st` or `.iecst` file in VS Code |
29 | | -2. Syntax highlighting is automatically enabled |
30 | | -3. Use `Ctrl+Shift+P` and type "Validate Syntax" to check your code |
| 24 | +### Installation |
| 25 | +1. Open **Visual Studio Code** |
| 26 | +2. Go to **Extensions** (`Ctrl+Shift+X`) |
| 27 | +3. Search for **"ControlForge Structured Text"** |
| 28 | +4. Click **Install** |
31 | 29 |
|
32 | | -## Requirements |
| 30 | +### Quick Start |
| 31 | +1. Create a new file with `.st` or `.iecst` extension |
| 32 | +2. Start typing - syntax highlighting activates automatically |
| 33 | +3. Use `Ctrl+Space` for IntelliSense completion |
| 34 | +4. Type function block instances followed by `.` for member completion |
33 | 35 |
|
34 | | -- Visual Studio Code 1.74.0 or higher |
| 36 | +### Function Block Completion Example |
| 37 | +```st |
| 38 | +PROGRAM MyProgram |
| 39 | +VAR |
| 40 | + startTimer : TON; // Timer On-Delay |
| 41 | + partCounter : CTU; // Counter Up |
| 42 | + emergencyStop : R_TRIG; // Rising Edge Trigger |
| 43 | +END_VAR |
35 | 44 |
|
36 | | -## Support |
| 45 | +// IntelliSense in action: |
| 46 | +startTimer. // Shows: Q (BOOL), ET (TIME) |
| 47 | +partCounter. // Shows: Q (BOOL), CV (INT) |
| 48 | +emergencyStop. // Shows: Q (BOOL) |
| 49 | +END_PROGRAM |
| 50 | +``` |
37 | 51 |
|
38 | | -Visit [controlforge.dev](https://controlforge.dev/) for documentation and support. |
| 52 | +## 📋 Language Features |
39 | 53 |
|
40 | | -## License |
| 54 | +### 🧠 Smart IntelliSense |
| 55 | +- **Function Block Members**: Auto-complete for all standard IEC 61131-3 function blocks |
| 56 | + - Timers: `TON`, `TOF`, `TP` → `Q`, `ET` |
| 57 | + - Counters: `CTU`, `CTD`, `CTUD` → `Q`, `CV`, `QU`, `QD` |
| 58 | + - Edge Detectors: `R_TRIG`, `F_TRIG` → `Q` |
| 59 | + - Bistables: `RS`, `SR` → `Q1` |
| 60 | +- **Keyword Completion**: All IEC 61131-3 keywords and constructs |
| 61 | +- **Data Type Suggestions**: `BOOL`, `INT`, `REAL`, `TIME`, `STRING`, etc. |
| 62 | +- **Variable Detection**: Automatically detects declared variables |
| 63 | +- **Code Snippets**: Templates for common patterns (IF-THEN, FOR loops, etc.) |
41 | 64 |
|
42 | | -Licensed under the Business Source License 1.1 (BUSL-1.1). For details, see [License Terms](https://controlforge.dev/license). |
| 65 | +### 🎨 Syntax Highlighting |
| 66 | +### 🎨 Syntax Highlighting |
| 67 | +- **Keywords**: `IF`, `THEN`, `ELSE`, `FOR`, `WHILE`, `CASE`, `VAR`, `END_VAR` |
| 68 | +- **Data Types**: `BOOL`, `INT`, `REAL`, `TIME`, `STRING`, `ARRAY`, `STRUCT` |
| 69 | +- **Operators**: `AND`, `OR`, `NOT`, `XOR`, `:=`, `+`, `-`, `*`, `/` |
| 70 | +- **Comments**: `//` single-line and `(* *)` multi-line |
| 71 | +- **Literals**: String, numeric (decimal, hex, binary), time literals |
| 72 | +- **Function Blocks**: Standard IEC 61131-3 function blocks |
| 73 | + |
| 74 | +### 🔧 Editor Features |
| 75 | +- **Auto-closing**: Brackets, quotes, and parentheses |
| 76 | +- **Comment Toggle**: `Ctrl+/` for quick commenting |
| 77 | +- **Word Matching**: Intelligent word selection and highlighting |
| 78 | +- **File Association**: Automatic recognition of `.st` and `.iecst` files |
| 79 | + |
| 80 | +## 💻 Supported File Extensions |
| 81 | +- `.st` - Standard Structured Text files |
| 82 | +- `.iecst` - IEC 61131-3 Structured Text files |
| 83 | + |
| 84 | +## ⚙️ Requirements |
| 85 | +- **Visual Studio Code** 1.100.0 or higher |
| 86 | +- **Operating System**: Windows, macOS, or Linux |
| 87 | + |
| 88 | +## 🛠️ Commands |
| 89 | +Access these commands via the Command Palette (`Ctrl+Shift+P`): |
| 90 | +- **"Structured Text: Validate Syntax"** - Check code for syntax errors |
| 91 | + |
| 92 | +## 📊 What's New in v1.1.0 |
| 93 | +- ✨ **Function Block Member Completion** - The headline feature! |
| 94 | +- 🔍 **Enhanced Parser** - Better variable and FB instance detection |
| 95 | +- 🧪 **Comprehensive Testing** - Automated tests ensure reliability |
| 96 | +- 📚 **Improved Documentation** - Better examples and guides |
| 97 | + |
| 98 | +## 🤝 Support & Feedback |
| 99 | + |
| 100 | +## 🤝 Support & Feedback |
| 101 | + |
| 102 | +- 🌐 **Website**: [controlforge.dev](https://controlforge.dev/) |
| 103 | +- 📧 **Issues**: [GitHub Issues](https://github.com/ControlForge-Systems/controlforge-structured-text/issues) |
| 104 | +- 💬 **Discussions**: [GitHub Discussions](https://github.com/ControlForge-Systems/controlforge-structured-text/discussions) |
| 105 | +- ⭐ **Rate & Review**: [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=ControlForgeSystems.controlforge-structured-text) |
| 106 | + |
| 107 | +## 📄 License |
| 108 | + |
| 109 | +Licensed under the **Business Source License 1.1 (BUSL-1.1)**. |
| 110 | +For details, see [License Terms](https://controlforge.dev/license). |
| 111 | + |
| 112 | +--- |
| 113 | + |
| 114 | +**Made with ❤️ for the PLC programming community** |
0 commit comments