Data Logger Suite: Dynamical Log File name

Started by TheZbunj, September 27, 2023, 11:00:00 AM

Previous topic - Next topic

TheZbunj

My Data Logger Suite is collecting data from 12 devices connected to single virtual PC serial port. Collected data is stored on PC Hard Drive in form of Log file. Used method for log file creation is Each data packet in different file. Each received data packet contains string name of device that has send packet. I would like to use that name from data packet when naming log file.

1. Is it possible to dynamically assign log file prefix based on ASCII parser values? Something like:
File name prefix = Device[ParserVariableName]
Resulting in log files names like DeviceOne.txt, DeviceTwo.txt etc.   

2. If not, can it be done with Script Plug In?

Arthur Grasin

Yes, in your case you can use parser variables in the file name prefix. You need to define prefix as:

Device{DEVICEID}

where {DEVICEID} will be replaced with your parser variable value. Of course, the parser should extract the "DEVICEID" variable.
If you like my work, please take a few seconds and add feedback about our site or our software [here]

TheZbunj

Thanks. Log files are now being created with names like DeviceOne00001.txt.
Can the sequence number (00001) be removed from file name?

Arthur Grasin

You may select the "Do not create new log file" mode. In this case the number will be excluded.
If you like my work, please take a few seconds and add feedback about our site or our software [here]

WAYNE

Hi,
This method works for naming the log file but not when exporting a file using local database. Is there any way of having a txt file produced where the name of the file is one of the variables?
Thanks!

Arthur Grasin

Sorry, but the Local database plugin uses its own file name generation methods. It is not possible to change it.
If you like my work, please take a few seconds and add feedback about our site or our software [here]