LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parity Error

I get an intermittent parity error (see jpeg) when I use the attach VI's to communicate with a device on the serial port. No problems using Hyper Terminal. Same cable, same box.

Both Hyper terminal and my VI's are set for 9600 8E1. The error always occurs when I switch to Remote. Sometimes the error occurs repeatably, one right after the other, sometimes its 1 out of 10. In all cases, it occurs on the VISA Read, so the device is set to Remote, and the status note (the message contained in the read) appears the same as always, no change. Just the errror.

Hyperterminal can issue the command over and over and never have an error.

Any idea where I should be looking around just now?


~~~~~~~~~~~~~~~~~~~~
Paul Johnson
Renco Encoders, Inc
Goleta, CA
~~~~~~~~~~~~~~~~~~~~
Download All
0 Kudos
Message 1 of 7
(3,361 Views)
I'm not sure of why you are seeing the error, but you are repeatedly reinitializing the serial port. This shouldn't cause a problem, but it is the one thing that is different from Hyperterminal. Which brings up another interesting question: Does Hyperterminal even report a parity errors?

Mike...

PS: you are also really over-using the reinit to default invoke nodes...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 7
(3,353 Views)
RE: The reinits, I wish I had abetter method. I could cluster the indicators together and reinit them all at once.

What's another method to clear the indicators on each pass. I write test programs that display a ton of test data, dozens of indicators. The need to be cleared at the start of each new test. The reinitialize to default handles it nicely, but they do crowd up the diagram.
~~~~~~~~~~~~~~~~~~~~
Paul Johnson
Renco Encoders, Inc
Goleta, CA
~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 3 of 7
(3,330 Views)
Well, if your code is going to be immediately writing to the control, there's no real need to do anything. The new data will replace the old. In other places you can write the desired value using a local variable or a property node. Also controls that are not wired to anything in the calling VI are initialized to their default values when the subVI is called.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 7
(3,323 Views)
All good suggestions.

But what if:

1) The controls aren't written to right away, and
3) Aren't part of a called sub VI but on the main screen and,
2) Sometimes a test might fail and not get to the point of writing new data, and it certainly won't be appropraite to have the old data hanging around


Do you think that writing null data using local variables is better than using the renits? It certainly would take up a lot more space.
~~~~~~~~~~~~~~~~~~~~
Paul Johnson
Renco Encoders, Inc
Goleta, CA
~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 5 of 7
(3,320 Views)
Then you can clear it however you want. But one idea, concerning your last point. If a test fails it will still return something and as the developer you need to make sure that in those circumstances it returns something logically consistent with an error having occurred - like a null string, NaN for a float, or -1 for an integer that is usually only positive.

Mike...

Message Edited by mikeporter on 06-26-2007 01:40 PM


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 7
(3,310 Views)
A few days ago I got a problem that sounds similar to yours. I was running a monitor into the computer by serial port and it was giving me the same error as you every time I flipped this "Initialize RS232" switch. All the ports, both on the controller and computer were set correctly, but the VISA serial thing wasn't. So, if I were you, I would double check all the VISA serial blocks in your program, expecially ones that may be connected to the "Remote" switch or whatever it is the kept giving you the error.


0 Kudos
Message 7 of 7
(3,292 Views)