Hi,
I need to be able to send active alarm to the PLC for data collection purposes.
Is this possible?
Thanks,
Tom
Hi,
I need to be able to send active alarm to the PLC for data collection purposes.
Is this possible?
Thanks,
Tom
More information would be helpful. Controller type, what kind of alarms? User alarms, robot alarms, robot warnings, messages, etc.
We do this all the time and have been for a long time. So yes it is possible. Just depends how much money you want to spend. Nothing's free with Fanuc!
Could be done with a dedicated option called Error Code Output (or sth like that), or by accessing robot registers via SNPX, or by creating a small KAREL program to copy a fault code to a GO...
I know a free option which sends the error code to the PLC and is working.
1. Do controlled start and set $TPP_MON.$GLOBAL_MT=2
2. Function, Start Cold
3. Make a condition monitor (for example cond_error)
Quote1: WHEN UO[6:Fault]=ON+,CALL ERROR_OUTPUT ;
2: WHEN UO[6:Fault]=OFF-,CALL ERROR_OUTPUT ;
4. Menu, 0, Status, Type: Condition
5. You see the screen "Program Monitor" now. Press F2 or 'System"
6. As CH Program, select cond_error
7. In the condition program, you called error_output, so make this program:
Quote1: CALL ERROR_TO_REG(51) ;
2: MONITOR COND_ERROR ;
The number (51) is in my program, you can address whatever register you want (use an unused one ), you need 2 registers. So 51 and 52 in this case...
8. Make a karel program:
QuoteDisplay MorePROGRAM error_to_reg
%NOLOCKGROUP
%NOPAUSE= COMMAND + TPENABLE + ERROR
%NOBUSYLAMP
%NOABORT = ERROR + COMMAND
%COMMENT= 'ERROR SEND'VAR
par_no,par_typ,par_int,int_reg:INTEGER
par_real:REAL
par_str:STRING[10]seq_num,error_code,cause_code,time_int,severity,STATUS :INTEGER
error_string,cause_string,prog_nam:STRING[40]
prog_stop:BOOLEANBEGIN
par_no=1
GET_TPE_PRM(par_no,par_typ,par_int,par_real,par_str,STATUS)
IF (par_typ=1) AND (STATUS=0)THEN
int_reg=par_int
ENDIFERR_DATA(MAXINT, error_code, error_string, cause_code, cause_string, time_int,severity, prog_nam)
SET_INT_REG( int_reg,error_code/1000,STATUS)
SET_INT_REG( int_reg+1,error_code MOD 1000,STATUS)END error_to_reg
Load this program into the controller, make sure karel is accepted
Cond_error monitors when alarm is true. If true, call program error_output.
Error_output activates error_to_reg.
Now you have 2 codes in R51 and R52. In your alarm manual the code is in 2 parts.
For example R[51] = 11 and R[52] = 001, when you look it up, it is SRVO ESTOP
To send it to the PLC, write R[51] and [52] to a GO....
Thank you for suggestions, I will try them next week.
Tom
I tried this dewitm but not sure if I am doing somethign wrong. My UALM do not get written to the register. Does this only work for the other alarms?
Could be done with a dedicated option called Error Code Output (or sth like that), or by accessing robot registers via SNPX, or by creating a small KAREL program to copy a fault code to a GO...
"...or by accessing robot registers via SNPX, ..."
Which registers?
The Karel-Program cant compiled:
SET_INT_REG( int_reg,error_code/1000,STATUS) return a failure (data type error)
Use SET_INT_REG( int_reg,error_code DIV 1000,STATUS) instead
Which PLC are you using?
Is the robot communicating with the PLC via hardwired IO, EthernetIP, CC-Link, etc?
Do you want all active alarms, or only the most recent alarm? (The one you would see on the message banner on the TP)
If you are communicating with the PLC via EthernetIP, the PLC can read the most recent active alarm using explicit messaging. This would get you the fault code and fault description in a string variable.