1

I suppose this is a long shot considering how few Wonderware questions I've seen on here, but anyway...

The FileReadFields function in Wonderware is supposed to parse a CSV file into memory tags. There are no debug messages when stuff doesn't work in Wonderware (not my choice of HMI software, that's for sure), so I have no idea why this isn't working:

FileReadFields("C:\NASA\Sample.csv", 0, Profile_Setup_Name, 1);

Everything is cased correctly and the file is not in-use. I can't figure out how to make it work.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
Daniel
  • 10,864
  • 22
  • 84
  • 115
  • Wonderware does have a (sometimes cryptic) debugging tool called WWLogger. Newer versions of Wonderware Intouch house this logger under an app called "System Management Console" under "Log Viewer" in the System Console Tree. – GregP Jun 18 '21 at 17:13

2 Answers2

3

FileReadFields function is used to read several values from a CSV file into a series of tagnames. You can not store those values into just one tag. Because a CSV file can contain several values per line, you need more than one tagname to receive all the values. Those tagnames must end in a number (i.e. MyTag1, MyTag2, MyTag3, ...). Additionally, the tagname must be enclosed with double quotes

This is a correct example:

FileReadFields("C:\NASA\Sample.csv", 0, "MyTag1", 1);

Where MyTag1 is the first tagname. You have to create MyTag1, MyTag2, MyTag3....

Hender
  • 46
  • 2
-1

I wrote FileReadFields. I think it works fine.

zumalifeguard
  • 8,648
  • 5
  • 43
  • 56