Access file from Windows environment

Hi,
My ignition server is hosted in Linux environment. I want to access a text file which is in windows platform. Can someone suggest what are the points needs to done to access the file and read the content.

Thanks in advance.

What modules are in play? Is this being done though Vision, Perspective, or some other ignition means?

i need to write a script in script library to read the file and store in tag.
But before that how to connect the windows environment and linux environment to get the file.
the file is generated in windows PC and ignition is installed in Linux.

OK... so you have a file that is hosted in a Windows environment, that you want your gateway to access?

And once you access the file, then you will read that file in a script and then put the data into a tag?

First... you will need to get your permissions setup correctly between the linux system and the windows system so you can access the file.

Then, based on the file type, you could use the system.file | Ignition User Manual scripting functions to access that file using the full UNC path to that file to access it across your network.

1 Like

Is the Windows system standalone (not a domain member) ? If so, you should be able to mount a Windows shared folder in Linux using the cifs mount type. If your system will do this regularly, consider using Linux's autofs toolkit to perform this mount on demand.

If the Windows system is a domain member, the simplest path forward is to have a special user name added to the domain that has permissions in the target windows system. Then you can use the techniques above. If you must, you can install the samba4 tools on Linux and then join the Linux system to the domain. (I haven't done this in years--I don't give Windows such control over my Linux systems.)

Consider working in the opposite direction, where the Windows system actively gives the file to the Linux system at the desired pace/schedule. This can be handled in Ignition with the WebDev module, or you can use Linux's samba4 toolkit to expose a file share (in Linux) to other Windows system. Then the Windows system would copy the file to Linux on schedule, and Ignition could then read the file locally.

3 Likes

Thank you @pturmel