Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next 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.7K RobotStudio
- 402 UpFeed
- 21 Tutorials
- 16 RobotApps
- 307 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 251 ScreenMaker
- 2.9K Robot Controller
- 368 IRC5
- 92 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 859 RAPID Programming
- 43 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings