"Tags" in gateway(?)

Hi, i have been looking far and wide (imho).
I am trying to put up a few tags in the gateway, so the gateway can put in any data, that can be passed back and forth to clients.

Gateway has a mapped network drive: S:
in there it has its own folder, where CSV-files arrives in one folder, the gateway should move “the next in line” to another folder, fetch certain data in that CSV, and pass to a PLC, but also be able to display that data in any and all clients looking at batch information.

Currently, the only way i have found to make this work, is to put all data in the database, so clients can query the db to fetch the data, and same as the gateway query and update the data.

I had a few scripts that worked fine in the client, but i figured out, that the client might not always be run etc etc. so i moved the script to gateway under a 2s timer, to query the folders and update information, at first to tags, but that didnt work, and the help pages is not much help imho. Searched this forum with little results that could apply to my case, which shouldn’t seen unique at all.

EDIT: Also, paths doesnt seem to work in the gateway.
From the DB i get: [i]s:\test[/i] and in the gateway script i have: new = sysroot + “new\”

But when i try: onlyfiles = [f for f in listdir(new) if isfile(join(new, f))] I get this error:

INFO | jvm 1 | 2016/07/18 09:57:55 | Traceback (most recent call last): INFO | jvm 1 | 2016/07/18 09:57:55 | File "<TimerScript:BT_Provbank/BatchTimer @2,000ms >", line 18, in <module> INFO | jvm 1 | 2016/07/18 09:57:55 | OSError: (2, 'No such file or directory', 's:\\test\\new') INFO | jvm 1 | 2016/07/18 09:57:55 |

The gateway is installed on my own machine.
The path is mapped to S:
There is a test-folder in S:\

Wndows services don’t have access to network drives by default, due the security model for the system user they run under. If you google “windows service mapped drive” you’ll get all the explanations you need.

Hello pturmel.

I was thinking on to edit the igniton service to run under the intended user in this server, instead of services account.

But i am not sure, if this then would cause something else unwanted, and unexpected behaviour.
Ignition needs to access this path to access CSV-files, that is part of a recive, coming from an external source.

Other ways i have thought of, is to make a small program, run as a service under the real user, to copy the file(s) from the path, to a local folder the local service account can access.

Have you set up the mapped drive in the ignition.conf file yet?

support.inductiveautomation.com … _drive.htm

[quote=“Kevin.Herron”]Have you set up the mapped drive in the ignition.conf file yet?

support.inductiveautomation.com … _drive.htm[/quote]

I have to check with the customer how they intend to use the mapping, if its pushed at user login, or if it can be mapped outside the user, eitherway, i have a program that could be used to copy the file(s) from the user mapped drive, if needs be.

Not sure if this will help you, but you can access and manipulate files and tags via python scripts like a gateway event script.

docs.inductiveautomation.com:84 … ystem.file
docs.inductiveautomation.com:84 … system.tag