04-12-2005 09:54 AM
04-13-2005 09:06 AM
04-20-2005 07:51 AM
04-20-2005 11:33 PM
04-21-2005 07:08 AM
03-14-2007 08:30 AM
How can i read the serial data twice?
If i run a VISA read does this not clear the port, therefore if i try a second read with a different parity there would be nothing in the port left to read?
03-14-2007 08:44 AM - edited 03-14-2007 08:44 AM
Hi,
In a test setup I have I use RS-485 interface with a 9 data bit protocol.
The devices use this 9th bit to mark the first byte of a frame. With the fixed parity and character replacement in case of a parity error I managed to communicate with the devices. It works also because this is a single master system.
Can this help you ?
Sorry, reading the date's and see that this thread is 2 years old !!!
Message Edited by K C on 03-14-2007 03:45 PM
03-14-2007 08:50 AM
That sounds very much like the system i am working with.
I am emulating a master for an aircraft system that uses 9bit RS485 protocols.
I can transmit a 9th bit as an address bit as the first byte in a message, but the slave responds with the 9th bit set to show it is the start of the message but i keep getting the error replacement byte.
Some people have said read the byte twice so that the contents can be seen, but i do not know how to do this. The byte is the first of between 5 and 150 bytes, so it can only be sent once.
Any information you have will be useful.
(I relasise this is an old thread....but some problems live forever....)
03-14-2007 09:01 AM - edited 03-14-2007 09:01 AM
OK, this is what I do:
send the first byte with a mark parity (9th bit set) this is the address of the destination.
send the second byte with a space parity (9th bit reset) this is the address of the master. because this has to be the forst byte of the return answer I use this for a replacement character.
send the remaining byte with the same space parity.
Receive all bytes with a space parity. When the first byte comes in a parity error occurs and the replacement character is filled in.
Because there is also a CRC check in each fram I can check if there is a error.
It's a bit tricky in the receiving part but for a test setup and with the CRC check it will do fine.
Message Edited by K C on 03-14-2007 04:03 PM
03-14-2007 10:15 AM
You can also buy a board that supports 9th bit communication.
http://www.generalstandards.com/ or http://www.sealevel.com/ and i am sure there are more.
Or have fun and make it yourself with a 8051 processor