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 CSVClosed Comma-separated values - The CSV file format is a file type that stores tabular data. format for a list of variables.

Inputs

Input

Data Type

Range

Unit

Default

Description

LOG

BOOL

 

 

 

Variables are saved on any rising edgeClosed The transition of a digital signal from low to high. AKA: positive edge. of this input.

RST

BOOL

 

 

 

ResetClosed New start of the microprocessor. the contents of the CSV file.

LIST

DINT

 

 

 

ID of the list of variables to log (use VLID functionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances.).

PATHClosed Set of continuous positions and orientation information in multi-dimensional space. Geometrical description of a space curve that the TCP of an axesgroup moves along.

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 programClosed The act of performing a sequence of instructions or commands. that log values everyday at 14h23m (2:23 pm) (see ).

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);
FFLD  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