I was instal Direct Loader to KRC4, but I am confused what to do next. I need to load 3 files from external PC with the same name each time I run the main program.
Directory Loader. How does it work?
-
Mischa -
January 7, 2015 at 7:11 AM -
Thread is marked as Resolved.
-
-
after small research I was defined that for use DirLoader you just need to call it in the main program, for example:
DirLoad( )And DirLoad( ) file can include (I was developing form my purpose):
DEF DirLoad( )
INI;Definition of the program path for the source directories:
KRDLSOURCEDIR[]="C:\KRC\TP\KRdirLoader\"
KRDLTARGETDIR[]="KRC:\R1\Program\"
KRDLBACKUPdir[]="C:\KRC\TP\KRdirLoader\Mailbox\";Activating functions
KRDLENABLEBACKUP=TRUE
KRDLCOPYTOKRC=TRUE
KRDLDELETESOURCE=FALSE;Deleting all modules from the directory KRDLTARGETDIR
KRDLDELETETARGET=TRUE
KRDLModuleToDeleteonKRC[] = " ";Loading all modules from the directory KRDLSOURCEDIR
KRDLCOPYTOKRC = TRUE
KRDLModuleNameToLoad[] = " ";Activation of the simulation of inputs/outputs
$IOSIM_OPT=TRUE;Reset the trigger variable
IF $IN[17]==TRUE THEN
WAIT SEC 0.5
$IN[17]=FALSE;starting the Directory Loader
;Monitoring of the conditions for the start of the Directory-Loader.
IF (NOT KRDLACT OR NOT KRDLRDY OR NOT KRDLERR) THEN
;The simulated status of input $IN[17] is TRUE, i.e.
;the DirectoryLoader is active
$IN[17]=TRUE
ENDIFEND