24 - 09 - 2021

Files Library

Block XMLSaver


License: Hobby, Industrial

The block can easy save a complicated combination of input signals to a XML file. Every XML Tag is a formatted string based on one or more block's inputs. Using the block, we can easy show an information from measured signals to a php WEB site, we just have to save them to a XML file and to upload it by FTP transfer to the server.

Block's Parameters:

  • FileName - valid path and a file name for the XML file;

  • WritePerSec - per how many seconds the information in XML file will be saved;

  • Inputs - With this parameter, unlimited number of inputs from different data type can be added to the block;

  • Tags - The parameter describes the TAGs in the XML file;

Block's inputs:

  • Write - if the input is connected, the XML's TAGs will be saved to the XML file, when the input becomes to a high level. If the input is not connected, the XML file will be saved depends on value of the parameter of the block WritePerSec.

 The parameters Inputs and Tags open an interface shown below. On the left is a parameter Inputs, on the right is a parameter Tags:

In the example above, the bock has a few inputs, where CurrTime is of DateTime data type, other inputs are of analog and digital data type. The result of the saved TAGs are shown below. The XML file always has a Header with an information about the time of the data export. Below at the TAG Data are saved all the user defined TAGs.

<Results>
<Header>
  <ExpDate>20201220 20:15:05</ExpDate>
</Header>
  <Data>
    <CurrTime>20.12.2020 10:15</CurrTime>
    <InConditions>InT_LM:18.3,HeaterOff,FanOff</InConditions>
    <DewPoint>0.0</DewPoint>
    <WindChill>-305.5</WindChill>
    <SeaTemp>0.0</SeaTemp>
    <Pressure>1024.5</Pressure>
    <OutHum>-15</OutHum>
    <OutTemp>12.4</OutTemp>
  </Data>
</Results>

For example, the defined TAG CurrTime: <CurrTime;dd.MM.yyyy HH:mm> is saved in the XML as string 20.12.2020 10:15. The TAG OutTemp: <OutTemp;1> is saved with one number after the digital separator: 12.4.

More complicated example is the TAG InConditions: InT_LM:<InTemp;1>, Heater<Heater;On;Off>, Fan<Fan;On;Off>. This XML Tag contains 3 block's inputs, the first one is analog, the next two are digital.

More information how AltonaLab software converts signals to a text can be read at the article below:

https://scada.altonalab.com/index.php/en/conceptions/text-formatting-strategy

 

 

Block WriteFile

License: Hobby, Industrial

The block has ability to design the number and type of signals, which to be saved to text file. Every input is a column in the file, they are separated with character in parameter Separator. Inputs parameter opens File I/O editor interface, where the user can add or delete input, which to be saved as separated column in the file. Every input has an Name and type. For input Write, pelase read about parameter: WritePerSec.

 

Parameters:

  •  ColSeparator - the character which separates every input in text file;
  • DateInFileName - if the parameter is checked, current date in format YYYYMMDD will be added to the name of the text file. If file name is LogFile.txt, the result file name will be LogFile20141203.txt. In this case the block will wirte the data in separated file for every day.

  • FileName - name of the file. If this parameter doesn't include a file path, then the file will be writen into current folder, where is SCADA application AltonaLab.exe;
  • Inputs - opens interface for edit file's inputs;
  • WithDateTimeCol - if the parameter is checked, the first column will be the current Date and Time. In this case the file will looks like Log file;
  • WritePerSec - if Write input is not connected, then the block will write a new line in text file per every WritePerSec seconds. If input Write is connected, then the new line will be written when the input become from low to hight level;

 

 

 

Block FileStoreConditions

License: Hobby, Industrial

The block is suitable to store current conditions into file and when it is needed to restore them. It can store unlimited amount of signals, which can be added from parameter FileIO. Every added signal will appear as input and output of the block with the same name, but with added prefix In and sufix Out. When the input Write become from low to hight level, then the inputs will be saved to the file. When the input Read become from low to hight level, then the saved signals will appear to theirs outputs. If inputs Write or Read are not connected, then the Read/Write operation will be completed in time period described in parameters ReadPerSec, WritePerSec. If the parameter FileName has no path, then the file location will be current folder of the application AltonaLab.exe.

  

 

 

Block OutXMLFile

License: Hobby, Industrial

Saves every input to a separate node in an XML file.

Parameters:

  • FileName - valid path and a file name for the XML file;
  • NumAfterPoint – Number of decimals after the dot in the XML;
  • WritePerSec - per how many seconds the information in XML file will be saved;

 

Block OutFile

License: Hobby, Industrial

Saves the input as new line in text file.

Parameters:

  • FileName - path and file name of the text file.
  • NumAfterPoint – decimals in the text file;

 

Block InTextFile

License: Hobby, Industrial

Reads line by line from a text file where each line is a number.

Parameters:

  • StrOut - read line;
  • EOF - gives high level when end of file occurred;
  • FileLen - number of lines in file;