C#,ABREAD.sln。PC与ABPLC以Ehternet/IP读取TAG数据,可移植到其他PLC。
//注册会话ID
public byte[] Registercmd = new byte[28]
{
//--------------------------------------------------------Header 24byte-------------------------------------
0x65,0x00,//命令 2byte
0x04,0x00,//Header后面数据的长度 2byte
0x00,0x00,0x00,0x00,//会话句柄 4byte
0x00,0x00,0x00,0x00,//状态默认0 4byte
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//发送方描述默认0 8byte
0x00,0x00,0x00,0x0
2025-05-20 11:00:04
104KB
网络协议
1