Parity Error?

alive15

Member
Join Date
Oct 2015
Location
Montgomery, AL
Posts
690
Hello, I am trying to understand generally what a "parity error" means. I searched on Google, but it's still over my head. Could someone dumb it down and explain what it means?

I had received this error on an Okuma drive, so we replaced the drive as the manual recommended to get back going. The alarm manual says "parity error has occurred in servo amplifier, replace amplifier".

My understanding is that the "parity" bit is there to check and make sure all the other bits are good in the memory. If for some reason, the parity bit is not good, then a parity error exists. My understanding is very vague, so I wanted someone to explain in more details, but in layman's terms.

Thanks! Have a great weekend!
 
I general, parity is a very simplified sort of error checking.

Serial connections can have "parity bits" to check the integrity of every byte that comes across the line, for example. A "parity bit" is set to check if the number of true bits in the byte is even or odd, depending on whether the serial connection uses Even Parity or Odd Parity.

Parity is also used as this very low level in memory storage, like RAM and NVRAM.

More sophisticated error checking and error correcting mechanisms exist, of course, like checksums of various types.

But a "parity check failure" suggests a failed memory chip of some kind, so replacement of internal components or the whole device is the most likely repair method.
 
The thing to remember about a parity bit error is if the basic format of the word changes on one end but not the other then you will set the bit error. For example, if the baud rate does not match between the two points, you will sometimes get a parity bit error because the timing between the two packets is wrong so the receiving device is expecting the value of the parity bit to be "1" but it sees a "0". Or if the sending device is sending Modbus RTU packets but the receiving device is expecting Modbus ASCII packets (which are longer than RTU packets). Again, the receiving device looks at what it thinks should be the parity bit but it's not and if it's not correct (if it's a "0" when it should be a "1")
 
I have recieved Parity error on some machinery as well.
In my cases it had to do with the memory.

Probably along the lines of Kens statement here:
" Parity is also used as this very low level in memory storage, like RAM and NVRAM"
Replacing the hardware and reloading the data into memory fixed our problems.
 
Parity error checking is one of many error checking methods. Note that it is error checking and not error recovery. Let's compare it to 2oo3 voting error checking, using bill4807's number.

*Parity*
For simplicity we will just work in decimals not binary nor hex.
4807.
Now let's make a parity digit, by adding all the others and ignoring overflows.
4+8+0+7 = 19. Ignore the ten, and our parity digit is 9
So we store 4807 in memory as:
4807 9
Now if your memory is failing, one of the numbers will change:
4806 9
Your parity error checker will go through, add the digits and get 8. This is not 9, so it knows there is a problem. But the problem could be anywhere.
4+8+0+6 = 8 ≠ 9, so parity error.

*2oo3 voting*
This is easy, you take 3 copies and go with whichever two agree.
4807 4807 4807
Say you get a bit change now.
4806 4807 4807
Correct the error, warn the user that memory could be failing and allow them to schedule maintenance, rather than forcing downtime NOW
 
Parity is a basic method of detecting errors in a serial communications link.

The transmitting device can add the parity bit to the end of the data byte to make the total number of "1"s transmitted to be either an Odd or Even number. The parity bit counts towards that number, so if Even Parity is used, and there was an Even number of 1's in the transmitted data byte, then the Parity bit would be a "0", to keep the count Even. Conversely, if using Odd Parity, the parity bit would be sent as a "1", to make the count Odd.

The receiving device counts the number of "1" bits received, and (again using Even Parity) if the count is Odd, then the data must have become corrupted.

However, an even number of errors can pass the parity check. Statistically, therefore, and particularly on a noisy signal, Parity checking will only capture 50% of errors, the remaining 50% will be accepted as valid data.

A single parity bit cannot perform any error correction, as it cannot tell you which bit has not been received correctly.

The parity bit in each data byte can be set to one of the following:

  • None (N) means that no parity bit is sent at all.
  • Odd (O) means that parity bit is set so that the number of "logical ones" must be odd.
  • Even (E) means that parity bit is set so that the number of "logical ones" must be even.
  • Mark (M) parity means that the parity bit is always set to the mark signal condition (logical 1).
  • Space (S) parity always sends the parity bit in the space signal condition (logical 0).
Mark & Space parity is uncommon, as it adds no error detection information.

Odd parity is better than Even parity, because it ensures that at least one state transition occurs in each data byte, which makes it more reliable at detecting errors.

The most common parity setting, however, is "None", with error detection handled by the communication protocol.

One of the most common methods is the "Checksum" method, working over the entire "message", and the receiving protocol will request a re-transmission if the checksum does not match the transmitted checksum.
 
Thank you everyone for your replies, I understand the topic better now. With regards to AustralIan's example, wouldn't having a number like 1035 still give you 9 if you added them all together? Then you still wouldn't get a parity error, correct? I thought this method was called "checksum" when you add everything together.

Parity error checking is one of many error checking methods. Note that it is error checking and not error recovery. Let's compare it to 2oo3 voting error checking, using bill4807's number.

*Parity*
For simplicity we will just work in decimals not binary nor hex.
4807.
Now let's make a parity digit, by adding all the others and ignoring overflows.
4+8+0+7 = 19. Ignore the ten, and our parity digit is 9
So we store 4807 in memory as:
4807 9
Now if your memory is failing, one of the numbers will change:
4806 9
Your parity error checker will go through, add the digits and get 8. This is not 9, so it knows there is a problem. But the problem could be anywhere.
4+8+0+6 = 8 ≠ 9, so parity error.

*2oo3 voting*
This is easy, you take 3 copies and go with whichever two agree.
4807 4807 4807
Say you get a bit change now.
4806 4807 4807
Correct the error, warn the user that memory could be failing and allow them to schedule maintenance, rather than forcing downtime NOW
 

Similar Topics

Hello All, I'm new to the site and have a question regarding a profibus error which i am hoping someone can help with We have been...
Replies
1
Views
3,595
Hi everyone, I'm a bit of a beginner with PLCs and I am having a hard time connecting to a micrologix 1200. I'm using a 1761-cbl-pm02 cable and...
Replies
4
Views
2,959
I'm new to PLC, I'm using MicroLogix 1000, using USB-1761-CBL-PM02. When I try to use RSLinx Classic Lite to do the auto configuration with RS-232...
Replies
4
Views
5,730
Hello everyone, im kind of new in PLC, i know the basic things about it. So i have this probles communicating my SLC 5/04 with DF1. It had been...
Replies
23
Views
9,998
Hi all, We have several devices on an RS485 loop running a ModBus protocol. There are three EM21 electricity meters from Carlos Gavazzi, one...
Replies
5
Views
4,419
Back
Top Bottom