LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Show processing time when trying to copy folders with Labview

Solved!
Go to solution

See if this can give you some ideas....

(Simulation. You need to substitute your copy operations and adjust datatypes as needed)

 

(just a very rough draft! Probably needs quite a few tweaks)

0 Kudos
Message 11 of 19
(1,036 Views)

@altenbach wrote:...
  • Instead of the "clear error", just wire the error to a structure boundary to suppress automatic error handling.

Just turn it off and you will never have to create any of those wires:

thols_0-1668410664986.png

 

Certified LabVIEW Architect
0 Kudos
Message 12 of 19
(1,017 Views)

@altenbach wrote:

See if this can give you some ideas....

(Simulation. You need to substitute your copy operations and adjust datatypes as needed)

 

(just a very rough draft! Probably needs quite a few tweaks)


Thank you for your ideas.

I created an example as below.
-I tried to implement what you said as far as I understood.I hope I understood correctly. I couldn't decide whether to use the event structure.

-I don't know if there is a better way to convert -data units.

0 Kudos
Message 13 of 19
(951 Views)

Sorry, I am currently not near a computer with LabVIEW (attending GLA summit!), but please use zip when attaching archives. Nobody should be forced to install custom software just to look at attachments!

 

Yes an event structure should not be used for lengthy processes, it was just a way to avoid the greedy loop. It's the content that counts, not the framing!

 

 

0 Kudos
Message 14 of 19
(987 Views)

 

 


@altenbach wrote:

Sorry, I am currently not near a computer with LabVIEW (attending GLA summit!), but please use zip when attaching archives. Nobody should be forced to install custom software just to look at attachments!

 


So sorry. It escaped my attention.

DavidHammer_2-1668432248231.png

 

0 Kudos
Message 15 of 19
(971 Views)

Your code does not make a lot of sense. In the main loop, you are only iterating over file names, so folders are not copied, while before the loop you are recursively going over all files.

Why do you thin you need a 0ms wait. How quickly can you possibly click the button? You havent swapped the input to the subtraction, giving you negative values.

0 Kudos
Message 16 of 19
(940 Views)

@altenbach wrote:

Your code does not make a lot of sense. In the main loop, you are only iterating over file names, so folders are not copied, while before the loop you are recursively going over all files.

Why do you thin you need a 0ms wait. How quickly can you possibly click the button? You havent swapped the input to the subtraction, giving you negative values.


-I failed to copy all the folders, if I select only the filenames it copies the files, If I select the folder name the for loop doesn't even work.
-Initially, I need to scan the file with the files in it and check its size.

-Actually, I'd say di to avoid the greedy while loop. I just wanted to understand the difference with 0 ms.

-Yes, you're saying it's not necessary to check the button state very quickly, right?

 

You havent swapped the input to the subtraction, giving you negative values.

-I don't understand exactly what you want to say here.

0 Kudos
Message 17 of 19
(921 Views)

@DavidHammer wrote:

You havent swapped the input to the subtraction, giving you negative values.

-I don't understand exactly what you want to say here.


You calculate "previous tick - current tick" instead of current-previous, giving you a negative elapsed time value.

 

You could iterate over the recursive file list, calculate the destination path fro each source path, copy each individually, and create folders as needed. Not sure about performance...

0 Kudos
Message 18 of 19
(914 Views)

@altenbach wrote:

@DavidHammer wrote:

You havent swapped the input to the subtraction, giving you negative values.

-I don't understand exactly what you want to say here.


You calculate "previous tick - current tick" instead of current-previous, giving you a negative elapsed time value.

 

You could iterate over the recursive file list, calculate the destination path fro each source path, copy each individually, and create folders as needed. Not sure about performance...


DavidHammer_0-1668589907827.png

Thanks for your answers. I made the correction as follows. But I stumbled a bit on copying the whole file, but thanks for everything. Let me say that's enough for now.

 

0 Kudos
Message 19 of 19
(823 Views)