Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

2 Instruction Descriptions
ST
Internal
Vari-
Variable
ables
R_TRIG_instance
UP_Q
FTPRemove-
File_instance
FTPRemove-
Dir_instance
DoFTPTrigger
FTPAddr
RemoveResult
Stage
Trigger
// Prepare connected FTP server settings.
IF P_First_RunMode THEN
FTPAddr.Adr
FTPAddr.PortNo
FTPAddr.UserName := 'FtpUser';
FTPAddr.Password := '12345678';
END_IF;
// Accept trigger.
R_TRIG_instance(Trigger, UP_Q);
IF ( (UP_Q = TRUE) AND (FTPRemoveFile_instance.Busy = FALSE) AND
(FTPRemoveDir_instance.Busy = FALSE) ) THEN
DoFTPTrigger := TRUE;
Stage := INT#1;
FTPRemoveFile_instance( // Initialize instance.
Execute
ConnectSvr
SvrDirName
FileName
RemoveFileResult := RemoveResult) ;
FTPRemoveDir_instance( // Initialize instance.
Execute
ConnectSvr
SvrDirName
RemoveDirName := 'yyyy-mm-dd') ;
END_IF;
IF (DoFTPTrigger = TRUE) THEN
CASE Stage OF
1 : // Execute FTPRemoveFile instruction.
FTPRemoveFile_instance(
2-1148
Data type
R_TRIG
BOOL
FTPRemoveFile
FTPRemoveDir
BOOL
_sFTP_CON-
NECT_SVR
ARRAY[0..0] OF
_sFTP_FILE_RE-
SULT
UINT
BOOL
:= '192.168.250.2';// Address
:= UINT#21;
:= FALSE,
:= FTPAddr,
:= '/Backup/yyyy-mm-dd',
:= '*.*',
:= FALSE,
:= FTPAddr,
:= '/Backup',
Execute
:= TRUE,
ConnectSvr
:= FTPAddr,
SvrDirName
:= '/Backup/yyyy-mm-dd', //FTP server directory name
FileName
:= '*.*',
RemoveFileResult := RemoveResult) ;
Initial value
FALSE
FALSE
(Adr := '', PortNo := 0, User-
Name := '', Password := '')
[(Name := '', TxError := False,
RemoveError := False,
Reserved := [4(16#0)])]
0
FALSE
// Port number
// User name
// Password
// Execution
// Connected FTP server
// File name
// Deleted file results

NY-series Instructions Reference Manual (W560)

Comment
Instance of R_TRIG
instruction
Trigger output
Instance of FTPRemove-
File instruction
Instance of FTPRemove-
Dir instruction
Execution condition for
FTPRemoveFile and
FTPRemoveDir
Connected FTP server
settings
Deleted file results
Instruction execution
stage
Execution condition

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents