LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Serial Data

03h and 06h have 3 characters any character is 2 byte
0 Kudos
Message 11 of 27
(2,224 Views)

The initialization message is 8 bytes (see section 3 of the document) and the table page 6 gives the different codes used. Section 2 provides details of the data structure. Tha ack message is 2 bytes 0x0603.

 

Ben64

 

Hatef, the h is used to specify hexadecimal representation is used.

Message 12 of 27
(2,218 Views)

@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".

Message 13 of 27
(2,209 Views)

thank you ben
yesyou are right  i just make mistake by fast reading text

0 Kudos
Message 14 of 27
(2,204 Views)
RavensFan
I accept my mistake about it
and sorry for that
i have to read manual more carefully
the thing that I do not
Message 15 of 27
(2,195 Views)

Well my bad also, I'm not that sure about the size of the initialization message after reding RavensFan message, looks more like 5 bytes. I got a closer look at the document and it is a bit confusing. The OP will have to dig in more deeply.

 

Ben64

Message 16 of 27
(2,192 Views)

@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?


"Should be" isn't "Is" -Jay
Message 17 of 27
(2,186 Views)
That's exactly what I am confused about.. Either way, if I set the read count to 8, then will I recieve the emote message (even if it is only 5 bytes)
0 Kudos
Message 18 of 27
(2,180 Views)
Also on page 5, 2.2.2 the manual says the generator yasss packets of 64 bits of data... Does this mean 8bytes? I am becoming p confused...
0 Kudos
Message 19 of 27
(2,173 Views)
Another question I had regarding this, should I set 03 as my term character in the visa port?
0 Kudos
Message 20 of 27
(2,166 Views)