LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

executable problem

Hi guys,
another puzzle for you:
 
For some reason (don't ask me why) I seem to have the wonderful honour of sorting out all the labview problems for the company. (No that isn't yet the puzzle). Anyway an ex-employee wrote a hideously complicated, convoluted VI which controls some tests we do to our magnets, This has always worked fine so I've never tried to clean it up! Recently we have bought a second logger, so I built an excutable from this program and put it on the new computer. Now this executable has been working absolutely brilliantly for about a week, however has managed to break down.
 
So you have a labview executable which you connect to a magnet, and then press start, the technicians can't change anything on the front panel or get to the code. The logger the program is on is simply disconnected from one magnet, wheeled to the next and then they click start. So as far as I can see nothing could have changed.
 
The problem is now when the program is stopped (by the user) the program automatically uses a write to spreadsheet vi, naming it C:\folder\folder\folder\test"date stamp". I.e just takes a standard folder, adds "test" and the time/date stamp. This has also worked fine. However now when you stop the program it comes up with an error message! Saying the file path we're trying to write is invalid with the OS. I.E we must be trying to save a file with some punctuation that Windows can't handle!
 
So how would you fix this? I can't get into the code on the Executable so I don't see how it could have gone wrong??
 
Any ideas?

Thanks
Jon
0 Kudos
Message 1 of 9
(2,576 Views)
Hi Jon,

did you check the time/date format settings of Windows? When using default settings LV uses the Windows format for it's timestamp, maybe this computer is set to "YY/MM/DD" (or alike) which may collide with Windows filename conventions...

When using time/date functions I prefer to use a "strictly typed" format without any slashes or colons like "YYYYMMDD_HHMMSS"Smiley Wink

And no, you can't get into that executable - you have to change the sources and create a new one!


Message Edited by GerdW on 03-28-2008 10:46 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(2,573 Views)

Well this is where the problem lies...

The program had been running fine on the same computer for a good week untill yesterday. I'm sure the technicians wouldn't have touched the settings on the windows clock! So the strange thing is the program has stopped working with seemingly no settings changed. The only difference is the whole logger has physically been moved 10m along our test bay! Does that make sense? I mean it hasn't occured when moving the program onto a new computer or anything like that!

I guess I'll have to spend hours digging through code and make it more tolerant? Sounds like a fun afternoon ahead!

Jon

0 Kudos
Message 3 of 9
(2,558 Views)
Does it write to c:\ or some network drive?
 
maybe the drive letters has changed, or if it's badly coded, someone could have removed one of the 'folder' folders and the program does not check for this but simply assumes the filestructure is intact?


Message Edited by Tohatsu on 03-28-2008 07:19 AM
0 Kudos
Message 4 of 9
(2,551 Views)

Yeah have checked for that, however surely even if it was missing it would just write to a new folder with that name anyway?

 

Then only thing that has changed is it has been connected to a different magnet, so could something different on the connection change something like this? It's all seems very bizzare?

 

Could something like this occur if a technician say didn't close the program properly? or restarted windows during a crash? (not that any have admitted to this!)

Thanks

Jon

0 Kudos
Message 5 of 9
(2,546 Views)
Hi Jon,

"even if it was missing it would just write to a new folder with that name anyway?"

NO!!! LabView will not create new folders when you want to write to non-existing path!

"
not that any have admitted to this" I wouldn't admit, when I'm only a technician Smiley Very Happy Did you make a simple drive check (chkdsk...)?



Message Edited by GerdW on 03-28-2008 02:03 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(2,544 Views)
Ok but the folders still are as expected!
 
You must love our technicians who stopped work for two days as they couldn't figure out that on my computer I auto-hide the task bar....
 
Anyway I'll have another play and come back with what i find!
 
Thanks
Jon
 
0 Kudos
Message 7 of 9
(2,533 Views)
You've probably already checked this; But is it possible that folder properties were changed?

It may no longer be possible to write to that directory for some reason. 
---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 8 of 9
(2,518 Views)
Hi guys thanks for the help!
 
Just for all you out there wondering, i have fixed it by going into his code and whacking in a search and replace sub string into the file path. Searching for :,@ etc and replacing it with an _.
 
Seems to have sorted out the problem!
 
Thanks
Jon
0 Kudos
Message 9 of 9
(2,508 Views)