On this matter I have found a bug maybe.
I want to make backups to the USB drive but aren’t able to write the backup to the disk. It keeps writing the backup to the HDD of the Robot and not the USB.
I have changed the System parameters (Configuration - I/O System - System Input - Argument 3) to RemavableDisk1 (the same directory allocation that I use for the saving of the modules, which is working 100%, but it does not work the same with the Backup Function.
Has anyone encountered the same issue?
See attached my rapid code for the backup.
! Maintenance Procedure for 2nd Step.
LOCAL PROC Miscellaneous_Routines_List()
VAR num nDummy;
VAR string sDummy;
nDummy:=UIListView(\Result:=button_answer,\Header:="",liMySysRoutList\Icon:=iconInfo\MaxTime:=nMaxtime\BreakFlag:=Err_Var);
TPErase;
TEST nDummy
CASE 1:
IF DOutput(doStation1)=1 WireChange\Station1;
IF DOutput(doStation2)=1 WireChange\Station2;
IF DOutput(doStation1)=0 AND DOutput(doStation2)=0 THEN
TPPrint " ";
TPReadFK nDummy,CENTER(" WIRE CHANGE"),"","STN 1","","STN 2","";
TPErase;
TEST nDummy
CASE 2:
WireChange\Station1;
CASE 4:
WireChange\Station2;
ENDTEST
ENDIF
CASE 2:
GasChange;
CASE 3:
IF diBackup=0 OR diBackup=1 THEN
SetDO doBackup,1;
WaitDO doBackup,1;
WaitDI diBackup,1;
SetDO doBackup,0;
WaitDO doBackup,0;
ENDIF
TPErase;
IF Check_OS(OS)="VIRTUAL CONTROLLER" THEN
TPWrite Check_OS(OS);
SysMods\Saving;
SaveCfgData "HOME:/Configuration Files/CFG Files",ALL_DOMAINS;
WaitTime 0.5;
IDelete intBackup;
CONNECT intBackup WITH tBackup;
ISignalDO BackupInProgress,1,intBackup;
IF RobOS() THEN
CloseDir directory;
OpenDir directory,"HOME:/Backup";
IF IsFile("HOME:/Backup/MMD_Africa_RW6.09.02.00") THEN
RemoveFile "HOME:/Backup/MMD_Africa_RW6.09.02.00";
ELSE
MakeDir "HOME:/Backup/MMD_Africa_RW6.09.02.00";
ENDIF
CloseDir directory;
ELSE
RemoveDir "HOME:/Backup";
MakeDir "HOME:/Backup";
ENDIF
ENDIF
IF Check_OS(OS)="REAL CONTROLLER" THEN
IF diBackup=0 OR diBackup=1 THEN
SetDO doBackup,1;
WaitDO doBackup,1;
WaitDI diBackup,1;
WaitDO BackupInProgress,1;
WaitUntil BackupInProgress=0;
SetDO doBackup,0;
WaitDO doBackup,0;
ENDIF
TPWrite Check_OS(OS);
SysMods\Saving;
SaveCfgData "RemovableDisk1:/Configuration Files/CFG Files",ALL_DOMAINS;
WaitTime 0.5;
IDelete intBackup;
CONNECT intBackup WITH tBackup;
ISignalDO BackupInProgress,1,intBackup;
IF RobOS() THEN
CloseDir directory;
OpenDir directory,"RemovableDisk1:/Backup";
IF IsFile("RemovableDisk1:/Backup/MMD_Africa_RW6.09.02.00") THEN
RemoveFile "RemovableDisk1:/Backup/MMD_Africa_RW6.09.02.00";
ELSE
MakeDir "RemovableDisk1:/Backup/MMD_Africa_RW6.09.02.00";
ENDIF
CloseDir directory;
ELSE
RemoveDir "RemovableDisk1:/Backup";
MakeDir "RemovableDisk1:/Backup";
ENDIF
ENDIF
CASE 4:
CalPos_Move;
Stop;
CASE 5:
CheckIfHome;
bOperator:=FALSE;
CASE 6:
SysMods\Saving;
WaitTime 0.5;
CASE 7:
SaveCfgData "HOME:/Configuration Files/CFG Files",ALL_DOMAINS;
WaitTime 0.5;
CASE 8:
TPErase;
TPReadFK nDummy,"","","CLEAR REPORT","","DISPLAY REPORT",""\MaxTime:=nMaxtime\BreakFlag:=Err_Var;
TPErase;
TEST nDummy
CASE 2:
sRep_Job_No{2}:=sClear;
sRep_PartDes{2}:=sClear;
sRep_PartNo{2}:=sClear;
sStartTime:=sClear;
sStartWeekday:=sClear;
sStartDate:=sClear;
sEndTime:=sClear;
sEndWeekday:=sClear;
sEndDate:=sClear;
sRep_OperOnDuty{2}:=sClear;
nReadTime:=0;
TPPrint "DATA IS CLEARED";
CASE 4:
WaitTime 0.1;
TPPrint "JOB NO : "+sRep_Job_No{2};
TPPrint "PART : "+sRep_PartDes{2};
TPPrint "PART NO : "+sRep_PartNo{2};
TPPrint "START : "+sStartTime+sGap+sStartWeekday+sGap+sStartDate;
TPPrint "END : "+sEndTime+sGap+sEndWeekday+sGap+sEndDate;
TPPrint "OPERATOR : "+StrMap(sRep_OperOnDuty{2},STR_LOWER,STR_UPPER);
TPPrint " : "+ValToStr(nReadTime/60)+" MIN";
TPPrint " : "+ValToStr(nReadTime/60/60)+" HRS";
TPPrint "****************************";
TPPrint "PRESS PLAY BUTTON WHEN DONE";
Stop;
ENDTEST
CASE 9:
TPErase;
WaitTime 0.1;
TPPrint "ID : "+GetSysInfo(\CtrlId);
TPPrint "LANG : "+StrMap((GetSysInfo(\CtrlLang)),STR_LOWER,STR_UPPER)+"GLISH";
TPPrint "IP : "+GetSysInfo(\LanIp);
TPPrint "IRB TYPE : "+GetSysInfo(\RobotType);
TPPrint "IRBT TYPE : "+Track(\TrackType);
TPPrint "SW VER : "+GetSysInfo(\SWVersion);
TPPrint "SYS NAME : "+GetSysInfo(\SystemName);
TPPrint "LAST SERVICE : 31/03/2021";
TPPrint "NEXT SERVICE : 31/03/2022";
TPPrint "****************************";
TPPrint "PRESS PLAY BUTTON WHEN DONE";
Stop;
CASE 10:
UIMsgBox Percentage(sPerc)+"%"\Buttons:=btnOK;
CASE 11:
Gas_Check_Move;
CASE 12:
RobMain;
ENDTEST
TPErase;
ENDPROC