05.05.2014 Views

csmstr - Omega Engineering

csmstr - Omega Engineering

csmstr - Omega Engineering

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

OPENFILE(NAME, MODE)<br />

CRIMSON USER MANUAL - MODULAR CONTROLLER<br />

OPENFILE(NAME, MODE)<br />

ARGUMENT TYPE DESCRIPTION<br />

name cstring The file to be opened.<br />

mode int The mode in which the file is to be opened…<br />

0 = Read Only<br />

1 = Read/Write at Start of File<br />

2 = Read/Write at End of File<br />

DESCRIPTION<br />

Returns a handle to the file name located on the CompactFlash card. This function is restricted<br />

to a maximum of four open files at any given time. The CompactFlash card cannot be<br />

unmounted while a file is open. Note that the filing system used on the card does not support<br />

long filenames, and that if backslashes are included in the pathname to separate path<br />

elements, they must be doubled-up per Crimson’s rules for string constants as described in the<br />

chapter on Writing Expressions. To avoid this complication, forward slashes can be used in<br />

place of backslashes without the need for such doubling. Note also that this function will not<br />

create a file that does not exist. To do this, call CreateFile() before calling this function.<br />

FUNCTION TYPE<br />

This function is active.<br />

RETURN TYPE<br />

int.<br />

EXAMPLE<br />

hFile := OpenFile(“/LOGS/LOG1/01010101.csv”, 0)<br />

PAGE 380<br />

http://www.redlion.net/controller

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

Saved successfully!

Ooh no, something went wrong!