Author Topic: Serial Comunication with AB Ultra 3000 Servo  (Read 27173 times)

cthompson

  • Newbie
  • Posts: 7
    • View Profile
Serial Comunication with AB Ultra 3000 Servo
« on: July 31, 2013, 11:30:25 AM »
I am trying, with no success, to send commands to an Allen Bradley Ultra 3000 from an F2424 through the Comm 1 Port.
The AB host command manual shows the data format as
Start    Address    Parameter    Function    Data    Checksum    End
  :           aa             ppp                 f             dd          cc        <cr>, where all commands begin with a colon (0x3A), and terminate with a carriage return (0x0D).  I can successfully send out a command such as :0006110375 though hyperterminal.  The hyperterminal has to be set with the following parameters:

Emulation is set to VT100

ASCII SETUP:
Selected (checkmark)                                   Not Selected (no checkmark)
Echo typed characters locally                       Send line ends with line feeds
Append line feeds to incoming line ends      Force incoming data to 7 bit ASCII
Wrap lines that exceed terminal width

The Ultra 3000 com port is set to 38,400 baud, 8 data bits, No parity, 1 stop bit, No Flow Control.
The connection to the PC was made with a null modem adapter, which was also used when connecting to the F2424.
I have a string of commands that when issued on the PC will initiate motion on the servo drive, but do nothing from the F2424.

As an example, my code uses the Print Command;   PRINT #1 ":0006110375" and sets a timer for 5 seconds after which time the command A$ = INPUT$(1) is issued.  There is nothing written to A$, and there is no motion when going through the full string of commands.  I have tried this with every variation of the SETPROTOCOL Command, including no protocol.  I read another post on the forum, and also tried changing the commands to
PRINT #1 ":0006110375\0D\0A"
This variation also received no response.
I am trying to find out if there is an error with my formatting of the command, or if the F2424 is capable of sending the command the same way the VT100 emulation does on hyperterminal.
Sorry for the long post, but i wanted to give aas much information as possible.  I appreciate any help regarding this matter.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Serial Comunication with AB Ultra 3000 Servo
« Reply #1 on: July 31, 2013, 05:33:27 PM »
This appears to be an ASCII string. F2424 has no problem sending out such a string.

You said you connect the Ultra 3000 to the PC using a null modem cable?  The PC to F2424 is normally made with a straight through cable. This suggest that F2424 should be connected to Ultra 3000 using a straight through cable instead of a null modem cable.

Did you try to switch the Tx and Rx pin connection between the F2424 and the Ultra 3000. That should work immediately if the cause is due to wrong cabling.

You can connect the F2424 to the PC and run Hyperterminal and when you trigger the F2424 you should see the characters appear on the Hyperterminal screen.  That will let you know if your logic combination did trigger the F2424 to send out the string through the COMM1 port.

Also note that F2424 has Red and Green LED indicator for all its 3 COMM port and you can check the LED to see if there is any data being output from the PLC.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

cthompson

  • Newbie
  • Posts: 7
    • View Profile
Re:Serial Comunication with AB Ultra 3000 Servo
« Reply #2 on: August 02, 2013, 12:33:33 PM »
According to the Ultra 3000 Hardware Manual, for RS232 Communication, Pin 2 is RS232 Input or RCV, Pin 3 is RS232 Output or XMT, and PIN 5 is common.  The Integration manual specifically states to use a null modem cable when connecting to a PC serial port, and i have verified that i can only communicate from the PC to the Ultra 3000 using the null modem adapter.  A diagram, which i have attached, shows Pin 2 of the Ultra 3000 connected to Pin 3 of the PC, and Pin 3 of the Ultra 3000 to Pin 2 of the PC.  I have looked for a pin out diagram for the F2424, but have not found it.
The Ultra 3000 uses something called Ultra Host Protocol for Communications.  Not sure exactly what this is. It also states that it implements the standard NRZ asynchronous serial format.
Per your post, i connected the F2424 to the PC with the provided serial cable.  When i triggered the commands on the PLC, the output from the PRINT function showed up in hyperterminal exactly as they should when sent to the ULTRA 3000.  The program in the F2424 would also see any commands issued by hyperterminal and write them to a variable using the INPUT Function.
I have connected the F2424 to the ULTRA 3000 both with and without the null modem adapter, and have not been able to get the ULTRA 3000 to respond.  The green light on the F2424 flashes whenever a command is sent with either connection.
With further testing, i have realized that the ULTRA 3000 will only recognize commands from the PC when the hyperterminal emulation mode is set to VT100.  I am not sure exactly what this is, or if the F2424 is capable of this emulation, but it seems like this may be the problem.
I appreciate your time in looking at this, and await your response.  Thank you.
« Last Edit: August 02, 2013, 01:22:13 PM by cthompson »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Serial Comunication with AB Ultra 3000 Servo
« Reply #3 on: August 03, 2013, 01:30:04 PM »
I don't think the VT100 emulation is the cause of the Ultra 3000 not responding. VT100 is a terminal emulation protocol that handles special control characters so that you can send certain keystrokes to move the cursor, backspace etc. Text are still sent as pure 7 or 8 bit ASCII characters.

I suspect your Ultra 3000 may expect some other signals such as RTS/CTS, DSR/DTR to be present before it accepts incoming ASCII characters. You may like to short pin 7 to pin 8 and pin 4 to pin 6 on the Ultra3000 side of the connector. This fools the Utltra3000 into thinking that the signals are available and therefore it may accept the command and send a response. You should see the red LED on the F2424 blinks if the Ultra3000 does send a response.

To read the response back from the Ultra3000, you may need to put INPUT$(1) inside a loop until it reads a non empty string or give a time out after several thousands iteration of the loop if it still does not receive the response string.
« Last Edit: August 03, 2013, 01:30:56 PM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

cthompson

  • Newbie
  • Posts: 7
    • View Profile
Re:Serial Comunication with AB Ultra 3000 Servo
« Reply #4 on: August 04, 2013, 05:56:50 PM »
Will you provide a list or a diagram for the pin outs of the F2424 Com 1 Port?.  I did not see it in the user manual.  I want to determine if the null modem adapter is required based on the diagram provided in my previous post.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Serial Comunication with AB Ultra 3000 Servo
« Reply #5 on: August 05, 2013, 12:18:01 PM »
Only 3 signal pins are used for communicating with the F-series PLC via its RS232 port:

Pin 2: TxD from the PLC
Pin 3: RxD to the PLC
Pin 5: Ground


There are also an RTS/CTS connection to pin 7 & 8 of the DB9 connector. But these two signals are currently not used by the PLC for communication so you may ignore them.
« Last Edit: August 05, 2013, 12:20:40 PM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

cthompson

  • Newbie
  • Posts: 7
    • View Profile
Re:Serial Comunication with AB Ultra 3000 Servo
« Reply #6 on: August 06, 2013, 12:17:07 PM »
Thanks to your help and that of technical support, the problem has been resolved.  The solution was to connect only pins 2,3, and 5 and clip the wires for any other pins.  There must have been something that interfered with the RS232 communications with all pins on the straight through cable connected.  I can't speak highly enough about the level of support that has been provided both here and through technical support.  Both have gone above and beyond what most companies would to help with this problem.  Thank you very much.  I can now sleep again.  ;D