Thanks Godra. That part is working, As we try this, we found that the filename it creates at midnight, is appending to the previous nights. (See attachment).
Also, not a big deal, but the header names it creates, is coming from the PLC Address.
Thanks
George