Welcome, Guest. Please login or register.
Did you miss your activation email?
December 04, 2008, 04:09:06 AM
Home Help Search Calendar Login Register
News: Any Problems or Experience with Industrial Robots ?
Register and place your Question to worldwide Robotexperts right here !

+  Robotforum | Support for Robotprogrammer and Users
|-+  Robot Help and Discussion Center
| |-+  Fanuc Robots (Moderators: Sven Weyer, Jim Tyrer)
| | |-+  Mapping Error Code to Digital Outputs
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Mapping Error Code to Digital Outputs  (Read 319 times)
Professor_J
Jr. Member
**
Offline Offline

Gender: Male
Posts: 76



« on: January 23, 2008, 03:35:11 AM »

Has anyone ever mapped the Fanuc error codes to PLC via digital Outputs?

I've come up with a Karel program to capture the error code etc but I'm having trouble getting it out to the PLC, due to the size of the error code number.

The error code is 5 digits, so 99999 is the maximum number. This requires 17 "bits" in binary.

I was initially going to map it to the PLC by configuring the digital outputs into a Group Output and then writing the error code to it, however I have now discovered that 16 is the maximum length of a group output, it won't accept 17.

Does anyone know of any easy way to convert an integer number into binary in Karel. If I could do this I could easily use the individual "bits" of the error code to bring on the individual outputs..

I'm no Karel expert but I couldn't find any integer to binary conversion instructions..

Any help would be appreciated... Thanks
Logged
scotch99
Newbie
*
Offline Offline

Posts: 34


« Reply #1 on: January 23, 2008, 09:31:49 AM »

Hi.
I think I have some idea. You can create one program that makes conversion dec-bin like it's made in normal way - it means dividing your number by consecutive powers of 2. Result of each division you can store in consecutive register and at the end you can map your registers to DOUT's.
I hope you know what I mean. If you have any further questions don't hesitate.
Logged
Professor_J
Jr. Member
**
Offline Offline

Gender: Male
Posts: 76



« Reply #2 on: January 23, 2008, 08:55:23 PM »

I ended up just creating two group outputs, one 10 points long the other 7. I then did split the error code as shown below..

--Separate the error code into
  -- Upper/lower halves.
  error_lwr = error_code MOD 1000
  error_upr = error_code DIV 1000
 
   --Map it to PLC..
  GOUT[9]= error_lwr
  GOUT[10] = error_upr

Logged
Vlad
Jr. Member
**
Offline Offline

Posts: 58


« Reply #3 on: January 28, 2008, 10:42:31 AM »

Use the "Error code output" option?
Logged
Professor_J
Jr. Member
**
Offline Offline

Gender: Male
Posts: 76



« Reply #4 on: January 28, 2008, 08:48:14 PM »

Thanks for that, I actually never knew there was an Error Code Output option. However, none of our robots have it so we'd need to pay to get it installed..

Thanks anyway..
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!