Is there a method to pass the "save" instruction when we have a error ?
Hi all,
I need to do regularly automatic save of some modules on IRC5. I think to use the "save" instruction for that, like this :
SAVE "PRG_MVT" \FilePath:="pc:/PRG_MVT.MOD";
The PLC call a service cycle where this "save" instruction is.
The "pc:/" is an external computer where a FTP server is running.
All It's work properly. But, if the FTP server is unavailable, the program stop and I can't use the Error handling method to inform the PLC.
My question :
Is there a method to pass the "save" instruction when we have a error ?
Which would allow me to do some action in function of the ERRNO content.
I would wish not to use the interrupt system with "CONNECT" instruction for this case. Just don't have a program stopped on a "SAVE" error.
thanks alot for your help
Best Answers
-
Few thoughts:
- If the FTP is a little unreliable, save to the local flash or HOME then, then use a background task to save to the FTP so production doesn't stop...
- Not sure what you're saving for, but figure it's worth mentioning the UnLoad with the \Save option for auto saving when unloading modules...
- RETRY re-executes the instruction which caused the error and TRYNEXT would skip the save and keep going...
1 -
Olivier,In your example, you miss the ERROR line, to start error handler.
PROC T_Serv3()<br> ErrWrite \W, "AUTO-SAVE", "sauvegarde automatique de PRG_MVT";<br> Save "PRG_MVT" \FilePath:="pc:/PRG_MVT.MOD";<br><i> </i><b><i>ERROR</i></b><br> TEST ERRNO<br> CASE ERR_IOERROR:<br> ErrWrite "SAUVEGARDE IMPOSSIBLE", "le dossier de sauvegarde automatique est inaccessible";<br> ENDTEST<br> ENDPROC
☑️2024 - RobotStudio® User Group1
Answers
-
Hello,It doesn't trig this error?
ERR_IOERROR
The save file cannot be opened because of denied permission, no such directory, or no space left on device.
☑️2024 - RobotStudio® User Group0 -
...and I can't use the Error handling method to inform the PLC.Can't or don't want to?
Example:
PROC Test_ErrorToPLC()
Save "PART_B"; ! will trigger an error for the test
ERROR
SetGO goPLC_ErrorSend,ERRNO; ! send error number to the plc, then the plc does whatever, stops the robot, displays error on hmi, etc., etc.
WaitUntil giPLC_ErrorReceived=ERRNO\MaxTime:=10\TimeFlag:=timeout; ! plc sends back the error number to signal that it's received
IF timeout ErrWrite "PLC Communication Error", "Robot controller failed to", \RL2:="communicate with the PLC.", \RL3:="Please contact support."; ! plc failed to respond
SetGO goReadyForOffsets,0; ! clear the error output
WaitTime 2; ! slight delay before a retry
RETRY;
ENDPROC
0 -
Thanks for your answer Denis.
In my first message, I haven't speak about many try I have already do.
One of this is :PROC T_Serv3()
ErrWrite \W, "AUTO-SAVE", "sauvegarde automatique de PRG_MVT";
Save "PRG_MVT" \FilePath:="pc:/PRG_MVT.MOD";
TEST ERRNO
CASE ERR_IOERROR:
ErrWrite "SAUVEGARDE IMPOSSIBLE", "le dossier de sauvegarde automatique est inaccessible";
ENDTEST
ENDPROCIn this case, I hoped do a error handler after the "save" instruction but the robot program stop on the "save" instruction if the path of file is wrong.
----------Hi soup,
Thanks for your answer.
The problem is that if the path is wrong (for example FTP server down) the robot program stop on the "save" instruction and the production stop too.
Inform the PLC is useful but it's not yet my first problem.
I search a method to pass the "save instruction" in case of error. Or a method to restart the program just after the "save" instruction in case of error.0 -
thanks for your quick answer soupe.
My goal is to follow all robots program changes by comparing the robot program each day with the program of day before. In my factory, everybody can change à move path in program without inform anybody.
The idea is to put each day some module on computer where a dos/batch script will automatically compare module of day to detect a change and inform my service.
This is all the storyNow, I will try your option "TRYNEXT" and I come back to you.
0 -
PROC T_Serv3()<br> ErrWrite \W, "AUTO-SAVE", "sauvegarde automatique de PRG_MVT";<br> Save "PRG_MVT" \FilePath:="pc:/toto/PRG_MVT.MOD";<br> ERROR<br> TRYNEXT;<br> ENDPROC
TRYNET was the instruction that I was looking for. Thanks soup.
I have just test this code and it's ok !
.
.
DenisFR said:Olivier,In your example, you miss the ERROR line, to start error Handler.That's right Denis. That is the reason why my robot program stop on an error without test the ERRNO value.
I'm very new in ABB programming and I had not understood the error handler system.But now it's ok !
Thanks alot for your help.
.
soup said:I like the idea. Could have the PLC signal for a robot controller backup each night -- keep watch on all the system files too and always have a recent backup if you need to restore.Yes soup. It's the best way. But at this moment, we have few robot with a RobotWare 6.05 and we have a lot of RobotWare 5.09 who haven't the "backup" in "action" of input.
That why I must use the SAVE / ERROR / TRYNEXT solution.
And I was looking for a solution for S4C too. And I think I can use the same solution on these S4C.0 -
Ok soup.
I will try this on a S4C as soon I have a S4C free of production.
I'll come back here to inform you about the result of my try.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)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings