MWS Posted July 9, 2004 Report Share Posted July 9, 2004 Question: Does it function to generate a csv-files on a Windows NT machine? Description: To programming my LabView Process, i use a Windows 2000 System. On this machine i programmed my VI to generate a csv-File with many data in there. The data is about a Test-Process. No on my Windows 2000 machine, the LV will create this csv-File in the Folder, which i'v had created. My Hardware (NI-PCI-Cards) are on the 2nd machine, a Windows NT machine! No i will use my VI in the Process on the Windows NT machine. But the LV didn't create a csv-File in the Folder!!! I check the data in the VI during it's running. The data were create, but the file didn't create! I used the Error-Handling, but the VI didn't get a Error back. How's about this? Could it doesn't function to create a csv-File on a Windows NT machine?? I need your help........ Thanks in advance Greeetings MWS Quote Link to comment
Bryan Posted July 9, 2004 Report Share Posted July 9, 2004 I've saved data on NT machines in CSV format before and never had a problem. Windows 2000 is NT based, so I don't understand why it would do it for one and not the other. Now, the file system structure might be different. Did you put your path for your new file in a constant in your diagram, or are you prompting for it, or specifying it at run time? Would you be able to provide a screen shot of your code so that we can look at it for you? Quote Link to comment
MWS Posted July 14, 2004 Author Report Share Posted July 14, 2004 I've saved data on NT machines in CSV format before and never had a problem. Quote Link to comment
Bryan Posted July 14, 2004 Report Share Posted July 14, 2004 Use probes (Right click over a wire and select "probe") to make sure that the correct file path is getting to your "Open File.vi". Also, I see that you're using "\" in your file paths. While that's the windows native method of specifying paths, I have always used "/"s when specifying file paths in LabVIEW and it has always worked for me. Using a "\" is the native method of specifying a file path in your address bar and in some programming languages, but I believe that using "/", which is used for relative paths is what's used in LabVIEW. I'm not sure if LabVIEW accepts the "\" character as anything other than when specifying a literal character. Give that a shot, converting all "\"s in your file paths to "/"s and see if that helps, I hope it works! Quote Link to comment
Michael Aivaliotis Posted July 14, 2004 Report Share Posted July 14, 2004 You will see that we have put the Path into a Ini-File. The Path call "c:\Fehlerlisten".I create the Path on my System, but teh VI didn't creat the csv-File! 1151[/snapback] I think the best way to debug this would be to probe the path going into the Open/Create/Replace File.vi. If this looks good then another thing to look at is permissions. Are you logged in as an administrator? Sometimes file writing to certain directories are limited to specific user levels. It is strange however that none of the VI's give you errors. You should place the General Error Handler.vi at the end of the file IO chain. This will trap any errors for you. Quote Link to comment
MWS Posted July 16, 2004 Author Report Share Posted July 16, 2004 Thanks a lot to you. I will use our Tipps and try it on my Win NT machine... After the weekend i will write my cognitions in this Topic! Nice Weekend.... MWS Quote Link to comment
MWS Posted July 19, 2004 Author Report Share Posted July 19, 2004 Morning.... So i have positive cognitions!! I'll try the VI witch a path like this: c:Fehlerlisten Now it's running.....the Problem was about the Path-creating from a simple String! When you use the \ then on the Windows 2000 System it makes the right Path! But when you use this Backslash in the WinNT System, than it makes the Path false! So i use than only a : in my ini-File and it works. Because the LV makes then the Backslash self! Now i'm very happy that my VI works good..... Thanks a lot to all in this Topic, who help me..... :worship: Greetings MWS Quote Link to comment
Bryan Posted July 19, 2004 Report Share Posted July 19, 2004 Wow, that's strange, I've never tried it that way. I've always put paths in as: c:/dir1/dir2.../file.ini I've never omitted the forward slashes or backslashes. Regardless of how you fixed it, I'm glad to hear you got it working! Quote Link to comment
Michael Aivaliotis Posted July 19, 2004 Report Share Posted July 19, 2004 Now it's running.....the Problem was about the Path-creating from a simple String!When you use the \ then on the Windows 2000 System it makes the right Path! But when you use this Backslash in the WinNT System, than it makes the Path false! So i use than only a : in my ini-File and it works. Because the LV makes then the Backslash self! 1172[/snapback] I've always put paths in as: c:/dir1/dir2.../file.ini I've never omitted the forward slashes or backslashes. 1175[/snapback] Are you guys using the built-in ini functions that come with LabVIEW? If you use these config VI's you should never run into compatibility issues because this is handled automatically. I hope you're not creating the path yourself using strings are you?... Quote Link to comment
Bryan Posted July 19, 2004 Report Share Posted July 19, 2004 I thought he was talking about the path TO his ini file. I didn't know he was talking about using a file path that he was reading from an ini file. Agreed, I would hope that he would store and read it as a path instead of a string. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.