04-06-2024 08:57 PM
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.
04-07-2024 10:16 AM
04-07-2024 03:56 PM
I think I did it I'm sorry I'm really new to labview!!
04-07-2024 08:24 PM
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?
04-07-2024 09:55 PM
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.
04-08-2024 09:28 AM - edited 04-08-2024 09:47 AM
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.
04-08-2024 09:38 AM
@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.
04-08-2024 09:55 AM
I don't see any functionality for saving your DAQ reading to a picture, is it coming from another source?