LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Puzzling problem with fibre optic serial

Hi

I've been writing a simple serial VI to communicate to a bespoke
instrument. Whilst writing the VI, I was connected to the instrument by
cable, and all was fine (well once we'd sorted out an instrument glitch).
Like many such communications applications, the VI sends a command via a
string written to the serial, which is acknowledged by the instrument
returning an acknowledgement string.

I had finished the VI and it was working perfectly when connected by cable
to the instrument. However, the finished device has to work on a fibre
optic connection and so we now have two fibre optic converters and a fibre
optic cable in between the Labview VI and the instrument. This is when
some unusual behavior happened.

The fibre optic converters are supposed to be transparent to the serial
connection but it seems they are introducing an "echo" of the TX commands
from my Labview VI back into the string returned back from the instrument
(prefix). This is puzzling by itself but it gets worse. If I use
Hyperterminal to TX the instructions over the fibre optic, the echo isn't
present, and I get the normal string returned!

To reiterate, on a cable, with either Labview or Hyperterminal, there is
no problem, commands are correctly acknowledged by the instrument.
When using the fibre optic converters, from Hyperterminal it behaves as it
does on a cable but from Labview the TX string is echoed back as a prefix
to the acknowledgement string returned by the instrument.

There is no handshaking or flow control.

I have already modified my VI to adjust to this issue by adding an extra
read step to discard the "echo", but the solution isn't that elegant and
I'd like to try and understand why this is happening.

Any help, as always, is greatly appreciated.

Many thanks

Bill
0 Kudos
Message 1 of 2
(2,419 Views)
Hi Bill,

This sounds very interesting.  If there is no echo on Hyperterminal I wouldn't expect to see an echo in Labview. 

I am not sure what could be causing this.   One soloution I can think of is setting your transmit buffer to the lowest setting, this could solve it.

If not, could you send me a copy of your code so I can try and replicate the issue.

Seamus


0 Kudos
Message 2 of 2
(2,395 Views)