03-03-2016 12:17 PM
03-03-2016 12:24 PM
03-03-2016 12:27 PM - edited 03-03-2016 12:30 PM
@Hatef.fouladi wrote:
03h and 06h have 3 characters any character is 2 byte
That makes absolutely no sense.
03h means it is the value of 3 and is shown in hex. That is a single byte.
Except in my glance at the attached manual, the device seems to take liberties with what it considers a byte, or the size of a character.
Page 6 talks about a 4 ASCII character header structure and is packaged in 16-bits. The first 4 bits are a nibble and represent a single "character". The next 4 bits are another nibble and a 2nd "character". Those two in combination are a single byte.
I'd be careful about assisting someone else with their application unless you are really familiar with this device and understand the protocol. As I said, the manual seems to stretch the definitions between bytes and characters with respect as to how those terms are traditionally defined. I think you might actually be confusing the original poster more when you say things like "03h have 3 characters".
03-03-2016 12:29 PM - edited 03-03-2016 12:42 PM
thank you ben
yesyou are right i just make mistake by fast reading text
03-03-2016 12:36 PM
03-03-2016 12:38 PM
03-03-2016 12:39 PM
@Hatef.fouladi wrote:
I see the pdf you have to send some comment inside the device after that
device will be answer back with 06h or 03h and you have to read it good news is both are same byte and you need just read 6 byte every time
also there is 5 different comment with different byte length that you have send to receive one two massage form device
study table x example more carefully
Read that through again. When the device sends data to the console. the console has 200mSec to look at the checksum, compare it to data and fire back ACK ETX or "0x0603" or the device assumes the transmission was not recieved and resends up to twice then hangs up.
WOW, that protocol was developed by an insane engineer! The nibbles are expanded to ASCII values 0x30-0x39 (litteral "0"-"9") or 0x41-0x46 (Litteral uppercase "A"-"F")- then ther Add up all those hex values - Add 2 <STX> and subtract from 0xFF THEN- transmit the result as the ASCII values for the digits! toss a <ETX 0x03> as a term char at the end I've never seen anything like it! Are you sure you want to use a device developed by engineers with so little experience?
03-03-2016 12:41 PM
03-03-2016 12:42 PM
03-03-2016 12:44 PM