LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how use BCC parity in Labview??

when I send data to COM1 I need to paritify the data,
I use BCC parity,If I send data the string of 08A4 to COM1.question one :Is the data of 08A4 DEX or ASCII?
question two: the BCC should be :0 xor 8 xor 10 xor 4=1? or 30 xor 38 xor 40 xor 34 =7C? which is true ,if you know please tell me! if the all of two are not correct,please tell me how to do. I am early waiting your answers!!
Thank you every much!!
0 Kudos
Message 1 of 4
(3,456 Views)
I am not sure what BCC parity is but I think I can help explain how LabVIEW and the serial port work. Typically string data is sent to the serial port. This data is converted into ASCII and those numbers are sent. For instance, "1cat" is 49 99 97 116 in decimal. If you want to send 08 A4 in hexadecimal, the string would be "\08\A4".

Jeremy Braden
National Instruments
0 Kudos
Message 2 of 4
(3,456 Views)
Thank you sir!Can Labview only sent the data of string to COM ,so the data should only string ,if it can sent other value?
0 Kudos
Message 3 of 4
(3,456 Views)
This depends on your program. If you were to use VISA (which I highly recommend) to write to the com port, you need to pass a string. A string is just a series of hex numbers. If you want to send particular hex just use the slash codes display and \AE or \03 to send the values you want.

Many programs and instruments will send ascii of numbers rather than the numbers themselves.

Jeremy Braden
National Instruments
0 Kudos
Message 4 of 4
(3,456 Views)