LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error 1430

Solved!
Go to solution

I was trying to code a vi that is capable of writing a text log file whose name includes the date and time, but it does not create text file and create error 1430. When I deleted format date/time string function and wired the name of the file directly to the open file function, it worked without errors. What is wronh here?

Egemen
Download All
0 Kudos
Message 1 of 6
(8,341 Views)

Its because you have "/" in your date (for example 27/02/2013). Windows wont allow that. Replace that with some other allowed character and you will be fine.


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 2 of 6
(8,339 Views)

I checked its result and it does not write "/", it uses dot in indicator (27.02.2013) in date. Oh ok, I recognize that it uses semicolon while writing time. How could I change it?

 

 

Egemen
0 Kudos
Message 3 of 6
(8,331 Views)

Then it will be the ":" in the time stamp. It is not a good idea to do this without using proper formats, as %c  displays local-specific time stamp. So if it is used elsewhere or if someone changes the system settings, your code will error. So you may want to specify a proper format which will remain constant instead of %c

Also use close file http://zone.ni.com/reference/en-XX/help/371361J-01/glang/close_file/ after you have written to it to close the reference you opened. This is good practice.


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 4 of 6
(8,319 Views)
Solution
Accepted by topic author newbieeng

I tend to format my data/times for a file something like this:


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 6
(8,310 Views)

Thank you Crossrulz. I got it.

Egemen
0 Kudos
Message 6 of 6
(8,300 Views)