To help my robot operators I have decided to create a small KAREL program that saves the currently edited file to a registered device (another robot on the network already setup as FTP). The setup of the deice is correct, meaning going through menus > FILE > set device > C4: which is my other robot's FTP I can save any files, but with the KAREL program I always get an Error. This is the KAREL code I used, any help would be greately appreciated:
PROGRAM SAVE_VRS1 %NOLOCKGROUP %COMMENT = 'SAVE .vr, .tp, .sv' %ENVIRONMENT sysdef %ENVIRONMENT MEMO %ENVIRONMENT FDEV CONST SUCCESS = 0 -- The value expected from all built-in calls. VAR prog_name : STRING -- The program name to save status : INTEGER -- The status returned from the built-in calls file_spec : STRING -- The created file specification for SAVE dev : STRING -- The device to save to specify whether to del_vr : BOOLEAN -- delete file_spec before performing the SAVE. BEGIN prog_name = $SHELL_WRK.$ROUT_NAME --choose the currently edited program file_spec = dev+prog_name+'.TP' IF (del_vr = TRUE) THEN DELETE_FILE (file_spec, FALSE, status) -- Delete the file. IF (status <> SUCCESS) AND (status <> 10003) AND (status <> 85014) THEN WRITE ('ERROR ', status,' IN attempt TO delete ',CR, file_spec,CR) ENDIF ENDIF SAVE (prog_name, file_spec, status) -- Save the variable/program IF (status <> SUCCESS) THEN -- Verify SAVE was successful WRITE ('ERROR saving ', file_spec, ' variables', status, CR) ENDIF END SAVE_VRS1
The error returned is 21094 but in FANUC KAREL documentation there is no list of error codes and descriptions.