Abstract
There are two ways to log data records in Red Lion RTUs 1) Sixlog (Configured, loaded and read with the Sixnet I/O Tool Kit) and 2) Red Lion Workbench using the LOGFILECSV block. Datalogging with Red Lion Workbench provides functionality not available in Sixlog including but not limited to 1) Logging all data type supported by Red Lion Workbench (String, Long Integer, Long Float, etc…), 2) Flexibility triggering datalog records and formatting the csv file.
To create log records in the RTU use the DATE_TIME, LOGFILECSV and SETCSVOPT function blocks. Create a timestamp and other variables to include in the records, create a spylist so the program knows which variables to include in the data records. Define the path to store the csv file and a way to trigger datalog files.
Products
RTU Products:
ST-IPm-8460/VT-mIPm-248-D/VT-mIPm-138-D
Use Case: Datalogging in the RTU with the Red Lion Workbench
Required Software
Sixnet I/O Tool Kit 5.0.103
Red Lion Workbench 1.0.3
Create a spylist to define the variables that are included in the data records
- Open the project that you want to add the datalogging function in. Right-click on the “Watch (for debugging)” folder. Select “Insert New Item.”
- Select Watch > Spylist then click Next.
- Name your spylist and add a description. This new Spylist will be listed in the “Watch” folder. Double-click on the new spy list and drag data from the variable dictionary. Specific variables were highlighted below and dragged to the GPU_Log spylist window.
Create timestamp variable and add to spylist
- Add the DAY_TIME block to program. Define SEL input as 1. And create a timestamp variable connected to Q. 1 in the SEL input give the time in 'HH:MM:SS' format. Other time formats can be achieved by adding another Day Time block with 0 on the SEL input which will provide Date in “YYYY/MM/DD” format.
- Add the timestamp variable(s) to the spy list.
Create a datalog configuration with the LOGFILECSV
- Add the LOGFILECSV block to a program.
- The LOGFILECSV is used to create a csv file. Add variables and inputs as defined below.
- LOG input. BOOLEAN input. Everytime the LOG input goes from OFF to ON a data record is added to the csv file. This can be triggered in multiple and in a variety of ways.
- RST input. BOOLEAN input. When the input goes from OFF to ON the CSV file is cleared.
- List input. Use the Q of the VLID block to provide the List input. The input of the VLID List input should be the name of the spylist (‘GPU_Log.spl’ in this case).
- Path input. Put the path on the RTU where the csv file will be stored plus the name of the csv file. Examples of the NVRAM (fast datalog memory) and FLASH (1 second or slower datalogging).
- ‘/nvram/datalog/*.csv’
- ‘/home/datalog/*.csv’
- Add the SETCSVOPT block to the same program.
- SEP input. Enter ‘,’ or ‘;’ to set how the variable are separated in the CSV file.
- DEC input. Enter ‘.’ Or ‘,’ to set the character used for the decimal point.
Disclaimer
It is the customer's responsibility to review the advice provided herein and its applicability to the system. Red Lion makes no representation about specific knowledge of the customer's system or the specific performance of the system. Red Lion is not responsible for any damage to equipment or connected systems. The use of this document is at your own risk. Red Lion standard product warranty applies.
Red Lion Technical Support
If you have any questions or trouble contact Red Lion Technical Support by clicking or calling 1-877-432-9908.
For more information: http://www.redlion.net/support/policies-statements/warranty-statement




