15.07.2013 Views

Automatic control function programming manual ladder language

Automatic control function programming manual ladder language

Automatic control function programming manual ladder language

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Read Current Date and Day in Week DTGET<br />

Syntax<br />

Programming error causing a CPU fault<br />

Access to a prohibited address:<br />

- *date parameter error.<br />

16.4.9.11 File Management<br />

16 - 26 en-938846/7<br />

DTGET(*date)<br />

The global memory is managed like a disk drive. The data are stored in it as files in directories.<br />

There are three directories for the different file types:<br />

- <strong>ladder</strong> application files with .XLA extension,<br />

- C application files with .XCX extension,<br />

- user files.<br />

Programming in C allows you to create your own files. A number of primitives are available for managing these files.<br />

The error codes returned by the primitives (file and directory) are:<br />

Error code Description<br />

UF_SYSFAIL System error<br />

UF_DSKFULL Disk full<br />

UF_ERRNAME Error in file name<br />

UF_NEXIST No such file<br />

UF_OPEN File open<br />

UF_NOPEN File not open<br />

Create a File in the User Directory USER_CREATE_F<br />

Syntax<br />

Parameters<br />

SINT32 USER_CREATE_F(SINT8 *pfilename)<br />

Inputs: pfilename: The path must not be specified because the user files are necessarily stored in a<br />

particular directory.<br />

Output: None

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!