05-21-2009 05:10 AM
Hi,
I have made two VI's. One is transmitting VI transmitting Four Bytes and after Transmit it goes into read mode and reads for one byte. If not received within the Time out its next loop iteration triggers and so on. On the receiver side, it first reads for four bytes and then goes on write mode to write one response byte to the transmitting VI. Ideally, there are two seperate wires in RS232 Cable as Transmit and Receive. But in my case i have one PC on which a 9 pin DB Connector is connected on which transmitting VI is writing four bytes and reading one byte and a USB to Serial Cable is connected to the USB port thus making USB port as COM Port on which receiving VI is receiving four bytes and send one byte in response. Between these two ports two RS232 to TTL Converters are connected which are making two wire phenomenon into one wire on both of the ends. Like one Standard RS232 cable is connected to the convertor on one end and with DB 9 pin on other end and USB to serial is connected to USB Port on one end and the serial terminal of this wire is connected to Converter on other end. The purpose of using this converter is to transform two wire communication phenomenon into single wire communication for transmit and receive.
Now the problem is what bytes i send from Transmitting VI are received in Receiving VI as well as in Transmitting Vi as only single wire is used for transmitting and receiving and it can be called as echo. On both sides i receive the echo and the required data viceversa.
1. How to remove this Echo?
2. If i stop Receiving VI for a while with Transmitting VI running and then after some times if i again runs the Receiving VI, byte flickering happens means continuous change in receiving bytes using VISA READ but ideal bytes are being send from source. How to remove this.
This also hapens sometimes when both VI are running simultaneously.
Please suggest some solutions.
Regards,
Samriddh Sarbalhi
05-21-2009 11:35 PM
Hi,
By Byte Flickering i mean, i am transmitting four bytes from transmitter side say 5A, 7A, 2B, 0A, 04. I am supposed to receive the same byte pattern as 5A, 7A, 2B, 0A, 04.
But some times i do not get the exect bytes and instead receive byte pattern as 7A, 0A, 5A, 04, 2B.
Thanks,
Samriddh Sarbalhi
05-22-2009 01:03 AM
Sometimes unknown characters or bytes like 7A, DA etc are also received which are unknown characters but received in response and i have used bytes at port proprerty node to receive bytes on transmitting side and given constant like 5 to read VISA Function for reading bytes.
Thanks,
Samriddh Sarbalhi
05-22-2009 01:11 AM
05-22-2009 01:45 AM
hi,
Race Condition... How?
Please explain.
Thanks,
Samriddh Sarbalhi
05-22-2009 02:08 AM
05-22-2009 03:24 AM
Hi,
I got your thought that synchronization problem.
But in my case i had put a 100 ms delay in Transmitting end loop and there is no delay in receiving end loop.
I also checked by putting 100ms delay in both end loops but byte flickering is still there.
Thanks,
Samriddh Sarbalhi
Greetings from INDIA
05-24-2009 02:25 PM