Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Fanuc R-30iA controller send data from Notebook

Fanuc R-30iA controller send data from Notebook

Fanuc R-30iA controller send data from Notebook

Hi All,
I'm having problems with sending data to Fanuc M-10iA robot with R-30iA controller. I'm trying to use RS232 interface. I don't have COM port in my notebook and I'm trying to use USB RS232 adapter (cheap one, Prolific chipset).

I made a following cable:

25 pin male connector
9 pin female connector

2 >--------------------------------------------------------------------------------------------------------------< 2

3 >--------------------------------------------------------------------------------------------------------------< 3

7 >--------------------------------------------------------------------------------------------------------------< 5

6 >--
8 >--
20 >--

4 >--
5 >--

I wrote following program in Karel, compiled using Roboguide and put it through FTP on Robot:

PROGRAM read_rs

file_status :INTEGER
xs :STRING[1]


--set transmission parameters
-- set transmission without handshaking

OPEN FILE RS232 ('RW', 'P2:')

file_status = IO_STATUS(RS232)
IF (file_status<>0) THEN
WRITE TPDISPLAY('Failed to open the file = ',file_status, CR)

READ RS232(xs)
CNV_STR_INT(xs, x)


END read_rs

Finally I am using HyperTerminal for sending data from notebook. When I run my read_rs program from teach pendant it stops executing on line with command READ RS232(xs). I mean it not stops it is still runing but I can wait for ages and no data is coming onto TPDISPLAY. Occasionally I am getting error "DSR off when transmission..."

I can't figure out what can be wrong. Any help appreciated. Thanks in advance!

RE: Fanuc R-30iA controller send data from Notebook


I think you may be lacking some signals the Fanuc is demanding. Often industrial controllers use the handshake lines.

Check this link for detailed explanation of the various signals:
Signal descriptions

And this link for the correct handshake connections:
Cable schedule

There is also a distinct possibility that your USB to RS-232 adapter doesn't work. I have had EXACTLY 50/50 odds on them working correctly. So much so that the last 232 related job I did I went to Fry's and picked two (they're cheap) different ones, brought them back and sure-enough one didn't cut it and the other worked flawlessly.

So at the least you need to confirm yours is working right by looping it back to itself to see if characters are leaving and being received. Or use a scope to confirm it. A scope can also help to make sure your baud rate is what it should be.

Lastly download MTTTY and use it instead of the hopelessly crappy POS hyperterminal.
MTTTY.zip a better Terminal program

Keith Cress
kcress - http://www.flaminsystems.com

RE: Fanuc R-30iA controller send data from Notebook

Also use a scope, right on the wires, to check the signal voltages.
A lot of PC 232 ports (and I'm guessing USB adapters) assert signals to +5V and -5V, or even +5V and 0V, which is not really compliant with the standard's +12V and -12V.
I.e., it's possible that your robot is (correctly IMHO) more fussy about RS232 conformance than is your average PC designer.

You might also want to use an isolating RS232 interface (see blackbox.com for a selection), because industrial controls sometimes have a different 'ground' voltage than a PC does. I have seen machine tool controller grounds driven at 120VAC relative to a building ground, so you were okay if you plugged your printer into the orange receptacle on the machine, but if you plugged it in anywhere else, your printer smoked. So I always use an isolator to protect the PC.

Mike Halloran
Pembroke Pines, FL, USA

RE: Fanuc R-30iA controller send data from Notebook

Thanks for replies. I downloaded MTTTY terminal and hooked up a scope. Here is a picture of what I got when I was sending "5" constantly from MTTTY.

As you can see the peak voltages are approx. 10V and - 10V I think that such voltages should be acceptable for robot controller. I also made a loopback on my cable and got back in the terminal every char that I sent. However I still can't manage to receive data on Fanuc Teach Pendant. Sometimes I get error "DSR off when transmission" but sometimes program just wait for ages at the line READ RS232(xs). Can anyone take a look at my code? Is it ok?

To check what is going on with this "DSR" errors I measured voltage on pin 20 in DB25 male connector (that is on Robot side). There is a about 0.8V there. As far as I know there should be some significant voltage supplying bridged 6 and 8 pins with proper signal. Maybe I should use a full, null modem cable with handshaking instead?

RE: Fanuc R-30iA controller send data from Notebook

The best character for viewing on the wire is a lowercase 'u', which is all edges.

One of Keith's points was that you may have to actually implement the full handshake(s) instead of using arbitrarily bridged null modem cables. I agree; you need to fully read the interface specs of all involved devices in order to figure out what to do.

Mike Halloran
Pembroke Pines, FL, USA

RE: Fanuc R-30iA controller send data from Notebook

Off hand I don't see anything wrong with your code though I'm not a Karel writer.

I would expect that Fanuc to require ALL handshake lines. Use a full modem cable NOT a null modem cable. I gave you a link already, showing the handshake lines you likely need. This all fits with your port appearing to transmit and loop back but waiting forever for a response.

Keith Cress
kcress - http://www.flaminsystems.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close