LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Import Text file and duplicate frame automatically (Labview)

Solved!
Go to solution

Hi NI community
I have to deal with a problem with my Labview code.
I have to import some text files into the program, and for each text file, I need to duplicate a frame ( it will be similar to the video I described below) to control a machine, I attached the Labview file too. So when the number of file increase, it will be time-consuming.

So how can I do this work automatically, for example, I will put all the files into a folder, and for each file, a frame will be created.
If you cannot open the files, tell me.
Thanks for your attention to my post. Have a good day.

0 Kudos
Message 1 of 6
(405 Views)
Solution
Accepted by topic author Grey_shoes

Hi,

 


@Grey_shoes wrote:

for each text file, I need to duplicate a frame


I don't think so.

 

Simply list the files from your folder and load them iteratively using a For Loop:

raphschru_0-1720170430964.png

 

Regards,

Raphaël.

 

Message 2 of 6
(375 Views)

Hi Rapsh

Thanks so much for paying attention to my problem.

 

The reason why I have to do this is because I use this code to control a laser machine (the part I uploaded looks similar). For each file and each frame, there is an area that the laser passes through (the txt file contains the X and Y coordinates). When one frame is finished, it means one area is finished, the laser will turn off, and the code will work on the next frame (if the laser still turns on, it will pass through another area that I don't want). Unfortunately, I do not have permission to access the system and adjust the laser machine, so that is why I have to write the code as I posted.

 

Your code is brilliant, and I will try to do something with your code.

 

Could you please help me adjust the code as I described in the video? It would be great and absolutely, it will work for my case. 😄

 

Thanks so much, and have a good day.

 

0 Kudos
Message 3 of 6
(353 Views)

Why do you have to create a frame on the labview code for each file instead of having several arrays outputs for each file ? how much can you affect the code you're working on ? 

 

Message 4 of 6
(332 Views)

As i mentioned in the comment above ( it related to the on-off laser control) 😄 

I am a newbie, so I am not familiar with Labview, however, I think, Rapsh suggested a good idea, and when I back to work I will try his idea. Hopefully, it will work.

0 Kudos
Message 5 of 6
(326 Views)

I did it! 

Thanks for your help. Your solution worked. You made my day 😄

0 Kudos
Message 6 of 6
(290 Views)