MIT License

项目介绍

fbarresi/BeckhoffS7Client 是一个托管在 GitHub 上的开源项目,主要使用 C# 编写,采用 MIT License 许可证,目前获得 39 个 Star、7 次 Fork。

仓库全名
fbarresi/BeckhoffS7Client
开源许可证
MIT License
Star 数
39
Fork 数
7
未关闭 Issue
1

README 摘要

BeckhoffS7Client Unofficial TwinCAT function for S7 Communication This software is an (unofficial) opensource implementation of TF6610 | TC3 S5/S7 Communication similar to my other project BeckhoffHttpClient. Main features Your surely gonna love this software, but if you still need a couple of information for starring this project... FREE! (for commercial use as well) Resilient: doesn't matter what you do with the…

完整内容见 GitHub 原始 README 或本页 。

常见问题

BeckhoffS7Client 用什么语言开发?

主要使用 C# 编写,采用 MIT License 许可证,目前有 39 个 Star。

BeckhoffS7Client 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 BeckhoffS7Client 的源码?

可以直接克隆仓库:git clone https://github.com/fbarresi/BeckhoffS7Client.git,默认分支为 master;安装与运行步骤见仓库 README。

BeckhoffS7Client 最近还在维护吗?

仓库最近一次更新为 2022年12月8日,当前有 1 个未关闭 Issue;Star 数为 39,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Unofficial TwinCAT function for S7 Communication

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
54
价值分
25
活跃状态
活跃

语言占比

C#

Release

贡献者

README

BeckhoffS7Client

Build status Codacy Badge Licence GitHub All Releases

Unofficial TwinCAT function for S7 Communication

This software is an (unofficial) opensource implementation of TF6610 | TC3 S5/S7 Communication similar to my other project BeckhoffHttpClient.

Main features

Your surely gonna love this software, but if you still need a couple of information for starring this project…

  • FREE! (for commercial use as well)
  • Resilient: doesn’t matter what you do with the beckhoff (Start, Stop, Config-Mode, Run-Mode, etc.)
  • Modern: build with the newest TwinCAT Version and .Net Core 3.1
  • Clever: don’t need to specify any datatype or bit numbering

Requirements

  • TwinCAT 3.1.4024.7+

How to use this software

Install and setup connections

  • Download the setup and install it on your beckhoff.
  • Ajdust the settings file TFU002.settings.json located C:\TwinCAT\Functions\Unofficial\BeckhoffS7Client putting your connection parameters for all your S7 PLC in the settings file.
{
  "BeckhoffSettings": {
    "AmsNetId": "",
    "Port": 851
  },
  "ExtenalPlcSettings": [
    {
      "Name": "s7-300",
      "IpAddress": "10.30.10.50",
      "Port": 102,
      "Rack": 0,
      "Slot": 2
    }
  ]
}

Use The S7 Attribute

Use the S7 attribute in your project for connect your primitive variables (like an input or output) to a S7.

VAR_GLOBAL
	
	{attribute 'S7.Out'}
	{attribute 'S7.Address' := 'db2.dbx0.0'}
	imAlive : BOOL;

	{attribute 'S7.In'}
	{attribute 'S7.Address' := 'db2.dbx1.0'}
	{attribute 'S7.Plc' := 's7-300'} // you have to select a plc by name only if you have more then one
	otherSystemAlive :BOOL;
	
END_VAR

Supported TwinCAT Datatypes

  • BOOL
  • BYTE und BYTE[]
  • INT / UINT
  • DINT / UDINT
  • LINT / ULINT
  • REAL

S7 Addressing rules

every address has the form (case unsenible) DB<number>.<TYPE><Start>.<Length/Position> i.e.: DB42.DBX0.7 => (means) Datablock 42, Bit (DBX), Start: 0, Position: 7 .

Following types are supported:

  • DBX => Bit (BOOL)
  • DBB => BYTE or BYTE[]
  • INT
  • DINT
  • DUL => LINT
  • D => REAL

Logfiles

Logfiles are saved into C:\TwinCAT\Functions\Unofficial\BeckhoffS7Client\Service.log. You can use TailBlazer for a live view.

Would you like to contribute?

Yes, please!

Try the library and feel free to open an issue or ask for support.

Don’t forget to star this project!

Credits

Special thanks to JetBrains for supporting this open source project.

评论

暂无评论