using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SimensCNC { public class ETH_S7SimensPLCProtocol { public static byte[] PLC_FIRST_HAND_SHANK = { 0x03, 0x00, 0x00, 0x16, 0x11, 0xE0, 0x00, 0x00, 0x00, 0x01, 0x00, 0xC0, 0x01, 0x0A, 0xC1, 0x02, 0x01, 0x02, 0xC2, 0x02, 0x01, 0x02 }; public static byte[] PLC_SECONDE_HAND_SHANK = { 0x03, 0x00, 0x00, 0x19, 0x02, 0xF0, 0x80, 0x32, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0xE0 }; public static byte[] PLC_READBYTE = { 0x03, 0x00, 0x00, 0x1F, 0x02, 0xF0, 0x80, 0x32, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0E, 0x00, 0x00, 0x04, 0x01, 0x12, 0x0A, 0x10, 0x02, 0x00, 0x01, 0x06, 0x40, 0x84, 0x00, 0x00, 0x00 };//读取DB1600寄存器的字节类型:,最后0x00为DB1600.0,依次按字节累计 } }