Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

parity error occures during data transfer

hai all,
I am working on Labview7.1. I am using it for testing the Meter product.For this i am connecting it with RS232 port .For this testing i have to write certain commands to the port(COM1) and then i have to get some ACKMENTS corresponding to the command.I am doing RTC test .For this test i have to give Date &Time in a certain format to the Meter .After writting this command i have to read ACKMENT Character whose length is one.But problem is i am writting this command ,while i am reading the character i am getting error like (Parity error occured during data transfer).After writting this command the Date & Time of the meter are updating Sucessfully.But i am not able to get ACKMENT.I am attaching my file .Plz go thru it once.

If anybody knows abt this Kindly give me solution
thanking u
0 Kudos
Message 1 of 2
(3,261 Views)
Hello,

The parity bit of a serial frame is usually used as a rudimentary error checking bit. In general, you have the ability to set it to Mark, Space, Odd, or Even, where the setting defines either sending the bit high, low, or computing and sending it high or low in order to make the serial frame contain either an odd or even number of high bits. A parity error means one of two things:

1. You have the parity configured to different settings (Mark, Space, Odd, or Even) on the two sides of your communication, and you simply receive the frame with unexpected parity. NOTE that this can go undetected for some frames because the parity bit will either be set high or low, where this is done deterministically with Mark and Space settings, and contingent upon the data sent with Odd or Even settings. For example, suppose that the sending side uses Mark parity (parity bit = 1) and the receiving side uses Odd parity. Then, for half of the possible data frames sent, the Odd parity will compute the parity bit to be high, while for the other half of the possible data frames it will be computed to be low. Thus, the parity error will be seen half the time! You may be seeing a case like this, which of course can happen anytime one side is using Mark or Space and the other is using Odd or Even. In general, you want both sides to use the same parity setting and you should simply check that the parity used on your CPU side matches that of your instrument.

2. You are indeed seeing the evidence of corrupted data, where the parity bit is being flipped during transmission; if the error only occurs (and does so deterministically) on a specific transmission, you are likely not seeing this case.

Check this setting on both sides to make sure they match (you may be able to change it on the instrument side as well; matching this is what matters), and repost if you continue to have trouble!

Thank you,

Best Regards,

JLS
Best,
JLS
Sixclear
Message 2 of 2
(3,238 Views)