I have a power automate script that every hour refreshes a table in C:\SCADA\orders.csv with new orders. The csv file just have a simple table with the list of orders, with it’s date, number, description, qty, etc…
I want to show this table in a perspective view, I been trying with chatgpt to get a script that reads the csv file and put the contents into a dataset tag, but how is normal with chatgpt, the script doesn’t work, and it doesn’t seem to be able to find a solution.
The biggest problem seems to be that ignition can’t just access C:\SCADA at all. The user that is running the service in the computer is a local admin, and the folder is shared with the ignition service, but still reports that there’s no file.
I’m trying to find information about this but I can’t. Is there anything special that needs to be done for the gateway to be able to read local files?
Thank you.
PS: This is the script:
import csv
def getOrders():
path = r"C:\SCADA\orders.csv"
rows = []
headers = []
with open(path, 'r') as f:
reader = csv.reader(f)
for i, row in enumerate(reader):
if i == 0:
headers = row
else:
rows.append(row)
return system.dataset.toDataSet(headers, rows)
Also tried with path = r"C:\Program Files\Inductive Automation\Ignition\data\orders.csv" with no luck.
This function is called by a timer script:
`def handleTimerEvent():
try:
dataset = project.readorders.getOrders()
system.tag.writeBlocking(["[default]orders/OrdersDataset"], [dataset])
except Exception as e:
system.util.getLogger("getorderstimer").error("Timer error: " + str(e))`

