LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

rs232

Solved!
Go to solution

I'm just as flabbergasted as Roberto about what you mean. If it is indeed about bit order rather than byte order, there is nothing in LabWindows CVI that lets you do this automatically. You simply read the byte and have to account for the different order than what the serial port hardware uses.

 

So if you want to check your "first" bit in the byte you would have to do a Boolean AND with 0x80 instead of 0x01. That's entirely up to you how you want to interpret the actual bits in a byte.

 

Standard RS-232 notion is that the data is transmitted with the first bit in an 7 or 8 bit data value first as indicated by this image:

how-rs232-works-tx-diag[1].png

If your device does this different it is very strange but you have to account for that in your code. The UART in a PC can't be programmed to do this in the other order and no software I know of does provide a built in means to change that either.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 11 of 11
(656 Views)