LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cant get my loop to run and display images without crashing

I have been trying to get this code to work for days if any of yall can help it'd be appreciated :). But in summary the program is supposed to simulate record ekg data points(this is basically just the simulated code).  and cycle through 10 pictures 30 seconds each. I have almost everything done it just crashes and doesn't run fully only displaying the first pic.

0 Kudos
Message 1 of 8
(637 Views)

Hi mr5,

 

to get more help it would be nice to downconvert your VI to LV2020 or older before attaching! (File->Save for previous).

Not all of us use the very latest LabVIEW versions…

Best regards,
GerdW


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

I think I did it I'm sorry I'm really new to labview!!

0 Kudos
Message 3 of 8
(562 Views)

can you explain what happens when it "crashes"? Crash to desktop? become unresponsive?

 

The code is a bit of a mess with hidden wires, front panel and diagram maximized for no reason. Why are there so many wired bends???? Do you really need to re-list the folder whenever you want to display an image? Why don't you set the pattern to guarantee that only images are listed? Your event structure is hidden inside a case structure but locks the panel whenever an event is queued up. The STOP terminal might not get noticed until the event structure can execute. Why isn't the stop terminal inside its event case?

 

Do you get any errors? Your image display seem to be linked to some data acquisition?

 

Maybe your images are in a weird incompatible  format. Can you attach a few images and maybe reduce the code to just display the images, leaving all the other stuff out. Will it still crash?

0 Kudos
Message 4 of 8
(535 Views)

previously what would happen is that file would run but only display the first image before essentially getting stuck in some infinite loop not moving on to the next picture. Beyond that I'm so new to Labview that half of the questions you're asking me are flying over my head I don't really know what you mean by set a pattern, I don't get any errors as far as I can tell really it just runs infinitely without displaying the next image and when writing the acquired data all it spits out is the user id followed by "_unnamedTask<1>" instead of the simulated sinusoidal points. Ive been messing around with the code now for hours but every edit I make either breaks the loop completely or breaks the pictures to the point where the jpeg block doesn't even recognize that there even is jpeg image in the folder. I checked also to make sure the images are all jpg's/jpegs and nothing I don't whats going on honestly.

0 Kudos
Message 5 of 8
(523 Views)

Note that we don't know what you intent to do.

 

The Display image state gets it's image path from a control before the loop. This will pass the data in that control in the wire, once.

 

Put a probe on the path in the state, you'll see it never changes once the path entered the loop.

 

If you want the Display image state to use the current value of the path. put the control in the loop, or in the Display image state.

 

wiebeCARYA_0-1712587624535.png

 

0 Kudos
Message 6 of 8
(497 Views)

@mr5labview wrote:

previously what would happen is that file would run but only display the first image before essentially getting stuck in some infinite loop not moving on to the next picture. 


OK, this is not "crashing" by any definition of the term. After displaying one image, your code unconditionally goes to the daq step, and maybe it locks up there? You seem to blame the image display step so it would be easy to test by just autoindexing over the image in a FOR loop and display each. I am pretty sure the problem is with your code logic, not with displaying images.

 

I think the main problem is your unfamiliarity with LabVIEW and dataflow programming. Maybe you should continue with the learning resources listed at the top of the forum.

0 Kudos
Message 7 of 8
(489 Views)

I don't see any functionality for saving your DAQ reading to a picture, is it coming from another source?

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 8
(478 Views)