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.
…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
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
ENDPROC
In 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.
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 story
Now, I will try your option “TRYNEXT” and I come back to you.
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.
In your example, you miss the ERROR line, to start error handler.
PROC T_Serv3()
ErrWrite \W, "AUTO-SAVE", "sauvegarde automatique de PRG_MVT";
Save "PRG_MVT" \FilePath:="pc:/PRG_MVT.MOD";
__*ERROR*__
TEST ERRNO
CASE ERR_IOERROR:
ErrWrite "SAUVEGARDE IMPOSSIBLE", "le dossier de sauvegarde automatique est inaccessible";
ENDTEST
ENDPROC
PROC T_Serv3()
ErrWrite \W, "AUTO-SAVE", "sauvegarde automatique de PRG_MVT";
Save "PRG_MVT" \FilePath:="pc:/toto/PRG_MVT.MOD";
ERROR
TRYNEXT;
ENDPROC
TRYNET was the instruction that I was looking for. Thanks soup.
I have just test this code and it’s ok !
.
.
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
.
.
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.