Jump to content

Recommended Posts

Posted

I have to retrieve and import a CSV file to a DTI. There is no problem about the FTP section, but when I try to convert a CSV file to an UDTF file I have got an error if the CSV file has more than 127 lines.

Is there a way to resolve this issue ? My final CSV file to import will maybe have near of 500 lines.

 

Thanks for reading

Posted

This is always 127 lines independant of data read (only 1column byte, or 10 clumns of strings)

There is a way to go over:

I convert and import one line at time by cycling on the FB and inc an line number (see attached file)

 

Thanks

post-50741-0-95269900-1460378059_thumb.png

Posted

I'm unable to reproduce the problem.

I've created a CSV with 1000 rows, and converted it to UDTF.

I can clearly see that it has 1000 rows.

 

I was then also able to use UDTF Count in order to count the rows and columns, and got the right result, and I was also able to load it to the data table using Load DTI from file.

 

 

I'm using a newer version of UniLogic and PLC Firmware, so I'll check tomorrow if there was a bug with this Utility in the current official version.

Posted

Btw, looking at your screen capture, I see that you chain the CSV to UDTF and the Load DTI from file.

Both actions are IO actions (For example, communication, files read/write etc...), which means that they take a lot of time to complete, so they don't end in 1 ladder scan.

This might be the cause to your problem (Since you might cause some races). You should first convert the csv to udtf. The status should immediately change to "in progress" (I think the value is 1), and when the action is done, the status will either change to 0 (OK), or  an error.

If the status changes back to 0, the you can continue with loading the UDTF to the data table.

Posted

I'm unable to reproduce the problem.

I've created a CSV with 1000 rows, and converted it to UDTF.

I can clearly see that it has 1000 rows.

 

I was then also able to use UDTF Count in order to count the rows and columns, and got the right result, and I was also able to load it to the data table using Load DTI from file.

 

 

I'm using a newer version of UniLogic and PLC Firmware, so I'll check tomorrow if there was a bug with this Utility in the current official version.

 

Thanks for your help,

I am usin the V1.16 rev44, i will look for any update.

Before posting I encoded this function two times from zero, to be sure to don't make a mistake, but i probably missed something.

For the current application i gone over by reading line by line, but i will need of these function in future applications (i will try anothertime)

(more and more customers wants to log production and an intergration in the factory level of data exchange)

 

Btw, looking at your screen capture, I see that you chain the CSV to UDTF and the Load DTI from file.

Both actions are IO actions (For example, communication, files read/write etc...), which means that they take a lot of time to complete, so they don't end in 1 ladder scan.

This might be the cause to your problem (Since you might cause some races). You should first convert the csv to udtf. The status should immediately change to "in progress" (I think the value is 1), and when the action is done, the status will either change to 0 (OK), or  an error.

If the status changes back to 0, the you can continue with loading the UDTF to the data table.

 

Sorry for the confusion, This screen was for a representation wihtout showing to many lines.

I am effectively waiting status changes to 1 or 2, and then come back to 0 before loading the UDTF to DTI function

If the status is negative the function is pending, I encoded a sequencial chart (grafcet).

 

Whatever thanks for your support who never disappointed me and sorry for my english. :-)

Posted

OK, 

 

Can you supply the actual project, or a project that reproduces the problem + the CSV file.

You can send them to support@unitronics.com and ask them to forward it to me.

 

Thanks.

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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.