Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Data Buffering in VISA Read

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

 

 

 

0 Kudos
Message 1 of 8
(4,142 Views)

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

0 Kudos
Message 2 of 8
(4,124 Views)

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 

0 Kudos
Message 3 of 8
(4,121 Views)
Maybe you have a race condition in your software?
greetings from the Netherlands
0 Kudos
Message 4 of 8
(4,119 Views)

hi,

 

Race Condition... How?

Please explain.

 

Thanks,

Samriddh Sarbalhi

0 Kudos
Message 5 of 8
(4,118 Views)
If the received order is different from the sent order, it is probably not the hardware
greetings from the Netherlands
0 Kudos
Message 6 of 8
(4,116 Views)

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

0 Kudos
Message 7 of 8
(4,114 Views)

maybe you can attach your code and a simple schematic, in a zipfile.

I really don't understand what happens

greetings from the Netherlands
0 Kudos
Message 8 of 8
(4,086 Views)