Skip to content

Commit 0585de6

Browse files
committed
docs: update prerequisites and enhance CLI usage instructions
1 parent 49bb5aa commit 0585de6

3 files changed

Lines changed: 58 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## 1 Prerequisites
66

7-
- Windows with TcXaeShell Version 15.0 or higher
7+
- Windows with TcXaeShell Version 15.0 (other versions have not been tested)
88

99
## 2 Installation
1010

TcAutomation/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,38 @@ msbuild /p:Configuration=Release TcAutomation.csproj
1515
- Open the [TcAutomationInstaller.iss](TcAutomationInstaller.iss) file within the Inno Setup.
1616
- Click the "Build/Compile" button (or press Ctrl+F9)."
1717
- The installer will be created in the [output](output) folder.
18+
19+
## 4 CLI Usage
20+
21+
**Note:** You typically don't call `TcAutomation.exe` directly. Instead, use the BCS Engineering DSL CLI tool:
22+
23+
```bash
24+
bcs-engineering-cli beckhoff deploy <file>
25+
```
26+
27+
The `deploy` command internally invokes `TcAutomation.exe` with the appropriate parameters. However, if you need to call it manually, the following options are available:
28+
29+
### Command Line Options
30+
31+
| Option | Required | Default | Description |
32+
| ----------------- | -------- | ------------------------------------------------------------------- | -------------------------------------------------- |
33+
| `--workspace` | Yes | - | Path to your project root (where generated/ lives) |
34+
| `--solution-name` | No | `MyGeneratedSolution` | Name of the TwinCAT solution |
35+
| `--project-name` | No | `MyTwinCATProject` | Name of the Visual Studio project |
36+
| `--plc-name` | No | `MyPlcProject` | PLC project name |
37+
| `--template-path` | No | `C:\TwinCAT\3.1\Components\Base\PrjTemplate\TwinCAT Project.tsproj` | Path to your .tsproj template |
38+
| `--prog-id` | No | `TcXaeShell.DTE.15.0` | ProgID to use when launching TwinCAT |
39+
| `--ads-username` | No | `Administrator` | ADS username for remote connection |
40+
| `--ads-password` | No | `1` | ADS password for remote connection |
41+
42+
**Note:** If you're using a different TwinCAT version, you need to adjust the `--prog-id` parameter accordingly.
43+
44+
### Example Usage
45+
46+
```bash
47+
TcAutomation.exe --workspace "C:\Projects\MyProject"
48+
```
49+
50+
```bash
51+
TcAutomation.exe --workspace "C:\Projects\MyProject" --solution-name "MySolution" --plc-name "MainPLC"
52+
```

language/README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,37 @@ or link the local version
4949
npm link
5050
```
5151

52-
## 3 Usage
52+
## 3 Usage (Beckhoff)
5353

5454
### 3.1 Generate Code
5555

5656
```bash
57-
bcs-engineering-cli beckhoff generate <path-to-bcsctrl-file>
57+
bcs-engineering-cli beckhoff generate <path-to-bcsctrl-file> [options]
5858
```
5959

60+
**Options:**
61+
62+
- `-d, --destination <dir>` - Output directory for generated files
63+
- `-q, --quiet` - Suppress output (default: false)
64+
6065
### 3.2 Generate Code and Deploy
6166

6267
```bash
63-
bcs-engineering-cli beckhoff deploy <path-to-bcsctrl-file>
68+
bcs-engineering-cli beckhoff deploy <path-to-bcsctrl-file> [options]
6469
```
6570

71+
**Options:**
72+
73+
- `--template-path <path>` - TwinCAT template path
74+
- `--solution-name <name>` - Solution name (default: `MyGeneratedSolution`)
75+
- `--project-name <name>` - Project name (default: `MyTwinCATProject`)
76+
- `--plc-name <name>` - PLC project name (default: `MyPlcProject`)
77+
- `--tc-exe <path>` - Path to TcAutomation executable (default: `TcAutomation.exe`, resolved from PATH)
78+
- `--ads-username <username>` - ADS username for remote connection (default: `Administrator`)
79+
- `--ads-password <password>` - ADS password for remote connection (default: `1`)
80+
- `-d, --destination <dir>` - Output directory for generated files
81+
- `-q, --quiet` - Suppress output (default: false)
82+
6683
**NOTE:** The working directory will be set to the root of the provided file. This means that the .bcsctrl file can contain cross-references to other files in the same directory.
6784

6885
### 3.3 Supported Target Platforms
@@ -76,6 +93,7 @@ In addition to the standard libraries provided by Beckhoff, the following librar
7693
- `Tc3_DALI`: Please note that this library integration is not fully tested.
7794

7895
## 4 Future Work
96+
7997
- Add support for more target platforms (e.g., Siemens, Codesys)
8098
- Add and test support for more bus systems (e.g., EtherCAT, Profinet)
8199
- Add a more sophisticated module system (e.g., support multiple files, packages, imports, etc.)
@@ -86,4 +104,4 @@ In addition to the standard libraries provided by Beckhoff, the following librar
86104
- Support UseStmt within FB logic
87105
- Look into debugging DSLs
88106
- Look into moving the framework to a web-based solution (both the DSL and the deployment tool)
89-
- Look into graphical modeling
107+
- Look into graphical modeling

0 commit comments

Comments
 (0)