Dave Posted November 29, 2017 Report Posted November 29, 2017 Why is it, when I execute this instruction with parameter D set to 0, that I get an error code -31, Number of lines in file is 0., and no file is created? According to the help file, setting this to 0, should write entire data table. I'm using ver. 1.21.51
Saragani Posted November 29, 2017 Report Posted November 29, 2017 I'm checking this issue for you. I think it is a "bug" in the help, but I'm also checking if maybe it's just not working correctly in the PLC, or this feature was not implemented. You can however use the number of rows from the table itself, for example: Table1.Number of rows 1
Saragani Posted November 29, 2017 Report Posted November 29, 2017 Ok. The issue was checked, and indeed in case of 0 rows, a status -31 is returned. This is a small inaccuracy with the help. You can use the suggestion I wrote in my previous post.
Swervomotor Posted November 29, 2017 Report Posted November 29, 2017 I ran into this a few weeks ago, I just set a tag with the amount of rows in the table as a work around. Jut changed it after Saragani's reference to the "built in" tag for number or rows in a table. That way if it ever increases in size I won't have to change the number in 2 places.
Cara Bereck Levy Posted December 13, 2017 Report Posted December 13, 2017 Hi guys--Just wanted to note that the Help has been updated, and will be included in the next release.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now