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.
Scenario:
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:\