UT-308, Custom Protocol Converters, Communication Protocol for Serial Dongle - Product
Place of Origin : Shenzhen,China
Delivery Time : In 7 Working Days
Product Description
UT-308, Custom Protocol Converters, Communication Protocol for Serial Dongle
Description:
1. Command message (control ID code description of data or action type) and response message (to return ER table).
The first two characters represent its function and also it is the command to be sent. The data after some of the two characters are in decimal system. For details, please refer to the following:
Hostsend:
- - - -
No. | 1 | 2 | 3 | 4 | 5 |
B
Physical Specification
Other Specification : UT-308, Custom Protocol Converters, Communication Protocol For Serial Dongle
Description:
1. Command Message (control ID Code Description Of Data Or Action Type) And Response Message (to Return ER Table).
The First Two Characters Represent Its Function And Also It Is The Command To Be Sent. The Data After Some Of The Two Characters Are In Decimal System. For Details, Please Refer To The Following:
Hostsend:
- - - -
No. | 1 | 2 | 3 | 4 | 5 |
Bytes | 1 | 2 | LENGTH | 1 | 1 |
Format | SOH | Receiver | DATA | BCC | EOT |
- - - -
Clientresponse:
- - - -
No. | 1 | 2 | 3 | 4 | 5 |
Bytes | 1 | 2 | LENGTH | 1 | 1 |
Format | SOH | Receiver | DATA | BCC | EOT |
- - - -
: Header Code Of The Title When Data Sending Begins. (ASCII HEX 01)
: End Code When Data Sending Ends. (ASCII HEX 04)
: The Two ASCII Characters (01-FE) Represent The Address Information Of The Receiver.
: This Is For Validation To Calculate And Validate (chksum) From To , And BCC Is The Residue After The Total Of The Characters Mod By 128. If The Resulted Residue Is Less Or Equals To 32, Then Another 32 Shall Be Added For Supplement.
VB Application Sample
UPD$=01ZWABCD
OrgBuf$ = Chr(1) + UPD$ + CheckSum(UPD$) + Chr(4) Merge Command
MSComm1.Output = OrgBuf$ Send Command
Public Function CheckSum(Buf As String) As String
Dim I%, OrgBuf$
Dim CKValue%
CKValue = &H0
OrgBuf = Buf
CKValue = 0
For I = 1 To Len(Buf)
CKValue = CKValue + Asc(Mid(Buf, I, 1)) And &H7F
Next I
If CKValue <= 32 Then
CKValue = CKValue + 32
End If
CheckSum = Chr(CKValue)
End Function
: For Baud Rate Setting, 1 ASCII Character 0-4.
: Device Type, 2 ASCII Character