LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Long delay for save a file

Hi,

I work with an old program, that I did on windows XP computer and It works very good.

Now I have a Workstation with a XEON E 3 1275 and 32 Gb RAM Windows Professional 64 bit.

The Program works but when I want to save the data on text file or binary, it takes 2 or 3 seconds to create the file and block windows with the blue circle.

 

The problem is, these 2 or 3 seconds delay another parallel process and crash the program.

 

Do you have any idea what is the problem?

 

Regards

Diego

0 Kudos
Message 1 of 5
(2,414 Views)
I have not seen file IO block a process running in parallel with the main application.

How big is the file? Is it all being written at once or a bit at a time? Can you post any of the code related to writing the file?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(2,407 Views)

Hi Mike,

I posted an example, but it happens with small text files and only by the Open function the rest it works well when I put an artificial delay by the creation…

0 Kudos
Message 3 of 5
(2,400 Views)

I don't know what is happening, but I don't think it has anything to do with LV as your code runs fine on my computer.

 

A couple comments.

 

  1. The sequence structure doesn't do anything. Your code will run fine without it since there is sufficient data dependency to make sure everything happens in the right order. The 5 second delay does nothing on my computer but make the VI take 5 seconds longer to execute. The code worked fine without it.
  2. The lower loop never clears the DAQ task so if you are executing this VI over and over again you will be seeing a memory leak.
  3. The file is being opened with the "Create" operation. This will cause an error if the file already exists. Is that what you intended?
  4. Is there a reason that you are reading the unscaled values?
  5. You aren't actually saving the data to the file, you are saving the queue reference value - you have a wired connected in the wrong place.

What OS are you running? Also what antivirus software and firewall are you running? Do you see the same problem if you are reading the data from a simulated DAQ device?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 5
(2,382 Views)

I don't know what is happening, but I don't think it has anything to do with LV as your code runs fine on my computer.

When I try to save something, the blue circle of Windows 7 appeared and delayed another parallel process like the acquisition.

I know, it didn’t have something with LV to do. It runs good in other computers here too

A couple comments.

 

  1. The sequence structure doesn't do anything. Your code will run fine without it since there is sufficient data dependency to make sure everything happens in the right order. The 5 second delay does nothing on my computer but make the VI take 5 seconds longer to execute. The code worked fine without it.
    • I had to implement the 5 seconds to avoid the delay the data in the second loop
  2. The lower loop never clears the DAQ task so if you are executing this VI over and over again you will be seeing a memory leak.
    • Ok I will implement
  3. The file is being opened with the "Create" operation. This will cause an error if the file already exists. Is that what you intended?
    • The example is a small part from my program, I change the name with a new number  
  4. Is there a reason that you are reading the unscaled values?
    • Yes, they are pixel intensities
  5. You aren't actually saving the data to the file, you are saving the queue reference value - you have a wired connected in the wrong place.
    • When I copied the part I connected wrong, in my program it right

What OS are you running?

I use Windows 7 64bit with Labview 2012 f3 32 bit

 Also what antivirus software and firewall are you running?

I deactivated the antivirus and firewall

 Do you see the same problem if you are reading the data from a simulated DAQ device?

Yes, the problem is by saving

 

Regards

 

Diego

0 Kudos
Message 5 of 5
(2,336 Views)