All Projects → dathlin → Hslcommunication

dathlin / Hslcommunication

Licence: lgpl-3.0
An industrial IoT underlying architecture framework, focusing on the underlying technical communications and cross-platform, cross-language communication functions, to achieve a variety of mainstream PLC data reading and writing, to achieve modbus of various protocols read and write, and so on, to support the rapid construction of industrial upper computer software, configuration software, SCADA software, factory mes system, To help enterprise Industry 4.0 take-off, to achieve intelligent manufacturing, smart factory goals. The main PLC contains Siemens, Mitsubishi, Omron, Panasonic, Modbus, AB-PLC, Redis

Projects that are alternatives of or similar to Hslcommunication

Fuxa
Web-based Process Visualization (SCADA/HMI/Dashboard) software
Stars: ✭ 262 (-67.89%)
Mutual labels:  plc, iot, modbus
EasyModbusTCP.Java
EasyModbusTCP library for Java implementation
Stars: ✭ 76 (-90.69%)
Mutual labels:  modbus, plc, modbus-tcp
Easymodbustcp.net
Modbus TCP, Modbus UDP and Modbus RTU client/server library for .NET implementations
Stars: ✭ 358 (-56.13%)
Mutual labels:  plc, modbus, modbus-tcp
Iotclient
这是一个物联网设备通讯协议实现客户端,将会包括主流PLC通信读取、ModBus协议、Bacnet协议等常用工业通讯协议。本组件终身开源免费,采用最宽松的MIT开源协议,您可以随意修改和商业使用(商业使用请做好评估和测试)。
Stars: ✭ 311 (-61.89%)
Mutual labels:  plc, iot, modbus
Lettuce Core
Advanced Java Redis client for thread-safe sync, async, and reactive usage. Supports Cluster, Sentinel, Pipelining, and codecs.
Stars: ✭ 4,319 (+429.29%)
Mutual labels:  redis, redis-client
Redis
Redis commands for Elixir
Stars: ✭ 357 (-56.25%)
Mutual labels:  redis, redis-client
Stackexchange.redis.extensions
Stars: ✭ 419 (-48.65%)
Mutual labels:  redis, redis-client
Redis Admin
redis client tool,redis web client,redis web ui,spring-boot support
Stars: ✭ 436 (-46.57%)
Mutual labels:  redis, redis-client
Fastoredis
FastoRedis is a crossplatform Redis GUI management tool.
Stars: ✭ 316 (-61.27%)
Mutual labels:  redis, redis-client
Redis Plus Plus
Redis client written in C++
Stars: ✭ 428 (-47.55%)
Mutual labels:  redis, redis-client
Stackexchange.redis
General purpose redis client
Stars: ✭ 4,986 (+511.03%)
Mutual labels:  redis, redis-client
Crystal Redis
Full featured Redis client for Crystal
Stars: ✭ 345 (-57.72%)
Mutual labels:  redis, redis-client
Plc4x
PLC4X The Industrial IoT adapter
Stars: ✭ 317 (-61.15%)
Mutual labels:  iot, modbus
Libplctag
This C library provides a portable and simple API for accessing Allen-Bradley and Modbus PLC data over Ethernet.
Stars: ✭ 314 (-61.52%)
Mutual labels:  plc, modbus
Inchat
一个轻量级、高效率的支持多端(应用与硬件Iot)的可分布式、异步网络应用通讯框架
Stars: ✭ 654 (-19.85%)
Mutual labels:  iot, tcp-ip
Redis
Vapor provider for RediStack
Stars: ✭ 434 (-46.81%)
Mutual labels:  redis, redis-client
Quick redis blog
QuickRedis is a free forever Redis Desktop manager. It supports direct connection, sentinel, and cluster mode, supports multiple languages, supports hundreds of millions of keys, and has an amazing UI. Supports both Windows, Mac OS X and Linux platform.
Stars: ✭ 594 (-27.21%)
Mutual labels:  redis, redis-client
Redis Operator
Redis Operator creates/configures/manages high availability redis with sentinel automatic failover atop Kubernetes.
Stars: ✭ 658 (-19.36%)
Mutual labels:  redis, redis-client
Node Modbus
Modbus TCP Client/Server implementation for Node.JS
Stars: ✭ 313 (-61.64%)
Mutual labels:  modbus, modbus-tcp
Iodine
iodine - HTTP / WebSockets Server for Ruby with Pub/Sub support
Stars: ✭ 720 (-11.76%)
Mutual labels:  redis, redis-client

中文

             ///\      ///\             /////////\              ///\
            //\\/      //\/           //\\\\\\\\//\            //\\/
           //\/       //\/          //\\/       \\/           //\/
          //\/       //\/           \//\                     //\/
         /////////////\/             \//////\               //\/
        //\\\\\\\\\//\/               \\\\\//\             //\/
       //\/       //\/                     \//\           //\/
      //\/       //\/           ///\      //\\/          //\/       //\   
     ///\      ///\/            \/////////\\/           /////////////\/
     \\\/      \\\/              \\\\\\\\\/             \\\\\\\\\\\\\/             Present by Richard.Hu

