Others might have better ideas, but here are two options:
- Log the data locally and then push the log files periodically to the remote machine.
- Log the data locally and then pull the log files from the remote machine.
The first option might use something like rsync, as described in this blog post:
https://www.plcnext-community.net/makersblog/how-to-use-rsync-to-back-up-files-from-a-plcnext-control-device/
The second might use OPC UA HDA client software running on the remote machine, which could (somehow) query the logged data on the PLC and store it locally in the required format. This video shows how to use UaExpert to (manually) retrieve historical data from a PLC:
https://youtu.be/Npu_obHw1rY
It might also be possible to mount a remote drive on the PLC file system and log files directly to the mounted volume, but that might not be a great idea if network interruptions are a possibility.
Also, depending on the requirements, it might be good enough for the PC to run data logging software that collects „live“ data (not historical data) from the PLC’s OPC UA server and logs it locally.