LogFileCSV
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
LOG |
BOOL |
|
|
|
Variables are saved on any rising edge The transition of a digital signal from low to high. AKA: positive edge. of this input. |
RST |
BOOL |
|
|
|
Reset New start of the microprocessor. the contents of the CSV file. |
LIST |
DINT |
|
|
|
ID of the list of variables to log (use VLID function 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.). |
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
-
-
Calling this function can lead to missing several PLC Programmable Logic Controller - A digital computer used for automation of industrial processes, such as control of machinery on factory assembly lines. Used to synchronize the flow of inputs from (physical) sensors and events with the flow of outputs to actuators and events. cycles.
Files are opened and closed directly The orientation components of a vector in space. by the target's Operating System.
Opening some files may be dangerous for system safety and integrity.
The number of open files may be limited by the target system.
-
-
- Opening a file may be unsuccessful (invalid path or file name, too many open files...).
Your application has to process such error cases in a safe way. - File management may be not available on some targets.
- See the OEM Original equipment manufacturer - The company that originally manufactured a product. Refers to containment-based re-branding, where one company uses a component of another company within its product, or sells the product of another company under its own brand. instructions for more information about available features.
- Valid paths for storing files depend on the target implementation.
- See the OEM instructions for more information about available paths.
- Opening a file may be unsuccessful (invalid path or file name, too many open files...).
- This function enables Enable signal for the drive, Hardware-Enable with 24V signal to X8, Software-Enable command by setup Software, fieldbus or permanently set.
Both are required for enabling the drive. to log values of a list of variables in a CSV file.
- On each rising edge of the LOG input, one more line of values is added to the file.
- There is one column for each variable, as they are defined in the list.
- The list of variables is prepared using the KAS-IDE Kollmorgen Automation Suite - Integrated Development Environment or a text editor.
- Use the VLID function to get the identifier of the list.
- On a rising edge of the RST command, the file is emptied.
- When a LOG or RST command is requested, the Q output is set to TRUE if successful.
- See What is the Difference between Q and OK? for more information.
- In case of error, a report is given in the ERR output.
- Possible error values are:
- 1 = Cannot reset file on a RST command.
- 2 = Cannot open file for data storing on a LOG command.
- 3 = Embedded lists are not supported by the runtime In computer science, runtime (or run-time) describes the operation of a computer program, the duration of its execution, from beginning to termination (compare compile time). In KAS, runtime refers to the virtual machine that manage the program written in a computer language while it is running..
- 4 = Invalid list ID.
- 5 = Error while writing to file.
- Possible error values are:
- Combined with real time clock Clock signal. management functions, this block provides a very easy way to generate a periodical Motor systems having a reciprocating or oscillating motor that operates synchronously with the periodicity of the source which supplies the electrical energy. The period of execution of a pipe is the time spent between two successive computations of set values for the same pipe. The period of execution of a pipe is specified by the PERIOD parameter of the input pipe block. log file.
This example shows a list and a program 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
ST 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