Jump to content

Generate csv-File on WinNT machine?


Recommended Posts

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

Link to comment

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?

Link to comment

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!

Link to comment
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. :unsure: You should place the General Error Handler.vi at the end of the file IO chain. This will trap any errors for you.

Link to comment

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..... :D

Thanks a lot to all in this Topic, who help me..... :worship:

Greetings

MWS

post-474-1090220540.jpg?width=400

Link to comment

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!

Link to comment
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?... :nono:

post-2-1090262596.png?width=400

Link to comment

:oops: 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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.