LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case structure

Hi,

I have vi in which I extract image from live image then my program will analyze light intensity catched in camera. I want to run my code in continuous mode. After I cropped the image, I want to have same cropped image which will be analyzed according to light intensity in each loop without interruption. How can I program so that in each loop cropped image will be analyzed without interruption?

0 Kudos
Message 1 of 11
(3,077 Views)

Hi Michael,

 

How can I program so that in each loop cropped image will be analyzed without interruption?

Delete the case structure to have that part of code called everytime - not just when "OK button 2" is TRUE…

What doy ou mean by "interruption"?

 

You really should cleanup your code…

Why are there 3 event structures in parallel?

Why do 2 of them handle the same events?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 11
(3,072 Views)

Thanks for reply. But I want to crop image when I press Ok button. Otherwise the program will prompt to crop image directly after I run the program. Before cropping image, I set exposure, pixel values on front panel after running the program. These values change always to predefined values after I hit start live button.  Although I set new default values to these properties by data operations on front panel. But it changes again after pressing start live button. 

0 Kudos
Message 3 of 11
(3,061 Views)

I mean with interruption that the light intensity shown in graphic set to zero after loop ends. 

0 Kudos
Message 4 of 11
(3,057 Views)

@GerdW wrote:

Why are there 3 event structures in parallel?


Even worse, they are in series Smiley Wink

0 Kudos
Message 5 of 11
(3,055 Views)

Hi Michael,

 

Before cropping image, I set exposure, pixel values on front panel after running the program. These values change always to predefined values after I hit start live button.

Maybe because you are writing to a lot of propertynodes of these controls?

 

Again: you should cleanup your VI. It may also help to start over with a clean nice code architecture!

 

I mean with interruption that the light intensity shown in graphic set to zero after loop ends.

There is no code executed "after loop ends", so I don't see where "light intensity" is set to zero…

I also don't see any "light intensity" control or indicator.

 

(In case you are more comfortable in German you should post in the www.labviewforum.de …)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 11
(3,054 Views)

This code architecture is default that I installed this code directly online.

0 Kudos
Message 7 of 11
(3,044 Views)

Hi Michael,

 

This code architecture is default that I installed this code directly online.

Nobody forbids you to improve or replace that "default code found online"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 11
(3,035 Views)

As I am beginner in Labview. I don't have too much idea on how to cleanup code architecture efficiently. Could you help me on how to program pixelclock, framerate and exposure on the front panel so it will not change after hitting start live?

0 Kudos
Message 9 of 11
(3,010 Views)

Hi Michael,

 

As I am beginner in Labview

… you should take the training resources offered in the header of the LabVIEW board.

Learn LabVIEW!

 

I don't have too much idea on how to cleanup code architecture efficiently.

As this is not LabVIEW-specific: you should atleast have some ideas about code architectures in general…

 

Could you help me on how to program pixelclock, framerate and exposure on the front panel so it will not change after hitting start live?

As I wrote before: you write to those controls (or their property nodes) in way too much places.

Clean up your VI - or start with a fresh new VI. Then implement a nice architecture.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 11
(2,947 Views)