Forum Migration Notice
We're transitioning to a more modern community platform by the end of this year. Learn about the upcoming changes and what to expect.
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.6K RobotStudio
- 401 UpFeed
- 21 Tutorials
- 15 RobotApps
- 306 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.9K Robot Controller
- 364 IRC5
- 83 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 854 RAPID Programming
- 37 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 110 Collaborative Robots
- 5 Job listings