<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: RS485 Communication - Parity Error in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363044#M989656</link>
    <description>&lt;P&gt;Hi Raven,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry about that, here is the zip file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yeah they Power System uses 2 Stop bit, 1 for 9th bit and other is actual stop bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the program with all different possibility like sending the command as 9bit by enabling parity to Mark, and whil receiveing if the parity is None / space / odd&amp;nbsp; don't receive anything in the buffer. If it's Mark / even Parity I get 15 bytes of data including the sent bytes with the parity error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually this is my DUT to test the communcation, this is a part of my ATE system to validate the communication.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Oct 2016 13:17:18 GMT</pubDate>
    <dc:creator>grimmy123</dc:creator>
    <dc:date>2016-10-28T13:17:18Z</dc:date>
    <item>
      <title>RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363019#M989646</link>
      <description>&lt;P&gt;&lt;FONT face="Arial"&gt;&lt;FONT size="2"&gt;I have an requirement to communicate with RS485&amp;nbsp;(in house&amp;nbsp;power system). &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Arial"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="sans-serif" size="2"&gt;I'm using&amp;nbsp;an NI USB RS485 cable. (We made a custom connector since the pinout in&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="sans-serif" size="2"&gt;the power system is different).&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="sans-serif" size="2"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="sans-serif" size="2"&gt;The system uses 9 bit mode and they are using stop bit as their 9th bit. The&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="sans-serif" size="2"&gt;purpose of the 9th bit is to verify the address (0 0r 1).&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="sans-serif" size="2"&gt;In my program I'm using the parity bit as my 9th bit, this writes the command to the system and when I read the bytes in port i'm getting a parity error.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="sans-serif" size="2"&gt;I've searched through all the related forums and tried their solution but nothing worked for me.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 12:16:48 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363019#M989646</guid>
      <dc:creator>grimmy123</dc:creator>
      <dc:date>2016-10-28T12:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363041#M989654</link>
      <description>&lt;P&gt;Please don't attach 7z files, not everyone has 7zip nor wants to download a 3rd party app to view them when regular zip files are natively supported in windows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does your serial port have the possibility of setting 9 data bits?&amp;nbsp; If this "in house power system" uses the "stop bit as their 9th bit", do they have an actual stop bit after that?&amp;nbsp; (I don't know how a serial protocol would work if they didn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are going to get a parity error if if the value of the parity bit doesn't match what the port expects based on the previous 8 data bits.&amp;nbsp; There is no way around that.&amp;nbsp; If you ignore the error, do the first 8 bits come through okay?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You might be able to get a serial port to work with this bit stream, but it sounds like a really hacked together protocol.&amp;nbsp; If your serial port can be set for 9 data bits, that might solve the problem.&amp;nbsp; If you can't, the I'd try to fix the device you are working with&amp;nbsp; so that it doesn't behave that way or find another device that uses some standards on its data communication.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other things you could do is set your serial port's partity to be "mark" or "space" rather than odd or even.&amp;nbsp; Then you can use the presence or lack of an error as an indicator whether that 9th bit is a 1 or a 0.&amp;nbsp;&amp;nbsp;&amp;nbsp; You might be able to set your port to 2 stop bits as well.&amp;nbsp; But that is very hacky also.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 13:05:07 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363041#M989654</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2016-10-28T13:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363044#M989656</link>
      <description>&lt;P&gt;Hi Raven,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry about that, here is the zip file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yeah they Power System uses 2 Stop bit, 1 for 9th bit and other is actual stop bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the program with all different possibility like sending the command as 9bit by enabling parity to Mark, and whil receiveing if the parity is None / space / odd&amp;nbsp; don't receive anything in the buffer. If it's Mark / even Parity I get 15 bytes of data including the sent bytes with the parity error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually this is my DUT to test the communcation, this is a part of my ATE system to validate the communication.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 13:17:18 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363044#M989656</guid>
      <dc:creator>grimmy123</dc:creator>
      <dc:date>2016-10-28T13:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363060#M989660</link>
      <description>&lt;P&gt;Can your serial port be set for 9 data bits?&lt;/P&gt;&lt;P&gt;(I tried for the RS-232 port built into my laptop, and it gave an error.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you purchase an RS-485 card that is capable of 9-bit data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is your equipment you are trying to communicate with, why can't you get whoever created this equipment to standardize on an 8 bit protocol?&lt;/P&gt;&lt;P&gt;One of the tricky parts about a 9 bit serial port is that the data you send it is based on a standard computery byte of 8 bits.&amp;nbsp; You send a string to VISA Write (or get one back from a VISA read) and that string is actually a series of bytes that are all 8-bit.&amp;nbsp; The underlying datatypes don't have a provision for a 9th bit without doing some hacking before or after a VISA write or read.&amp;nbsp; 7, 6, 5 bit protocols (7 still being somewhat common, I've never seen 6 or 5 in my life) don't have that same problem because they can all fit in a 8-bit byte.&amp;nbsp; (ASCII character or U8).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I googled "serial port with 9 bits", the top link took me to an NI article.&lt;/P&gt;&lt;P&gt;&lt;A href="http://digital.ni.com/public.nsf/allkb/3BDC7FF03541F772862564990057F919" target="_blank"&gt;http://digital.ni.com/public.nsf/allkb/3BDC7FF03541F772862564990057F919&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Read that, it seems to show some tweaks you can try to make 9 bit communication work with 8 bits and parity, and get it to return the data even with a parity error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 13:52:21 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363060#M989660</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2016-10-28T13:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363079#M989665</link>
      <description>&lt;P&gt;Hi Raven,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since the system is responding for the command state that I write with Parity Mark, I assume that it's working as 9 bit communication.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The communication method is cannot be changed because the same method is used as a master / slave communication in legacy systems as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding the ini file, that's the first step I tried when I got that error, but still no improvement. Even making the ini file to disable error replacement to 1 I was getting parity error.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 14:24:43 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363079#M989665</guid>
      <dc:creator>grimmy123</dc:creator>
      <dc:date>2016-10-28T14:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363080#M989666</link>
      <description>&lt;P&gt;You're sure it's not a real parity error induced by the house-built cable?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 14:30:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363080#M989666</guid>
      <dc:creator>billko</dc:creator>
      <dc:date>2016-10-28T14:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363082#M989668</link>
      <description>&lt;P&gt;When you disable the parity error replacement, do you get a byte that makes sense for the first 8 bits?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can expect to get parity errors.&amp;nbsp; That is normal based on the fact that the device is not trying to make that bit a parity bit.&amp;nbsp; The presence of the error or lack there of will tell you whether the 9th bit (the 9th data bit on the device side, the parity bit on your computer side) is a 1 or a 0.&amp;nbsp; As long as you get the first 8 bits through okay even if there is a parity error, you can then join the U8 that is either a 1 or a 0, with the U8 that you get from the VISA read of 1 byte.&amp;nbsp; (you'll have to typeast the 1 string character to a U8 byte.)&amp;nbsp; Now you'll have a U16 to contain that contains your 9 bits of data.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 14:31:40 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363082#M989668</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2016-10-28T14:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363092#M989670</link>
      <description>&lt;P&gt;Billko,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope it's not, The cable connection are as follows, &lt;IMG src="https://ip1.i.lithium.com/573a24005a1d13dbdc4ef8ae3156a2855bd9e8d9/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31393036373069324439453946443731393033373338352f696d6167652d73697a652f6d656469756d3f763d76322670783d2d31" border="0" alt="Pin out.png" title="Pin out.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 14:44:45 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363092#M989670</guid>
      <dc:creator>grimmy123</dc:creator>
      <dc:date>2016-10-28T14:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363094#M989671</link>
      <description>&lt;P&gt;Raven,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm getting the bytes at port if the party is mark, with/ without updating the ini file. But the parity error is still there?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The system enginner says receive is only 8 byte (only sending the data is 8+1 bit for 8 bytes), so I tried to make the parity property to none before reading. If I make it to none I don't get the data. Only if the party is Mark I'm getting the data at port.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 14:51:35 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363094#M989671</guid>
      <dc:creator>grimmy123</dc:creator>
      <dc:date>2016-10-28T14:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363127#M989681</link>
      <description>&lt;P&gt;I suggest you read up on some resources on serial communication.&amp;nbsp; I feel like you don't understand what a parity error is.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Parity has nothing to do with your cable, jus the pattern of 1's and 0's that make up a byte.&amp;nbsp; (That image is too small to read anyway.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"The system engineer says receive is only 8 byte (only sending the data is 8+1 bit for 8 bytes),".&lt;/P&gt;&lt;P&gt;Be careful on your wording.&amp;nbsp; You are talking about bytes and bits simultaneously.&amp;nbsp; A given message can be X bytes long.&amp;nbsp; Are you saying that each message is 8 bytes?&lt;/P&gt;&lt;P&gt;If your parity is none, you get a start bit, 8 data bits, and a stop bit.&amp;nbsp; If the device is sending 9 data bits, and you set your parity to none, you won't get a parity error.&amp;nbsp; You will probably get a framing error.&amp;nbsp; And you won't get any data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say you have a pattern of 8 data bits of 1010 1010.&amp;nbsp; If your parity is even, you'll get a 0 for the parity bit (to keep an even number of ones).&amp;nbsp; If your parity is odd, you'll get a 1 fo rthe parity bit (to make an odd number of ones.)&amp;nbsp; (This gets calculated for each group of 8 data bits.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your parity is mark, you're looking for a 1 no matter what the data pattenr.&amp;nbsp; If your parity is space, you're looking for a 0 no matter what the data pattern.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the incoming parity bit doesn't match up with the expected pattern, then you'll get a parity error.&amp;nbsp; With normal devices, this would be a true error indicating something is wrong with the data pattern.&amp;nbsp; With your "legacy 9-bit system" (which should be taken out back and shot), you need to hack the protocol to use the parity bit as a placeholder for the 9th data bit.&amp;nbsp; If that bit doesn't match what is expected, you get a parity error.&amp;nbsp; But in your case it is not a real communication error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you get a parity error, and parity replacement is enabled, then whenever you get an error, the 8 data bits are discarded and replaced with something else like the null character 0x00.&amp;nbsp; You'll get an error message.&amp;nbsp; If parity replacment is disabled, but the parity doesn't match, the 8 data bits come through okay, but you'll still get an error that you can discard as an error, but use the presence of that error to indicate whether that parity bit (the "9th data bit" on your device) is a 1 or a 0.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 15:51:44 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363127#M989681</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2016-10-28T15:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363137#M989686</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/63946"&gt;@RavensFan&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;I suggest you read up on some resources on serial communication.&amp;nbsp; I feel like you don't understand what a parity error is.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Parity has nothing to do with your cable, jus the pattern of 1's and 0's that make up a byte.&amp;nbsp; (That image is too small to read anyway.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"The system engineer says receive is only 8 byte (only sending the data is 8+1 bit for 8 bytes),".&lt;/P&gt;&lt;P&gt;Be careful on your wording.&amp;nbsp; You are talking about bytes and bits simultaneously.&amp;nbsp; A given message can be X bytes long.&amp;nbsp; Are you saying that each message is 8 bytes?&lt;/P&gt;&lt;P&gt;If your parity is none, you get a start bit, 8 data bits, and a stop bit.&amp;nbsp; If the device is sending 9 data bits, and you set your parity to none, you won't get a parity error.&amp;nbsp; You will probably get a framing error.&amp;nbsp; And you won't get any data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say you have a pattern of 8 data bits of 1010 1010.&amp;nbsp; If your parity is even, you'll get a 0 for the parity bit (to keep an even number of ones).&amp;nbsp; If your parity is odd, you'll get a 1 fo rthe parity bit (to make an odd number of ones.)&amp;nbsp; (This gets calculated for each group of 8 data bits.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your parity is mark, you're looking for a 1 no matter what the data pattenr.&amp;nbsp; If your parity is space, you're looking for a 0 no matter what the data pattern.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the incoming parity bit doesn't match up with the expected pattern, then you'll get a parity error.&amp;nbsp; With normal devices, this would be a true error indicating something is wrong with the data pattern.&amp;nbsp; With your "legacy 9-bit system" (which should be taken out back and shot), you need to hack the protocol to use the parity bit as a placeholder for the 9th data bit.&amp;nbsp; If that bit doesn't match what is expected, you get a parity error.&amp;nbsp; But in your case it is not a real communication error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you get a parity error, and parity replacement is enabled, then whenever you get an error, the 8 data bits are discarded and replaced with something else like the null character 0x00.&amp;nbsp; You'll get an error message.&amp;nbsp; If parity replacment is disabled, but the parity doesn't match, the 8 data bits come through okay, but you'll still get an error that you can discard as an error, but use the presence of that error to indicate whether that parity bit (the "9th data bit" on your device) is a 1 or a 0.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Well, parity &lt;EM&gt;does &lt;/EM&gt;have something to do with the cable.&amp;nbsp; How else do you end up with a different pattern of bits than was expected?&amp;nbsp; Of course, this is assuming that the data was interpreted correctly in the first place, which, as you point out, may be suspect.*&lt;BR /&gt;&lt;BR /&gt;Edit:&lt;/P&gt;&lt;P&gt;* The cable would have to be really bad, like poor shielding and/or not twisted pair.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 16:19:34 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363137#M989686</guid>
      <dc:creator>billko</dc:creator>
      <dc:date>2016-10-28T16:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363141#M989688</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/135106"&gt;@billko&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Well, parity &lt;EM&gt;does &lt;/EM&gt;have something to do with the cable.&amp;nbsp; How else do you end up with a different pattern of bits than was expected?&amp;nbsp; Of course, this is assuming that the data was interpreted correctly in the first place, which, as you point out, may be suspect.*&lt;BR /&gt;&lt;BR /&gt;Edit:&lt;/P&gt;&lt;P&gt;* The cable would have to be really bad, like poor shielding and/or not twisted pair.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;True.&amp;nbsp; But a wiring diagram of the cable is going to prove it is a a problem.&amp;nbsp; (Especially in this case where the problem as stated was a device that doesn't adhere to common RS-xxx standards.) &amp;nbsp; It would either be a correctly wired cable and basically works unless there are other problems.&amp;nbsp; Or an incorrectly wired cable which&amp;nbsp; won't work at all.&amp;nbsp; You would only get a parity error based on a cable if it is otherwise wired correctly, but is poorly constructed, i.e. flaky.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 16:24:52 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363141#M989688</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2016-10-28T16:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363145#M989691</link>
      <description>&lt;P&gt;Raven &amp;amp; Bill,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had a KB of what parity is when I start having this error, anyway I'll go through again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's what I'm doing,&lt;/P&gt;&lt;P&gt;Sending this 8 byte by U8 to String function, with Parity Mark,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Byte0&amp;nbsp; 0x01&amp;nbsp;&amp;nbsp; 0b 1 0000 0001&lt;/P&gt;&lt;P&gt;Byte1&amp;nbsp; 0x00&amp;nbsp;&amp;nbsp; 0b&amp;nbsp;0 0000 0000&lt;/P&gt;&lt;P&gt;Byte2&amp;nbsp; 0x00&amp;nbsp;&amp;nbsp; 0b&amp;nbsp;0 0000 0000&lt;/P&gt;&lt;P&gt;Byte3&amp;nbsp; 0x02&amp;nbsp;&amp;nbsp; 0b&amp;nbsp;0 0000 0010&lt;/P&gt;&lt;P&gt;Byte4&amp;nbsp; 0x03&amp;nbsp;&amp;nbsp; 0b&amp;nbsp;0 0000 0011&lt;/P&gt;&lt;P&gt;Byte5&amp;nbsp; 0x21&amp;nbsp;&amp;nbsp; 0b&amp;nbsp;0 0010 0001&lt;/P&gt;&lt;P&gt;Byte6&amp;nbsp; 0x00&amp;nbsp;&amp;nbsp; 0b&amp;nbsp;0 0000 0000&lt;/P&gt;&lt;P&gt;Byte7&amp;nbsp; 0x00&amp;nbsp;&amp;nbsp; 0b&amp;nbsp;0 0010 0001&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The unit respond with 8 byte of data with Parity Error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached the Pin diagram&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 16:28:57 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363145#M989691</guid>
      <dc:creator>grimmy123</dc:creator>
      <dc:date>2016-10-28T16:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363169#M989697</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/63946"&gt;@RavensFan&lt;/a&gt; wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/135106"&gt;@billko&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Well, parity &lt;EM&gt;does &lt;/EM&gt;have something to do with the cable.&amp;nbsp; How else do you end up with a different pattern of bits than was expected?&amp;nbsp; Of course, this is assuming that the data was interpreted correctly in the first place, which, as you point out, may be suspect.*&lt;BR /&gt;&lt;BR /&gt;Edit:&lt;/P&gt;&lt;P&gt;* The cable would have to be really bad, like poor shielding and/or not twisted pair.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;True.&amp;nbsp; But a wiring diagram of the cable is going to prove it is a a problem.&amp;nbsp; (Especially in this case where the problem as stated was a device that doesn't adhere to common RS-xxx standards.) &amp;nbsp; It would either be a correctly wired cable and basically works unless there are other problems.&amp;nbsp; Or an incorrectly wired cable which&amp;nbsp; won't work at all.&amp;nbsp; You would only get a parity error based on a cable if it is otherwise wired correctly, but is poorly constructed, i.e. flaky.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I pretty much agree with what you said.&amp;nbsp; In fact, your post is pretty much a re-iteration of what I said.&amp;nbsp; Which is fine, because the more different ways of saying the same thing, the better chance of everyone understanding everything.&amp;nbsp; To me "flaky" would include a cable constructed without twisted pair for an RS-485 cable.&amp;nbsp; And the diagram doesn't call out for twisted pair, so I can only guess.&amp;nbsp; That's why satin RJ-45 (flat ribbon) is improper for a network connection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But now that that is out of the way, I agree that it looks like the problem is not with the cable.&amp;nbsp; I'm not sure how you can set up a serial port to have unique parameters for input and output.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 17:03:23 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363169#M989697</guid>
      <dc:creator>billko</dc:creator>
      <dc:date>2016-10-28T17:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363227#M989720</link>
      <description>&lt;P&gt;With those 8 bytes that you receive, do you care at all that the first byte as a 1 in the 9th bit and that the other 7 bytes have a zero?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, make sure you have parity error replacement DISABLED.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you do not care about that 9th bit, then just read 8 bytes (do not use bytes at port), and ignore the parity error that you are guaranteed to get.&amp;nbsp; Somewhere there is a function called Clear Specific Error.&amp;nbsp;&amp;nbsp; You could also use the general error handler.&amp;nbsp; Or unbundle the error code and feed it to a case structure that sends no error if it is a parity error, and passes through all other errors and warnings.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you do care about the value of the 9th bit, then you need to read that serial port 1 byte at a time, determine if that byte is a parity error.&amp;nbsp; I would set the parity to Space right before the VISA Read.&amp;nbsp; With the data stream you have, you'd only have an error with the first byte which has a 1 as the 9th bit.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 19:01:53 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363227#M989720</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2016-10-28T19:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363232#M989722</link>
      <description>&lt;P&gt;Raven,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suspect the receiver has 8 bytes with 8 bit of data /&amp;nbsp;byte&amp;nbsp;and not (9 bit). I need to probe in the signal to make it sure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually i'm just clearing the error as of now, but I read in some forums that if there is parity error clearing error is not a good way. So I posted here to upgrate if something I'm missing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no error when writing the bytes, the error is generated only while reading the bytes. I just tried space / none / even / odd parity setting before read (as you can see in the code) but i'm not getting the data when I read it. So I stick with Parity Mark where I atleast receive the data correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll also try the other solutions and will update you.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 19:25:01 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363232#M989722</guid>
      <dc:creator>grimmy123</dc:creator>
      <dc:date>2016-10-28T19:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363237#M989724</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually i'm just clearing the error as of now, but I read in some forums that if there is parity error clearing error is not a good way. So I posted here to upgrate if something I'm missing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I'd have to see those particular messages myself.&amp;nbsp; I believe that statement would be correct if you were getting parity errors because of the wiring or noise problems corrupting data, but otherwise would not have any parity errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your case, you can expect a parity error has normal part of operation because of the abnormal 9-bit protocol the device implemented.&amp;nbsp; So just you can just safely clear the parity error you do get.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 19:42:46 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3363237#M989724</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2016-10-28T19:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3364540#M990206</link>
      <description>&lt;P&gt;Hi Raven,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have analyzed the data, it's the same 9bit data / byte with first byte is Mark (1) and remaining 7 byte is space (1).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm gonna read the port byte by byte and check for any error's.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm gonna use for loop with parity changing from mark&amp;nbsp;for first byte and space for the second byte. I'll post the&amp;nbsp;findinds soon.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 12:28:36 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3364540#M990206</guid>
      <dc:creator>grimmy123</dc:creator>
      <dc:date>2016-11-02T12:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3365253#M990515</link>
      <description>&lt;P&gt;Hi Grimmy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whenever you get a chance to post your findings we will be able to troubleshoot further. Any additional information you can think to share is always encouraged!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 19:13:44 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3365253#M990515</guid>
      <dc:creator>SSPTest</dc:creator>
      <dc:date>2016-11-03T19:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 Communication - Parity Error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3366783#M991108</link>
      <description>&lt;P&gt;Hi SSPTest,&lt;/P&gt;&lt;P&gt;I hope I should clear the parity error. I didn't find any options, I have modified all the possibilities like writing into bytes or reading in bytes nothing worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate all your support...&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2016 20:36:51 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/RS485-Communication-Parity-Error/m-p/3366783#M991108</guid>
      <dc:creator>grimmy123</dc:creator>
      <dc:date>2016-11-08T20:36:51Z</dc:date>
    </item>
  </channel>
</rss>