HslCommunication

HslCommnication.dll

Build status NuGet Status NuGet Download Gitter NetFramework Visual Studio License status copyright status

HslCommunication.jar

Build status License status NetFramework JDK status IDE status copyright status

HslCommunication.py

Build status License status NetFramework IDE status copyright status

CopyRight

(C) 2017 - 2019 Richard.Hu, All Rights Reserved

Official Website

Webside: http://www.hslcommunication.cn/

Gitter[talk with me]: https://gitter.im/HslCommunication/community

What is HSL

This is an industrial IoT based, computer communications architecture implementation, integrated with most of the basic functional implementation of industrial software development, such as Mitsubishi PLC Communications, Siemens PLC Communications, OMRON PLC Communications, Modbus Communications, All of these communications have been implemented in multiple languages, and of course, the feature integration of the main. NET Library is even more powerful, in addition to the implementation of cross-program, cross-language, cross-platform communication, so that you are no longer obsessed with the use of Windows or Linux system, the realization of log function, flow number generation function, mail sending function, Fourier transform function, and so on, will integrate more common features of industrial environment in the future.

In order not to let the industry 4 stay on the slogan, the high-rise flat up, and the cornerstone is HSL.

What can HSL do

HSL can connect the equipment of the industrial production site to the free transmission of data at the bottom, whether active or passive, whatever your acquisition system (usually the acquisition system is a Windows computer, or an embedded system, or a Linux-based box), can achieve the random transmission of data, convenient and fast to achieve a strong, real-time, high-response robust system, whether you are building a C/S system, or B/S system, or C-B-S-A (Integrated desktop client, browser, Android) hybrid system, is a fast and low-cost implementation,

As long as you have the primary data of the industrial field, that is, can build a powerful real-time monitoring function of the software, production reports and automated scheduling software, a variety of process parameters history tracking software, data based on the experience of machine learning software, as well as full-featured MES system and so on.

By the way, the traditional industrial model is the procurement of off-the-shelf industrial software, including the host computer software and MES system, while ignoring their own system. For some industry-standard functional software, such as ERP systems, financial software, these can be purchased directly, However, for the host computer and MES system, the actual needs of each enterprise are very different, it is difficult to have a common scene, and the current situation is to spend a lot of money to do small things, so here, give a future-oriented model to achieve: for the production enterprise, Based on HSL to develop enterprise-class MES system implementation, as the core Warehouse center of data, and business logic processing Center, for equipment suppliers, based on HSL to develop the host computer software system, fast and convenient distribution of data to the customer's MES system, work together.

Install From NuGet

Description: NuGet for stable version, Support Online upgrade, the use of components is best downloaded from NuGet, the project published here is likely to have not yet compiled the beta version, NuGet installation is as follows:

Install-Package HslCommunication

Environment

  • IDE: Visual Studio 2017
  • java:Intellij Idea 2018.4
  • python: Visual Studio Code

Contact

HslCommunication.dll Summary

When I started working on this project, I had an idea of how to easily and quickly read and write PLC data. Our code logic should be very simple, and it only takes one or two lines of code to implement this feature. Like this

// Pseudo code
PLC plc = new PLC("192.168.0.11", 6000);

short value = plc.ReadInt16("D100");

But after a long period of development and attempt, found that the return of PLC is likely to be abnormal, this anomaly may come from the network failure, may also come from you entered the wrong address, or the PLC itself is not allowed to operate, so in this project added a class Operateresult, So the final code becomes what it looks like (with Siemens PLC as an example)

SiemensS7Net siemens = new SiemensS7Net( SiemensPLCS.S1200, " 192.168.1.110" );
OperateResult<short> read = siemens.ReadInt16("M100");

if(read.IsSuccess)
{
	// you get the right value
	short value = read.Content;
}
else
{
	// failed , but you still can know the failed detail
	Consolo.WriteLine(read.Message);
}

Of course, you can also write very concise, because the judgment of success is ignored, so the following operation is risky.

SiemensS7Net siemens = new SiemensS7Net( SiemensPLCS.S1200, " 192.168.1.110" );
short value = siemens.ReadInt16("M100").Content;   // Look at this code, isn't it very succinct.

The above operation we have read the data, but is based on a short connection, when the reading of the data finished, automatically shut down the network, if you want to open a long connection, follow the following actions.

SiemensS7Net siemens = new SiemensS7Net( SiemensPLCS.S1200, " 192.168.1.110" );
siemens.SetPersistentConnection( );
OperateResult<short> read = siemens.ReadInt16("M100");

if(read.IsSuccess)
{
	// you get the right value
	short value = read.Content;
}
else
{
	// failed , but you still can know the failed detail
	Consolo.WriteLine(read.Message);
}

// when you don't want read data, you should call close method
siemens.ConnectClose( );

So we can see that all the other modes of communication are similar to this, including Mitsubishi PLC, Siemens PLC,AB PLC, OMRON PLC, Keane plc, Panasonic Plc, redis Communications, EFT Robots, Kuka robots and so on, including its own support for the HSL protocol.

