ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error reading a text file?

Solved!
Go to solution

Hi,

 

I'm trying to add an NI SOFTMOTION TABLE in my project using a text file containg the data of the points that I want to use to perform a contour move and, Labview opens it but returns an error message to me ''ERROR READING FILE''. Actually, I can see all my points in the table in Labview but it creates one more row at each column where a message ''unreadable'' comes written.

 

Any idea of how to solve it?

 

Thanks in advance!

0 Kudos
Message 1 of 8
(3,709 Views)

Hi,

 Please attach the text file which you are trying to read..

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 2 of 8
(3,703 Views)

Hi srikrishnaNF,

 

Thanks for your reply. Attached you can find the printscreen of the situation (the error message that I get) and also the file that I'm trying to read.

 

Regards,

Massalamano.

Download All
0 Kudos
Message 3 of 8
(3,693 Views)
I don't understand what you're using to read the file. Is it Solidworks, or LabVIEW? If it's LabVIEW, what exactly are you using?
0 Kudos
Message 4 of 8
(3,678 Views)
Solution
Accepted by massalamano

Just shooting in the dark:

from the picture it seems that there is a problem with the last line of the file,

that incidentally is an "empty " one (only an end of line).

What happens if you remove this empty line?

Marco

0 Kudos
Message 5 of 8
(3,668 Views)

Hi everyone,

 

I'm trying to control from Labview the motion of a mechanism that I've designed in Solidworks. Actually I've done it. The problem is that I'm now trying to perform a contour move. In the project manager window I have to add an ''NI SOFTMOTION'' table. As NI says in a tutorial, I have to write the values for the table in a text file. I did it... Then I just have to go to the Labview project manager, right click on my ''computer'' and select ''new'' and choose ''NI SoftMotion Table''. That's how that window comes up! Then I have to upload the file... That's when I get that error message.

 

I really don't know how I could eliminate a free space...

 

I hope I've explained it better and you all could understand it and help me to find a solution.

 

Thanks to all of you!

0 Kudos
Message 6 of 8
(3,641 Views)
As Marco indicated, it may be due to the fact that the text file has 2 blank rows at the bottom. I suspect it's trying to parse an empty line. Just delete the blank lines at the bottom of the text file with a text editor.
0 Kudos
Message 7 of 8
(3,633 Views)

Thank you everyone for your help. It's ok now. The problem was exactly with the two empty lines at the bottom of the table.

 

Once again thank you!

0 Kudos
Message 8 of 8
(3,623 Views)