OpenProtocolNetBuildOpenProtocolMessage 方法 |
构建一个读取的初始报文
命名空间:
HslCommunication.Profinet.OpenProtocol
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public static OperateResult<byte[]> BuildOpenProtocolMessage(
int mid,
int revison,
int ack,
int stationId,
int spindleId,
bool withIndex,
params string[] parameters
)
Public Shared Function BuildOpenProtocolMessage (
mid As Integer,
revison As Integer,
ack As Integer,
stationId As Integer,
spindleId As Integer,
withIndex As Boolean,
ParamArray parameters As String()
) As OperateResult(Of Byte())
public:
static OperateResult<array<unsigned char>^>^ BuildOpenProtocolMessage(
int mid,
int revison,
int ack,
int stationId,
int spindleId,
bool withIndex,
... array<String^>^ parameters
)
static member BuildOpenProtocolMessage :
mid : int *
revison : int *
ack : int *
stationId : int *
spindleId : int *
withIndex : bool *
parameters : string[] -> OperateResult<byte[]>
参数
- mid
- 类型:SystemInt32
The MID is four bytes long and is specified by four ASCII digits(‘0’…’9’). The MID describes how to interpret the message. - revison
- 类型:SystemInt32
The revision of the MID is specified by three ASCII digits(‘0’…’9’).The MID revision is unique per MID and is used in case several versions are available for the same MID. - ack
- 类型:SystemInt32
The No Ack Flag is used when setting a subscription. If the No Ack flag is not set in a subscription it means that the subscriber will acknowledge each “push” message sent by the controller (reliable mode). - stationId
- 类型:SystemInt32
The station the message is addressed to in the case of controller with multi-station configuration.The station ID is 1 byte long and is specified by one ASCII digit(‘0’…’9’). - spindleId
- 类型:SystemInt32
The spindle the message is addressed to in the case several spindles are connected to the same controller. The spindle ID is 2 bytes long and is specified by two ASCII digits (‘0’…’9’). - withIndex
- 类型:SystemBoolean
每个参数的前面,是否携带索引信息 - parameters
- 类型:SystemString
The Data Field is ASCII data representing the data. The data contains a list of parameters depending on the MID.Each parameter is represented with an ID and the parameter value.
返回值
类型:
OperateResultByte原始字节的报文信息
参见