The goal is to reduce the cost of learning for developers, and usually you have to learn how to use several different libraries and learn the basics of PLC. Now, all you need to know is how the basic PLC address is represented, and you can read and write PLC data.

Called from Visual C++ project

cppProject -> Properties -> Configuration Properties -> General -> CLR Support

Add HslCommunication.dll(net35) reference

#include "pch.h"
#include <iostream>
using namespace HslCommunication;
using namespace ModBus;

int main()
{
    std::cout << "Hello World!\n";


	// This is the demo , called C# ModbusTcpNet
	System::String ^ipAddress = gcnew System::String("127.0.0.1");
	ModbusTcpNet ^modbus = gcnew ModbusTcpNet(ipAddress, 502, 1);

	System::String ^dataAddress = gcnew System::String("100");
	OperateResult<short> ^readValue = modbus->ReadInt16(dataAddress);
	if (readValue->IsSuccess) {
		short value = readValue->Content;
		printf("Read Value:%d \n", value);
	}
	else
	{
		printf("Read Failed");
	}
}

Another feature of this project is support for cross-language communication support. You can build a C # background server that supports Windows desktop application and Web background, and Android phone-side, Python programs, Java programs to communicate. server side code:

class Program
{
    static void Main(string[] args)
    {
		NetSimplifyServer simplifyServer;
		try
		{
			simplifyServer = new NetSimplifyServer( );
			simplifyServer.ReceiveStringEvent += SimplifyServer_ReceiveStringEvent;
			simplifyServer.ServerStart( 12345 );
		}
		catch(Exception ex )
		{
			Console.WriteLine( "Create failed: " + ex.Message );
			Return;
		}

		Console.ReadLine();
	}

	private static void SimplifyServer_ReceiveStringEvent( AppSession session, NetHandle handle, string value )
	{
		if (handle == 1)
		{
			// Message to operate when a signal from the client is received 1
			simplifyServer.SendMessage( session, handle, "This is test single:" + value );
		}
		else
		{
			simplifyServer.SendMessage( session, handle, "not supported msg" );
		}
	
		// Show out, who sent it, what did it send?
		Console.WriteLine($"{session} [{handle}] {value}");
	}
}

C# Client Side (Also asp.net mvc, asp.net core mvc)

NetSimplifyClient simplifyClient = new NetSimplifyClient( "127.0.0.1", 12345 );
string value = simplifyClient.ReadFromServer( 1, "test" ).Content;

Java Client Side

NetSimplifyClient simplifyClient = new NetSimplifyClient( "127.0.0.1", 12345 );
string value = simplifyClient.ReadFromServer( 1, "test" ).Content;

Python Client Side

netSimplifyClient = NetSimplifyClient("127.0.0.1",12345)
value = netSimplifyClient.ReadFromServer(1,'123').Content

Note: In the source code, still contains a lot of Chinese annotation, in the future for a short period of time, will be used in English and Chinese double annotation, thank you for your understanding.

HslCommunicationDemo The features supported by this project can be roughly clear through the demo interface below: Picture

HslCommunication.jar Summary

This component provides the Java version, for the. NET version of the castration version, removed all the server function code, retained part of the client function code, convenient and plc, device data interaction, and C # program data interaction, this jar component is suitable for the development of Android, easy to build a. NET Server + Windows Client + asp.net client + J2EE client + Java Client + Android client.

HslCommunication.py Summary

This component provides a Python version, a castration version of the. NET version, removes all server function codes, retains some of the client function code, facilitates data interaction with PLC, devices, and data interaction with C # programs for cross-platform operation

Contribution

Warmly welcome suggestions for improvement of the Code of this project, you can launch pull Request.

Thanks

  • Hybrid locks and serializable exception classes, read and write locks, concurrent model parts code and ideas refer to "CLR Via C #", thanks to the author Jeffrey Richter

Cooperation Company

Picture Picture Picture Picture Picture Picture Picture Picture Picture

Creative is not easy, thanks for the reward

If this library really helps you, you can support me by AliPay. Please choose the amount according to your actual ability. reward

Controls

This library include some controls render upside picture. u can easily use them Picture

Mitsubishi PLC Communication

Using MC protocol, Qna 3E, Include binary and ascii Picture

Siemens PLC Communication

Using S7 protocol And Fetch/Write protocol Picture

Omron PLC Communication

Using Fins-tcp protocol Picture

AllenBradley PLC Communication

Picture

Modbus-tcp Communication

Client, using read/write coils and register, read discrete input , read register input Picture

Server, you can build your own modbus-tcp server easily Picture

Redis Client Communication

Picture

Simplify Net [ Based on Tcp/Ip ]

Communicaion with multi-computers , client can exchange data with server easily, include server side ,client side

Picture Picture

Udp Net [ Base on Udp/Ip ]

Communicaion with multi-computers , client can send a large of data to server, include server side ,client side

Picture Picture

File Net [ Base on Tcp/Ip ]

Communicaion with multi-computers , client can exchange File with server easily, include server side ,client side

Picture Picture

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].