Send error domain, number and title to PLC
Hi all,
I'm doing an application in which I have to detect errors and then send error domain, number and title to PLC trough Profinet. I'm not too expert in RAPID/RobotStudio, so I have 3 questions.
1) Is what I've written until now correct and the correct way for detecting errors? I wrote the following code in a semi-static parallel task:
I'm doing an application in which I have to detect errors and then send error domain, number and title to PLC trough Profinet. I'm not too expert in RAPID/RobotStudio, so I have 3 questions.
1) Is what I've written until now correct and the correct way for detecting errors? I wrote the following code in a semi-static parallel task:
VAR intnum err_interrupt;
VAR errdomain err_domain;
VAR num err_number;
VAR errtype err_type;
VAR trapdata err_data;
VAR string titlestr; PROC main()
IF first THEN
IDelete err_interrupt;
CONNECT err_interrupt WITH trap_err;
IError COMMON_ERR, TYPE_ALL, err_interrupt;
first := FALSE;
ENDIF
........
" 2) the main is doing also other things like reading the robot position continuosly, would be better to have a task only for errors management?"
.........
" 2) the main is doing also other things like reading the robot position continuosly, would be better to have a task only for errors management?"
.........
ENDPROC
3) At the moment I'm sending to PLC only the error domain and number, how can I send a string?
Thank you a lot in advance!
TRAP trap_err
GetTrapData err_data;
ReadErrData err_data, err_domain, err_number, err_type \Title:=titlestr;
SetGO GO_ErrDomain, err_domain;
SetGO GO_ErrNumber, err_number;
ENDTRAP
3) At the moment I'm sending to PLC only the error domain and number, how can I send a string?
Thank you a lot in advance!
Tagged:
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings