说明书通讯描述:
A special procedure for transferring the character strings has been implemented between the software and an external PC. A start symbol <STX> is sent, followed by the symbol of the string. An <EOT> ends the string and a checksum of all strings in XOR format. For confirmation, the computers use <ACK> (positive) and <NAK> (negative). Using this procedure, transfer is much safer than using a pure ASCII-string without checksumtesting.
Using this record, a measurement value request can be realised by an external computer. The following have been implemented:
requesting measurement data bysending 'd' with the data record,
requesting the units of measurement with 'u' and
requesting alarms with 'a'.
国外工程师回复如下:
Send-String
<stx>string<eot><checksum>
The return should be <ack> if it is ok, otherwise <nak>
with
<stx> $02
<eot> $03
<ack> $06
<nak> $15
($ ist HEX)
<checksum> defines as
{ xorsum=0, then for all string elements xorsum = (xorsum XOR (int)theString[i] ) }
that means, xor all stringelements as int values beginning with xorsum=0 and send is a byte value
大神帮帮忙吧,万分感谢
A special procedure for transferring the character strings has been implemented between the software and an external PC. A start symbol <STX> is sent, followed by the symbol of the string. An <EOT> ends the string and a checksum of all strings in XOR format. For confirmation, the computers use <ACK> (positive) and <NAK> (negative). Using this procedure, transfer is much safer than using a pure ASCII-string without checksumtesting.
Using this record, a measurement value request can be realised by an external computer. The following have been implemented:
requesting measurement data bysending 'd' with the data record,
requesting the units of measurement with 'u' and
requesting alarms with 'a'.
国外工程师回复如下:
Send-String
<stx>string<eot><checksum>
The return should be <ack> if it is ok, otherwise <nak>
with
<stx> $02
<eot> $03
<ack> $06
<nak> $15
($ ist HEX)
<checksum> defines as
{ xorsum=0, then for all string elements xorsum = (xorsum XOR (int)theString[i] ) }
that means, xor all stringelements as int values beginning with xorsum=0 and send is a byte value
大神帮帮忙吧,万分感谢