How-to
Why a controller datalogger serves CSV files over Ethernet and FTP
Short answer
Read the datalogger over the network: the controller's built-in web page shows the logged data as a graph and offers the CSV download, and its FTP server serves the same file once the FTP function is activated. Pull the Micro SD card only as the on-site fallback — card visits interrupt unattended logging and leave the remote site unsolved.

On this page
- How do I get datalogger CSV files over Ethernet without pulling the SD card?
- Why is pulling the Micro SD card the wrong first move at a remote site?
- Which access path fits the job: the web page or FTP?
- How much storage does one-second logging need on the SD card?
- How do I prove the network path before relying on it remotely?
- How do I publish the log graph and the CSV download on the web page?
- When do I activate the controller's FTP server, and how?
- What is the end-to-end check, and what is the decision for each case?
- Questions asked
You do not need to climb to the roof or pull the Micro SD card to read a controller datalogger. The controller's Ethernet services already carry the data: its built-in web page displays the datalogger as a graph and offers the stored records as a CSV download, and on references that document an FTP server, a plain FTP client retrieves the same file once the FTP function is activated. Set the logger to write the signals you need at the requested interval, prove the web download and the FTP retrieval locally, then extend the proven path to the remote workstation through the site's approved remote access. Keep the card pull as the recovery method for a controller that will not talk. This article walks that sequence and ends with the decision for each access path.
How do I get datalogger CSV files over Ethernet without pulling the SD card? #
Use the two services the controller already runs on its Ethernet port: the built-in web page, which displays the datalogger as a graph and downloads the CSV file, and its FTP server, which serves the same file once the FTP function is activated.
Which of the two your hardware actually offers is settled by its function list, so read the controller's own documentation before anyone travels. Both patterns exist on shipping controllers, documented: Prosoft states for its Data Logger Plus that stored data downloads to a CSV file through the built-in web server, and Mitsubishi states that MELSEC L Series CPU data-logging files saved on the SD memory card can be sent to an FTP server with a setting in the logging configuration tool. If your function list shows neither, the Ethernet port cannot serve the file, and the decision section at the end applies.
Why is pulling the Micro SD card the wrong first move at a remote site? #
Because every card visit interrupts the unattended record you are trying to capture and still leaves the next visit unsolved: the site stays unreachable, the logger stops while the card is out, and the fault you are chasing can land exactly in that gap.
The same logic rejects the two neighbouring quick fixes. A standalone logger duplicating the signals adds a second clock, a second data format and a second failure point, and its records will not line up with the controller's timeline. Shortening the sample interval to catch more hides slow-building trends, fills storage faster, and still does nothing for a site nobody can reach. Keep the card pull for what it is good at: recovering the log from a controller whose network path is dead.
Which access path fits the job: the web page or FTP? #
Choose the web page when an engineer reads the log by hand and FTP when a collector retrieves files on a schedule — and prove whichever you pick before you rely on it remotely, because a working graph alone does not prove the download works.
| Method | Use it for | Required condition | Proof before relying on it |
|---|---|---|---|
| Web page | Manual diagnosis: view the log as a graph, download the CSV by hand | Web presentation and datalogger included in the application | Remote browser shows current data and the download yields a readable file |
| FTP | Scheduled, unattended retrieval by a collector PC | FTP function activated on the controller | Client lists and retrieves the file; logging continues afterwards |
| SD card | On-site recovery when Ethernet is unavailable | Physical access to the controller | Card opens in a PC with a readable log file |
Treat graph display and file export as two separate proofs wherever the web route lives. A reported support case on one HMI panel family shows the split: the presentation works in the browser while exporting the log CSV onward to the USB port fails. The proof that counts is the downloaded file opened at the far end, not the page rendering.
How much storage does one-second logging need on the SD card? #
At one-second sampling the logger writes 86,400 records a day, and a typical CSV row costs about 50 bytes, so the file grows by roughly 4.3 MB a day — a ten-day unattended period fits in about 43 MB, which leaves even a small card room to spare.
Worked example, with an illustrative row format — a timestamp plus four logged values, 2025-03-14 07:31:22.000,12.34,7.89,4095,1:
- timestamp and separator: 10 + 1 + 12 + 1 = 24 bytes
- four values with separators: 6 + 5 + 5 + 1 = 17 bytes
- line end: 2 bytes
- row total: 24 + 17 + 2 = 43 bytes
Budget 50 bytes per row to absorb longer numbers and the header line. Rows per day: 60 × 60 × 24 = 86,400. Daily growth: 86,400 × 50 B = 4,320,000 B, about 4.3 MB. A ten-day unattended period needs 10 × 4.3 MB = 43 MB, so provision double — roughly 90 MB of free space — and any current Micro SD card qualifies.
Columns, data types, delimiters and the rollover rule all move the total, so confirm with one measurement: run the final signal list for a known stretch and read the file size. For example, 180 KB after one hour scales as 180 × 24 = 4,320 KB, about 4.3 MB a day — the same order as the estimate. If the measured hour disagrees, trust the measurement and rescale the retention.
One-second timestamps promise record spacing, not capture: the log proves sequence and timing at that resolution, and an event shorter than the interval can fall entirely between two records. If the fault is faster than the sample interval, log the decisive channels faster where the controller allows it, or accept that the record will bracket the event rather than show it.
Keep the signal list tight: command, measured response, operating state, fault indication, plus a time reference on every record — enough to separate cause from effect. Confirm during the bench test that logging continues through machine state changes and that storage behaves predictably when the card is full, missing or unreadable.
How do I prove the network path before relying on it remotely? #
Test on the local segment first, then repeat from the authorized remote workstation: the local pass separates controller configuration from site routing, and only the repeated remote pass proves the path an engineer will use on the day.
Connect the controller's Ethernet port to the maintenance network it will actually live on, and read the real values from the project and the network equipment: address, subnet mask, default gateway, firewall rules. A controller at 192.168.1.50 on a 255.255.255.0 segment, for example, is reachable only from workstations in that subnet unless something routes between them.
A ping reply proves only that the network stack answers, not that the web page or FTP service passes the firewall — the same false comfort as when ping works but a PLC program download still fails. Test the real service: open the page and pull one file from a workstation on the same segment.
When local access works and the remote session does not, the fault sits in the routing, the remote-access appliance or the firewall between them; the order of attack in a site-to-site VPN that is up while the SCADA PC cannot reach the remote PLC applies unchanged here.
One exposure rule: do not port-forward the controller's web page or FTP service straight onto the internet to save the climb. Publish it behind the site's approved remote-access boundary, the way a historian web client goes out through a reverse proxy, and let the file come back over that sanctioned path.
How do I publish the log graph and the CSV download on the web page? #
Add the datalogger display to the controller's web application, bind it to the stored dataset, and provide the download action for that same dataset — then verify both halves, because the graph and the CSV export are configured and fail separately.
In the project the installed controller runs:
- Confirm the datalogger writes the intended variables to the Micro SD card.
- Add or enable the web presentation that displays the logged dataset as a graph.
- Add the web action that offers that same dataset as a CSV download.
- Deploy the application by the controller's normal commissioning process.
- Open the page over Ethernet, confirm the graph shows the known test event, and download the file.
- Open the CSV in a spreadsheet or plain-text tool and check column names, timestamp order and the test event against the wall-clock time you noted.
If the graph updates but the download comes out empty or stale, the fault is in the logger-to-page binding or the selected dataset, not in the network; fix it in the project before touching a network setting. The route is done when the remote browser shows the known event on the graph and the downloaded file shows the same event at the expected timestamp.
When do I activate the controller's FTP server, and how? #
Activate FTP when retrieval has to run unattended, because a file-oriented collector can fetch the CSV on a schedule; a failed FTP connection does not prove the data is missing — it usually means the function is still off or the service is unreachable.
Check the hardware designation before hunting for the switch: the controller in this setup is designated M172, and its FTP-capable reference TM172, so confirm both against the unit label and the project hardware definition. Direction matters too: some controller families push their SD-card log files to an FTP server, while this class serves the file to a client, and the collector you write depends on which way your hardware works.
In the controller configuration:
- Locate the FTP function and activate it.
- Apply the access the project defines: its FTP credentials, restricted to the maintenance segment.
- Connect an FTP client over the tested route, with the client's passive mode selected, which survives site firewalls where active mode is usually filtered.
- List the logger's output directory and retrieve the CSV file.
- Compare that file's timestamps and contents with the copy downloaded from the web page; both routes must show the same recorded event.
- Disconnect the client and confirm the logger keeps writing: new records with advancing timestamps, and the active file neither locked nor corrupted.
Read a failed connection for what it is. FTP refuses while the web page works: the function is off or the policy blocks it — fix activation or policy, not the datalogger. FTP connects but shows no log: the logger has not created the file, or the service exposes a different storage location — go back to the card and the storage settings in the project.
What is the end-to-end check, and what is the decision for each case? #
Run the whole chain once — field value, logger sample, timestamp, card storage, network service, remote retrieval, offline reading — against one safe, recognizable state change whose wall-clock time you wrote down beforehand, then pick the access path by job, not by habit.
Trigger the change, wait long enough for several samples and one scheduled retrieval, then read the file at the far end. The chain is proven only when the event you created appears in the CSV at the timestamp you noted, retrieved from the remote workstation rather than from the cabinet.
The decision for each case:
- An engineer diagnosing a live problem: the web page — graph for the pattern, CSV download for offline analysis, both proven from the remote workstation before anyone travels.
- Unattended collection over weeks: activated FTP plus a scheduled collector. Where no collector PC exists at the site yet, a fanless mini PC beside the controller takes that role, polling the FTP service on a schedule and forwarding what it retrieves.
- No web presentation and no FTP in the function list: Ethernet cannot serve the file, so use the vendor's own download utility where the product ships one, and keep the card pull as the recovery path while a permanent collector is planned.
- A controller that will not talk at all: card recovery on the next visit, and its Ethernet services move to the top of the commissioning list, so the visit after that is the last one.
For the hop from retrieved CSV files into a database, the staged path in Node-RED FTP CSV to InfluxDB is one documented way to build the collector's output stage.
Questions asked
Which firewall ports does retrieving the CSV over FTP need?
FTP uses two connections, not one. The control connection runs on port 21 and carries your commands; the data connection that actually carries the CSV file is negotiated per transfer. In passive mode the server announces a high port for each retrieval, so the firewall must allow that port range on the controller side, not only port 21. If only port 21 is open, the client connects, logs in, and then hangs when the file transfer should begin.
Can a collector fetch the CSV while the logger is still writing to it?
Treat that as unproven until you have tested it on your controller. Some loggers close a file at a rollover boundary and start a new one, which gives the collector a stable file to copy; others keep one file open and append. Read a closed, finished file by preference. If you must take the active file, copy it, then verify the copy opens cleanly and its last timestamp matches an advancing clock before the collector deletes or forwards anything.
What if the controller offers neither a web presentation nor FTP?
Then its Ethernet port cannot serve the log file, and no amount of client or firewall work changes that. Check the vendor's own tooling first: some products ship a configuration utility that reads the stored data over Ethernet, as the Prosoft Data Logger Plus documentation shows alongside its web-server route. If no utility exists, the Micro SD card pull stays the only retrieval path, and a permanent fix means adding a logger or collector of your own at the site.
How does the logger's file rollover setting affect what I can retrieve later?
It decides whether the event window still exists when you finally connect. Configure the rollover rule before commissioning: files that wrap or overwrite at a size or date boundary will eventually discard the oldest records, so a fault that happened before the last rollover may be gone even though the system looks healthy. Size the retention from the measured growth rate, confirm on the card that the oldest file you still need survives the longest plausible delay between retrievals, and record the rule in the project notes.


