LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating application for archiving data from the mobile device in LabVIEW.

Solved!
Go to solution

Just voted 🙂

Message 31 of 45
(2,097 Views)

Thanks Blokk, yes i understand almost everythink and i know about help in Labview i check it but i was need know some specific things, but everythink is clear. But i dont stop aplication when i cancel event in change folder or copy folders and files. i need , that the application stil working,unless exit button is pressed.

 

I have this conditions:

 

1. When is application frist time launched and event select path to list its content is automaticaly launched and user cancel it -----> message Application is complete.

2. When user select path to list its content and click to change folder and then click cancel change folder-------------> application is still working, with data wich are content in browser before.

3. When user click to copy some selected data and then cancel select target ------------------------> application automaticaly launch event select path to list its content.

4. When user pressed exit button application is complete.

0 Kudos
Message 32 of 45
(2,073 Views)

@Noro wrote:

Thanks Blokk, yes i understand almost everythink and i know about help in Labview i check it but i was need know some specific things, but everythink is clear. But i dont stop aplication when i cancel event in change folder or copy folders and files. i need , that the application stil working,unless exit button is pressed.

Change the error wire connection, connect to stop condition after the Event structure. In this way you will capture errors right after the actual Event case fired. After this you need to handle the errors!

 

I have this conditions:

 

1. When is application frist time launched and event select path to list its content is automaticaly launched and user cancel it -----> message Application is complete.

The first time launch you get File Dialog msg before the Event structure (so this is not the Event select path case!). When the user cancels it, it will generate error (code 43). You need to hande this error too. I put an Error Case structure around the Event case for now, but you can handle this other ways too.

2. When user select path to list its content and click to change folder and then click cancel change folder-------------> application is still working, with data wich are content in browser before.

Capture and erase this error, so the application will not stop in this condition.

3. When user click to copy some selected data and then cancel select target ------------------------> application automaticaly launch event select path to list its content.

This is not clear what you want in this case. I just modified the code here to not do anything after cancel, the app still waits for the user in the Event structure. (I put the target folder Dialog inside the Event structure)

4. When user pressed exit button application is complete.

This part is already functional. Exit button = Abort copy proc ("Cancel op!"). Change its text to "Exit" if you wish.

 


Ok, the above steps should have been programmed by you. Try to understand the functionalities, and also think about how the code could be simplifed/modified to get the same desired functionality. Learn by doing it.

USB_browser_v3_BD.png

Message 33 of 45
(2,053 Views)

There is still a little bug in the code, but I let you fix it.

Hint: after you specify a new Source path ("Change_start_folder"), this new path information is not kept for the next Event case (like when you specify the Target folder). Use a shift register to keep this info!

 

USB_browser_v2-4_BD__.png

Message 34 of 45
(2,038 Views)

Thank you blokk so much, I will try learn everythink about it, lets do it!

0 Kudos
Message 35 of 45
(1,988 Views)

Everythink work good! 🙂 Thanks so I make one more thing what i would like to do. It is image (jpeg or png) insight from array. I need one button 'VIEW' , which can doing insight of image wich i mark in browser (array) in real time. 

Now i make insight only for jpeg files, which are display every time after your copy or if you abort select target folder event.

 

How to make it? I need read index array and convert it to path for loading image files? But i think i need some conditions too (when files are not images -> jpg or png).

So, one more time - one button, which can do insight of image, which i mark in browser in real time. 

 

 

image view.png

0 Kudos
Message 36 of 45
(1,964 Views)

@Noro wrote:

Everythink work good! 🙂 Thanks so I make one more thing what i would like to do. It is image (jpeg or png) insight from array. I need one button 'VIEW' , which can doing insight of image wich i mark in browser (array) in real time. 

Now i make insight only for jpeg files, which are display every time after your copy or if you abort select target folder event.

 

How to make it? I need read index array and convert it to path for loading image files? But i think i need some conditions too (when files are not images -> jpg or png).

So, one more time - one button, which can do insight of image, which i mark in browser in real time. 

 

 

image view.png


First of all, tidy up your Block Diagram! You have wires and other objects overlapping, so difficult to follow what you try to do. Like the "target path" wire coming from the File Dialog: I have no idea why I see there a node at the right side of the FOR loop. You should attach your VI, and not a screenshot. I do not want to do all of your home work, try to make it, you are not too far, I give you some hints:

  1. Tidy up your BD!
  2. "So, one more time - one button, which can do insight of image, which i mark in browser in real time. ":
    1. If I understand well what you seek, when the user marks items (files) in browser, you want to have a kind of pre-view of the jpg files in a Picture Indicator?
    2. You should use the Events when the user clicks on items in the browser, so you do not need a new button for this. You could use the mouse up event.
    3. Use the Point to Row Invoke node when click on a new item in the listbox. I give here some hints how to do it:

Example_VI_BDsfsd.png

 

 

 

0 Kudos
Message 37 of 45
(1,934 Views)

Sorry, yes I know, but I clean it up as soon as it will be good funcionality. I am beginer in Labiew so sorry for my mistakes.

Btw If I need preview not only jpeg files, but png files too, what will the condition?

0 Kudos
Message 38 of 45
(1,915 Views)

If you program on a messy block diagram, it can also make you have more mistakes since you do not see some wires, objects. So it is a better way to have clean BD from the beginning, just an advice.

 

About the conditions: Case structures can accept string types too connected to their selector node. It is pretty simple what you can do: extract the extension info of the file name string, so the last three characters, using string functions. After this, you can setup your Case structure to have 3 cases:

  1. "jpg" : here use the jpg conversion functions
  2. "png" : use the png conversion function
  3. "Default" case: just connect an empty Picture constant to the Picture indicator, so do nothing.
0 Kudos
Message 39 of 45
(1,898 Views)

Example_VI_BDbbbb.png

0 Kudos
Message 40 of 45
(1,880 Views)