LogFileCSV

PLCopen motion icon

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Create a log file in CSV format for a list of variables.

Inputs

Input

Data Type

Range

Unit

Default

Description

LOG

BOOL

 

 

 

Variables are saved on any rising edgeClosed A rising edge is the transition of a digital signal from low to high. It is also called positive edge of this input.

RST

BOOL

 

 

 

Reset the contents of the CSV file.

LIST

DINT

 

 

 

ID of the list of variables to log (use VLID function).

PATH

STRING

 

 

 

Path name of the CSV file (PxMM flash memory, SD card, or Shared Directory).

Outputs

Output

Data Type

Range

Unit

Description

Q

BOOL

 

 

TRUE if the requested operation has been performed without error.

ERR

DINT

 

 

Error report for the last requested operation.

0 (zero) is OK.

Remarks

This example shows a list and a program that log values everyday at 14h23m (2:23 pm) (see call out ).

FBD Language Example

FFLD Language Example

IL Language Example

(* MyLOG is a declared instance of LogFileCSV function block *)
Op1: CAL MyLOG (b_LOG, RST, LIST, PATH);
FFLDClosed "Free Form Ladder Diagram"  MyLOG.Q
STClosed "Structured text" A high-level language that is block structured and syntactically resembles Pascal  Q
FFLD  MyLog.ERR
ST  ERR

ST Language Example

(* MyLOG is a declared instance of LogFileCSV function block *)
MyLOG (b_LOG, RST, LIST, PATH);
Q := MyLOG.Q;
ERR := MyLog.ERR;

See Also

VLID