Home AMX User Forum AMXForums Archive Threads AMX Applications and Solutions

RS232 big problem! Really need help

Hi guys...i'm in real trouble. Here's the situation: I have to control a MV-40F quad split.
Here's what the datasheet says:

Baud rate 9600
Data bits I
Start bit 1
Stop bit 1
Parity None
X parameter( flowc ontrol) None
Synchronization Star t-stop( asynchro nous)

Here's my ONLINE EVENT:
    ONLINE:
    {
	SEND_COMMAND DATA.DEVICE,'SET BAUD 9600,N,8,1 485 DISABLE'
	SEND_COMMAND DATA.DEVICE,'HSOFF'
	SEND_COMMAND DATA.DEVICE,'XOFF' 
    }

But nothing happens...what's wrong?


Please help!!!

Comments

  • What do you mean 'nothing happens'?

    Do you have any other code to look at?
  • I'm not familiar with that device, but are you sure there's only one data bit? I'm not sure the AMX serial ports support only 1 data bit. I believe the only options are 7 or 8.

    --D
  • It's not 1 data bit, it's I data bits. I is quite close to 8 on my keyboard.
  • Spire_JeffSpire_Jeff Posts: 1,917
    When dealing with a new serially controlled device, I always like to start by connecting to it directly with my laptop and verifying that the device communicates as expected. This lets you easily change the baud rate and other settings quickly until you find the correct parameters. You can also send a few commands to verify that the unit responds as you expect.

    Jeff
  • Spire_Jeff wrote:
    When dealing with a new serially controlled device, I always like to start by connecting to it directly with my laptop and verifying that the device communicates as expected. This lets you easily change the baud rate and other settings quickly until you find the correct parameters. You can also send a few commands to verify that the unit responds as you expect.

    Jeff

    It's 8, you're right...sorry.
    In the string event i receive the same string i've sent...seems like an echo. I should receive an ACK or a NACK instead. The only thing i would like to know now is: shoul i use a differente onlinw event?
  • The extract of your online event looks ok at first glance.

    Without knowing a bit more about the box - ie pinouts, I suggest you start a terminal session using, say, Hyperterminal and prove a few things with your existing cabling.

    Force 9600,n,8,1 on a serial port and issue the exact string you are trying to send from NetLinx.

    See what you get in terminal. Check the manual for error responses - ie if your outbound string is not formatted correctly does it ignore you, NACK you, or return the invalid string to you. Some boxes do this.

    If the manual says it only NACKs - regardless of the 'correctness' of your outbound string and you get your string back, perhaps check your cabling.

    Report back with your findings if you like
  • DHawthorneDHawthorne Posts: 4,584
    lattanzi wrote:
    It's 8, you're right...sorry.
    In the string event i receive the same string i've sent...seems like an echo. I should receive an ACK or a NACK instead. The only thing i would like to know now is: shoul i use a differente onlinw event?
    If the device itself doesn't automatically echo (some do, but it's not real common) you either have the transmit and receive reversed on your cable, or you have a short between them. If your TX and RX lights on the controller flash at the same time, they are shorted. If just one flashes, reverse them on your connector.
  • RS232 Problem

    Use the following data event if you are using standard RS232:

    ONLINE:
    {
    SEND_COMMAND DATA.DEVICE,'SET BAUD 9600,N,8,1'
    }

    Using the 485 Disable modifier makes the output RS422 as I remember.
  • yuriyuri Posts: 861
    tom goez wrote:
    Use the following data event if you are using standard RS232:

    ONLINE:
    {
    SEND_COMMAND DATA.DEVICE,'SET BAUD 9600,N,8,1'
    }

    Using the 485 Disable modifier makes the output RS422 as I remember.

    it does? :/
  • Hi Yuri,
    In the past i post a tread with a tip to find the TXD and RXD line on a serial port.
    see thread 1052.
  • tom goez wrote:
    Use the following data event if you are using standard RS232:

    ONLINE:
    {
    SEND_COMMAND DATA.DEVICE,'SET BAUD 9600,N,8,1'
    }

    Using the 485 Disable modifier makes the output RS422 as I remember.


    232 and 422 are available simultaneously (except when in 485) mode. They each have unique pins on the connector. 232 uses 2,3,5,7,8 and 422 uses 1,4,5,6,9.

    --D
  • dchristo wrote:
    232 and 422 are available simultaneously (except when in 485) mode. They each have unique pins on the connector. 232 uses 2,3,5,7,8 and 422 uses 1,4,5,6,9.

    --D
    To be 100% accurate, the 232 functionality is always available. The 422 pins are 422/485 based on the 485 DISABLE|ENABLE part of the SET BAUD command. The real difference is that when 485 is enabled, the TX+ and TX- pins are HI-Z when data is not being transmitted, since the 485 bus is a multi-drop configuration (i.e. multiple transmitters on the same wire).

    So 232 should always function, regardless of what the 485 mode is. If 485 is disabled, the TX+ and TX- pins are always enabled. If 485 is enabled, the TX+ and TX- pins are not always enabled.

    You should not have 232 and 422/485 receive pins BOTH connected to equipment, as they both feed into the same receiver circuits. There will not be any physical damage if they are both connected, just that the data can be erroneously received if both equipment transmit simultaneously.

    Chuck
Sign In or Register to comment.