Home AMX User Forum AMXForums Archive Threads AMX Hardware

RS232 Loopback Plug

jjamesjjames Posts: 2,908
I'm wanting to create a loopback plug - kinda like the ones used in training - but I know it can't be as simple as crossing the transmit and recieve; so could someone help me out with the wiring?

AMX doesn't happen to sell the loopback plugs do they? If not, would anyone agree that perhaps they should? Like in packs of 10 or something?

Comments

  • HedbergHedberg Posts: 671
    It's as simple as that. Just short #2 and #3 on a typical DB9. You can do #7 and #8 if you need CTS/RTS.
  • DHawthorneDHawthorne Posts: 4,584
    Well actually, it could be that simple, or nearly so anyway :). Cross transmit and receive, and if you need to work with hardware handshaking, add a cross between RTS and CTS. For non-AMX devices, you might have to add a third cross between DSR and DTR, but AMX devices don't use those at all. B&B Electronics has some good references since they sell a boatload of RS-232 port converters and devices, here's a nice diagram from them:

    http://www.bb-elec.com/images/modemcrossdb9.gif
  • jjamesjjames Posts: 2,908
    Hedberg wrote:
    It's as simple as that. Just short #2 and #3 on a typical DB9. You can do #7 and #8 if you need CTS/RTS.
    Cool - but do I need 7 & 8? All I'm doing is just going to plug it into the back of an NI-3000 and send strings out and recieve them back on the same port, just for diagnostic purposes.
  • HedbergHedberg Posts: 671
    No, 7 and 8 won't be necessary in that case unless you set HSON for that port. Even if you set HSON (hardware handshaking for RTS and CTS -- default is HSOFF), I think it will still transmit and receive though I'm not absolutely positive on that.
  • *Begin Shamless Sales Pitch*

    AMX does sell the STS-DB9 Serial-to-Screw Termial Adapter (FG959). Together with a simple broken paperclip shorting pins 2 and 3 work extremely well for looping back rs-232 strings.

    *End Shamless Sales Pitch*
  • Chip MoodyChip Moody Posts: 727
    Hedberg wrote:
    No, 7 and 8 won't be necessary in that case unless you set HSON for that port. Even if you set HSON (hardware handshaking for RTS and CTS -- default is HSOFF), I think it will still transmit and receive though I'm not absolutely positive on that.

    It will do either only one of those, or neither. (I.E., It may transmit, but not allow incoming characters to propogate to your buffer, or it won't transmit in the first place - I'm leaning towards the latter)

    - Chip
  • DHawthorneDHawthorne Posts: 4,584
    I'm reasonably sure RTS/CTS only effects transmit. RTS is to signal you are Ready To Receive (output), telling your connected device it's OK to transmit, but having no effect on your own tranmission. CTS connects to your device's RTS, so when it goes high, you are Clear To Send (input). Neither affects whether you can actually receive, only whether the other should transmit. DSR and DTR are the lines affecting receive, and in a full-blown hardware handshaking, both pairs would be used. AMX RS-232 ports don't use DSR/DTR at all.
  • HedbergHedberg Posts: 671
    I'm certainly no expert on rs232 hardware flow control, but this is what I understand:

    RTS on an AMX serial port is pin #7, CTS is pin #8. With HSON, the AMX controls the RTS (i.e. signal on AMX pin #7) and expects the device on the other end to control the CTS (i.e.the signal on AMX pin #8). Each signal can have one of two values: -12v or +12v.

    If AMX Pin #8 has a value of +12v, that is an indication from the other end that it is OK to transmit. If it has a value of -12v, the AMX port is not supposed to transmit.

    Likewise, if the AMX sets the voltage on Pin #7 to -12v, the device on the other end should stop transmission. If AMX sets it to 12v, transmission is ok.

    So, what does the AMX do if pins 7 and 8 are not connected? Should it transmit if the other end has not set the voltage on pin 8 to either +12v or -12v (which it can't do if pin # 8 is not connected)? I have not tested this very well, but I believe that I have observed an AMX communicating just fine with HSON on the AMX port and only using pins 2,3, and 5 which would make it impossible for the device on the other end to set the voltage on the AMX pin #8.

    This happened (as I recall) because instructions that I had indicated that a Clear One (Gentner) device would be set up with flow control enabled (the default for that device). I set HSON for that port, but the installers only ran a 3 conductor wire so comm with the device didn't work. We turned flow control off on the Clear One device and communications started to work fine even though the AMX port still had HSON. I then set HSOFF for that port even though it may have continued to work with HSON. I think that it would put the world off balance to leave the AMX set to flow control with the Clear One device set for no flow control. I wouldn't want that on my conscience.

    What I guessed from this is that if the AMX port has HSON and neither +12v or -12v is detected on pin #8, the AMX port will transmit as if it is set HSOFF. This is not the way that the Clear One device behaved. My impression is that that device wouldn't send unless it received its +12v signal on its pin #7. I haven't had occassion to test this again, so I'm not sure if I'm correct -- I could have, as our president might say, misunderestimated the situation.
Sign In or Register to comment.