Add readme
This commit is contained in:
@@ -3,7 +3,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.9.34728.123
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sharp7.Monitor", "Sharp7.Monitor\Sharp7.Monitor.csproj", "{9E5BF5E6-D1A1-4252-92DA-B66A04C744D0}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sharp7.Monitor", "Sharp7.Monitor\Sharp7.Monitor.csproj", "{9E5BF5E6-D1A1-4252-92DA-B66A04C744D0}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Solution Items", "_Solution Items", "{F66AD208-E4F7-453C-AC39-C0D6FF3D55F8}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.editorconfig = .editorconfig
|
||||
.gitignore = .gitignore
|
||||
publish.ps1 = publish.ps1
|
||||
readme.md = readme.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
||||
BIN
docs/images/execute s7mon.gif
Normal file
BIN
docs/images/execute s7mon.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 176 KiB |
80
readme.md
Normal file
80
readme.md
Normal file
@@ -0,0 +1,80 @@
|
||||
# Sharp7Monitor
|
||||
|
||||
Ever needed a simple console program to read some variables from a Siemens S7 PLC?
|
||||
|
||||
Sharp7Monitor is a .NET Console program written in C# that connects to a Siemens S7 PLC (Programmable Logic Controller) and reads specified variables.
|
||||
It displays the variable values in a table format directly in your console. The content of these variables is automatically updated.
|
||||
|
||||
## Usage
|
||||
|
||||
1. **Installation**:
|
||||
- Clone this repository or download the `s7mon.exe` binary.
|
||||
- Ensure you have the necessary dependencies installed (e.g., .NET runtime).
|
||||
|
||||
2. **Invocation**:
|
||||
- Open your terminal or command prompt.
|
||||
- Navigate to the directory containing `s7mon.exe`.
|
||||
- Run the following command:
|
||||
```
|
||||
.\s7mon.exe <IP_Address> <Variable1> <Variable2> ... <VariableN>
|
||||
```
|
||||
Replace `<IP_Address>` with the IP address of your Siemens S7 PLC, and list the desired variables (e.g., `DB2050.Byte1`, `DB2050.Int6`, etc.).
|
||||
|
||||
3. **Output**:
|
||||
- The program will establish a connection to the PLC and continuously display the values of the specified variables in a table format.
|
||||
- The table will automatically update as the variable values change.
|
||||
- Press `Ctrl + C` to exit.
|
||||
|
||||
|
||||
### Command
|
||||
|
||||
`s7mon.exe <IP address> [variables] [OPTIONS]`
|
||||
|
||||
### Arguments
|
||||
|
||||
<IP address> IP address of S7
|
||||
[variables] Variables to read from S7, like Db200.Int4.
|
||||
For format description see https://github.com/evopro-ag/Sharp7Reactive
|
||||
|
||||
### Options
|
||||
```
|
||||
DEFAULT
|
||||
-h, --help Prints help information
|
||||
-c, --cpu 0 CPU MPI address of S7 instance.
|
||||
See https://github.com/fbarresi/Sharp7/wiki/Connection#rack-and-slot.
|
||||
|
||||
-r, --rack 0 Rack number of S7 instance.
|
||||
See https://github.com/fbarresi/Sharp7/wiki/Connection#rack-and-slot.
|
||||
```
|
||||
|
||||
|
||||
### Example Invocation
|
||||
|
||||
```powershell
|
||||
.\s7mon.exe 10.30.110.62 DB2050.Byte1 DB2050.Byte2.4 DB2050.Int6 DB2050.Real34 DB2050.String50.20
|
||||
```
|
||||
|
||||
### Configure Cpu and Rack
|
||||
|
||||
Use `--cpu` and `--rack` parameters to specity the S7 instance to connect to. The required values depend on
|
||||
the S7 you are using and it's configuration. You can find more information in the
|
||||
[Sharp 7 docs](https://github.com/fbarresi/Sharp7/wiki/Connection#rack-and-slot).
|
||||
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome! If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License - see the LICENSE file for details.
|
||||
|
||||
## On the shoulders of giants
|
||||
|
||||
This project is based on great libraries:
|
||||
|
||||
- The [Sharp 7](https://github.com/fbarresi/Sharp7) S7 PLC driver, based on [Snap 7](https://snap7.sourceforge.net/) by Davide Nardella
|
||||
- [Sharp 7 Reactive](https://github.com/evopro-ag/Sharp7Reactive)
|
||||
- [Spectre.Console](https://github.com/spectreconsole/spectre.console)
|
||||
|
||||
Reference in New Issue
Block a user