Promotic

CSV - text format for data exchange

CSV (Comma-separated values) is a simple file format designed for exchange of tabular data.
The file in the CSV format consists of rows with individual items separated by comma (,) character. Item values can be enclosed in quotation marks ("), allowing the item text to contain a comma. If the text of the item contains quotation marks then these are doubled.

Because in some languages the comma character is used in numbers as a decimal separator, there are variants that use a different separator, most often semicolon (;) or tab.
Example:
There is a table of data:
boiler1 89.5 On, Functional
boiler2 77.8 On, Functional
boiler3 21.9 Error, Unfunctional
 
This table can be written in CSV as follows:
boiler1,89.5,"On, Functional"
boiler2,77.8,"On, Functional"
boiler3,21.9,"Error, Unfunctional"


CSV support in the PROMOTIC system

Scripting methods for runtime:
- Pm.FileCsvRead: Reading from the CSV file
- Pm.FileCsvWrite: Writing into the CSV file
- PmaDataTable.LoadFromFile(.., "filetype:csv;"): Loading data for this object from the file
- PmaDataTable.SaveToFile(.., "filetype:csv;"): Saving data of this object into the file
- PmaTrendGroup.SaveToFile(.., "filetype:csv;"): Saving data of this object into the file


Support in the development environment:
- Export and import of variables in objects containing the "Data" tab.
- Export of localized texts.
See also:

History:
Pm8.02.00:
- Export-Import of the PmaData object variables: now it is possible to read and write the configuration of data extensions. All data extensions are in this case saved into a single system text.
- Pm.FileCsvWrite new method: for writing into the CSV file. It it the reversed Pm.FileCsvRead method.
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.