Jump to content
Dave

"Store DTI to File" Ladder function

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

 

  • Like 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×