10-11-2005 02:15 PM
10-11-2005 02:37 PM
10-11-2005 03:00 PM
Lynn,
I have considered this option but it has an ugly side effect of synchronizing the messaging. Without all the details, the first byte of a message is Mark Parity and all other bytes in the message Space Parity. The messages do stream in so any misstep would cause the data to be unsynchronized and cause even a bigger issue that I have now. It is a good idea that I may still try but would like to save it for a last resort for the moment.
Thanks,
Matt
10-11-2005 06:20 PM - edited 10-11-2005 06:20 PM
You could try to use serial property nodes to get to lower level functions. Create a property node and wire the VISA Resource Name output of the Serial Config to the property node. This gives you access to several serial port properties. You could experiment with properties such as Error Replacement Character and Serial End Mode.
Whoever designed a system using separate parities for the host and terminal transmissions has a screw loose somewhere. There are much better ways to identify the different transmissions, like headers with IDs. I feel sorry that you have to work with such an insane system. Good luck to you.
Message Edited by tbob on 10-11-2005 05:20 PM
10-11-2005 06:36 PM
Yes, I am using the serial properties to control the port and yes the protocol is messed up. We all get bestowed unfavorable task with no choice but make it work. I have attached my code for anyone's inspection to see if there are any better ways to get past this issue.
Thanks,
Matt
10-11-2005 07:17 PM
10-12-2005 08:32 AM
10-12-2005 10:05 AM
Another point: Sometimes you can speed up response time if you disable your FIFO buffer. In Windows somewhere in the system manager ...advanced settings
I don't know how deep the VISA driver goes, but by disabling the FIFO buffer your system instantly get the interrupts.
10-12-2005 10:13 AM
Thanks all for your comments. I have tried removing all indicators that need to be update while the program is running and raising the priority of the thread using the LabVIEW and Windows setting. Even in real time mode I still can get parity errors. The issue created here is the race condition of sending out a byte using Mark Parity and switching it to Space to receive the character.
Seems my options are write a DLL to handle the serial communication so I could get around the VISA routines. I am still waiting for someone from NI to chime in if the byte is discarded after a parity error or can it still be read by other means. I do believe that this should be a configurable option to replace the byte, The VISA routine does notify the programmer that a parity error has happened so why not give the decision to the programmer to use or discard the byte?
Matt
10-12-2005 10:50 AM