LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

windows 7 application file read/write problems

Solved!
Go to solution

I'm building a few programs using labview 2009 on an XP machine. I can build these programs and have them work fine with any windows XP machine. Recently I've gotten a Windows 7 machine. I've installed the labview runtime, and daq mx without any problems. The programs seem to run fine.

 

However when I have to read or write to files nothing happens. . For instance with one program I log data and output that to a TDM file with the other I read that data and do something. I get the dialog to save the file but after I hit save no file is made. Likewise if I bring a premade TDM file from another machine I get the open dialog box but no data is imported. No Errors are reported.

 

Trouble shooting steps taken: I've tried running with administrator rights, with XP compatability mode, in the windows XP virtual machine. Has anyone run into something like this?

0 Kudos
Message 1 of 16
(4,617 Views)

Windows 7 doesn't allow you to write files everywhere, are you trying to save to c:\ for instance?

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 16
(4,600 Views)

It does not allow me to write or read. I've tried the desktop and my documents, which are the most important. I'll try the C drive though.

0 Kudos
Message 3 of 16
(4,589 Views)

Which VIs are you using to read/write the TDM file?

0 Kudos
Message 4 of 16
(4,556 Views)

I'm using the read/write to measurement file express vi.

 

I'm also using the MS Office Report express Vi that we paid extra for. All this POS does is crash when used in an executable. This is a non-windows 7 issue its just a general Ni issue. Pitty it seemed like such a nice time saving Vi during development.

 

I think I might have issues with dependencies, or maybe how I'm setting up the program. Although I'm not sure where to start.

0 Kudos
Message 5 of 16
(4,550 Views)
Solution
Accepted by topic author markog

Regarding the "read/write to measurement file express vi"

 

You indicated that nothing happens?  you don't even get an error message?

 

Usually, when nothing happens that indicates that you actually ARE getting an error, but you did not wire through the error cluster to an error handler.  to see the error, you'll need to check the error cluster and pop up a dialog when an error occurs.

http://www.medicollector.com
Message 6 of 16
(4,541 Views)

Just to clarify the situation, you built an exe in LV 2009 on an XP machine and brought the exe to a Win7 machine, right?

If yes, besides LV RTE and DAQmx, did you also install USI on the Win7 machine? USI is necessary for reading/writing TDM files. You can check/include USI in the installer in Additional Installers page of AppBuilder, the same way as you include LV RTE.

Message 7 of 16
(4,528 Views)

Good Morning. I'm having an identicalissue, but I wanst able to figure out this solution. In simialr fashion (LV 2009 on Win7 machine), I've typically written my executables to write data files to c: so when I deploy the software, I dont have to account for different names. On Win7, this is no longer possible. Can somebody please point me towards a way to define a path constant so I can write and read from a file in a known location without the use having to select a path? Sorry, Ive been looking all night for the solution, just havent been able to get it worked out.  (I did instal the USI files with the Installer) I appreciat the thoughts.

0 Kudos
Message 8 of 16
(4,362 Views)

You should not be using hard-coded paths for the exact reason why you're having problems now. That's just lazy programming on your part. You should be providing a path control with its value set to a default location. Or, you can provide a way to set that through a config file, external to the app.

0 Kudos
Message 9 of 16
(4,353 Views)

It would be lazy of me if I knew how to execute this and not do it, versus asking someone how to properly do it. It would have been a lot easier to simply say "hey ,how about you use the Application tool , and wire it with your constant name using the Build A Path tool, and wire that into write file VI, should work great."

 

No need to be insulting.

 

And, FYI, there are very specific reasons to write to C:\, I'm just too lazy to to tell them to you.

Message 10 of 16
(4,347 Views)