LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ascii to I16

Solved!
Go to solution

Wayne.C wrote:

 

....

Dennis,

 

I think the tab "-->" characters were added to the post to differentiate first and second read data.


Yeah, I think you are right. Then it appears that there are two data bytes and two null characters

0 Kudos
Message 21 of 23
(884 Views)
Solution
Accepted by topic author RachtheSabu

From what I gather, it looks like you expect the result

 

FFFE -> 0000

 

and get something like

 

00FF -> FE

 

My first suspicion is that your delay may be a little short.  The leading 00 you see is probably the tail of the previous query.  If you flush the buffer, this would dissappear but there is probably an underlying cause (ie. short delay). It also appears the buffer on the robot is limited to 3 bytes, since there appears to be some 00 values dropped.

 

We are all guessing here, posting your complete code (both queries) would be helpful.

0 Kudos
Message 22 of 23
(884 Views)
Flushing the buffer and reading in only 2 bytes was the winning combination.  Thank you for all your help!
0 Kudos
Message 23 of 23
(870 Views)