Hi,
Swapping Rx Tx.
On your PC(a DTE), your serial 9 pin
Dsub(Male), will have Tx(Transmit) on pin 3 and Rx(Receive)on pin 2.
Modems and similar equipment will normally be DCE(Tx on pin 2 and Rx on
pin 3, Female Plug). There are cables for connecting DTE to DTE, DCE to
DCE, and DTE to DCE. ALOT of serial connection problems are caused by
connecting RX to RX and TX to TX, instead of TX to RX.
The
manual for
the TM400 says that it is DTE, however, it also says that it has Tx on
pin2, which would be typical of a DCE.I am assuming that they meant put
DCE, and the pinning they list is correct.
By swapping, I means
trying both a straight (pin/port 2 in one end is pin/port 2 on the
other), and a twisted cable(0-Modem cable, pin/port 2 in one end is
pin/port 3 in the other. If I interpret the manual correctly, you
should be using a female- femail cable, not twisted (this is bloody
unusual, a female - female cable is normally twisted) Did the cable
come with the unit, if so, just use it and don’t think about pinning.
When looking in the manual, there is some additional strangeness:
"
In this implementation, pin 7 ‘CTS’ means what is says, namely, this is an outputcontrol line, and when the TM-350/400 asserts this control line ‘true’ the host cantransmit to the TM-350/400. On the other hand, pin 8 ‘RTS’ is not quite what itmay seem because this is a signal input to the TM-350/400, and it is intended thatthe host should assert this line ‘true’ only when the TM-350/400 is allowed totransmit data to the host. The TM-350/400 does not generate an RTS ‘request-tosend’as such for the host PC, so the host should assert pin 8 true whenever theTM-350/400 is allowed to transmit to the host, without being asked to do so." (ch9.2)
Looks
like this instrument needs hardware flow control. I have never used
that before, first instrument besides a modemand IC 485 interfaces I
have had anything to do with that required it. RTS and CTS can be used
in different ways, but as far as I can see the description above fits
with what labview will do if you select flow control as
RTS/CTS.
Try at least. I hope the manufacturer provided a cable, because CTS/RTS
has the same Twisted/Not twisted issues as RX TX. (Also means you can’t
use the three wire temporary test cables that you often find around an
el.lab.)
The code your sending looks correct, and as far as I
can see the VI you originally posted sends the input string correctly
when your HextoString is included. If you know address one is correct
for the instrument, probably better to use that then 0 (I noticed the
manual does not say an instrument will reply to address 0, just act on
it. Prolly a broadcast address). If you use 0, remember to adapt the
checksum.
Turn on hardware flow control and see what you get. I hope that is readable and/or useful. Getting a bit late here.