All Downloads are FREE. Search and download functionalities are using the official Maven repository.

HslCommunication.Profinet.Panasonic.PanasonicMcNet Maven / Gradle / Ivy

Go to download

一个工业物联网的底层架构框架,专注于底层的技术通信及跨平台,跨语言通信功能,实现各种主流的PLC数据读写,实现modbus的各种协议读写等等

There is a newer version: 3.7.0
Show newest version
package HslCommunication.Profinet.Panasonic;

import HslCommunication.BasicFramework.SoftBasic;
import HslCommunication.Core.Address.McAddressData;
import HslCommunication.Core.Types.OperateResultExOne;
import HslCommunication.Profinet.Melsec.MelsecMcNet;
import HslCommunication.Utilities;

public class PanasonicMcNet extends MelsecMcNet {

    /**
     * 实例化松下的的Qna兼容3E帧协议的通讯对象
* Instantiate Panasonic's Qna compatible 3E frame protocol communication object */ public PanasonicMcNet( ) { } /** * 指定ip地址及端口号来实例化一个松下的Qna兼容3E帧协议的通讯对象
* Specify an IP address and port number to instantiate a Panasonic Qna compatible 3E frame protocol communication object * @param ipAddress PLC的Ip地址 * @param port PLC的端口 */ public PanasonicMcNet( String ipAddress, int port ) { super(ipAddress, port); } public OperateResultExOne McAnalysisAddress(String address, short length ) { return McAddressData.ParsePanasonicFrom( address, length ); } protected OperateResultExOne UnpackResponseContent( byte[] send, byte[] response ) { int errorCode = Utilities.getUShort( response, 9 ); if (errorCode != 0) return new OperateResultExOne( errorCode, PanasonicHelper.GetMcErrorDescription( errorCode ) ); return OperateResultExOne.CreateSuccessResult( SoftBasic.BytesArrayRemoveBegin(response, 11 ) ); } public String toString( ) { return "PanasonicMcNet[" + getIpAddress() + ":" + getPort() + "]"; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy