CSV File| With this function block a CSV file is recorded. Important: See notes when using the counter modules. |
Inputs |
||
| TR |
Trigger |
With a rising edge at the input a new
line is written into the CSV file. |
| RT |
Rotation |
A new file is started with a positive
edge at the input. The current file is renamed to "fileiname-csv.0",
".1" etc. |
Outputs |
||
| ER |
Error |
Number of errors, for example if an
error occurs when saving the CSV file |
Parameter |
||
| Number
of inputs |
number of inputs |
|
| File
name |
File name under which the data is saved. The filename can contain placeholders for the date, see below. | |
| Rotation |
Number of rotations. With a positive edge at input RT the file is renamed to "filename-csv.0", ".1" etc., when the maximum number is reached, the oldest one is deleted. | |
| Columns |
||
| Comment column | This option inserts the text from the
general Comment option as the first column. This can be used to
insert a meter number as a column, for example. |
|
| Date
column |
Insert columns with current date. |
|
| Time column | Insert columns with current time. | |
| Column
headers |
Here you can define column headings.
Separator is semicolon ";". |
|
| Number
format |
Number format, see also Format. |
|
| comma
sign |
comma sign |
|
| Email
sending: The CSV file can be sent via email, for this
purpose some frequently used times can be selected. If the file is
to be sent at a special time, this can also be realized with the
function block Send mail. |
||
| Date |
Time. If, for example, Day is
selected here, the dispatch always takes place at 0:00h. |
|
| Address |
email address |
|
| Subject |
Subject |
|
| Body |
Email Text |
|
| Waiting
time |
Waiting time for the email to be sent
in seconds. For example, if you select day as time, the email will
be sent at 0:00h plus this time. This is useful, for example, if
another line is to be recorded at 0:00h. |
|
| Anhang umbenennen | With this option the file can be renamed. For example, to append a date. Example: log_%d_%m_%Y.csv becomes log_10_11_2023.csv | |
| Rename attachment Offset Time | Time Offset in seconds for renaming the file. For example -3600 means minus 1 hour | |
The following placeholders are available for renaming:
| %a | Abbreviated weekday name | Sun |
| %A | Full weekday name | Sunday |
| %b | Abbreviated month name | Mar |
| %B | Full month name | March |
| %c | Date and time representation | Sun Aug 19 02:56:02 2012 |
| %d | Day of the month (01-31) | 19 |
| %H | Hour in 24h format (00-23) | 14 |
| %I | Hour in 12h format (01-12) | 05 |
| %j | Day of the year (001-366) | 231 |
| %m | Month as a decimal number (01-12) | 08 |
| %M | Minute (00-59) | 55 |
| %p | AM or PM designation | PM |
| %S | Second (00-61) | 02 |
| %U | Week number with the first Sunday as the first day of week one (00-53) | 33 |
| %w | Weekday as a decimal number with Sunday as 0 (0-6) | 4 |
| %W | Week number with the first Monday as the first day of week one (00-53) | 34 |
| %x | Date representation | 08/19/12 |
| %X | Time representation | 02:50:06 |
| %y | Year, last two digits (00-99) | 01 |
| %Y | Year | 2012 |
| %Z | Timezone name or abbreviation | CDT |
| %% | A % sign | % |