01-18-2023 02:31 PM
i'm having issues saving the video stream using a boolean switch. the main code this runs in is in an always on state so the video feed will always be displayed but the ability to record and save videos will be the state on a boolean switch. im very new to using case structures and im not entirely sure how to make the file close and save after the switch is set to off again.
01-18-2023 03:35 PM
01-18-2023 03:44 PM
how would i fix this so the loop will continue to go while the switch is on and true
01-18-2023 03:50 PM
01-20-2023 08:49 AM - edited 01-20-2023 08:49 AM
@Gregory wrote:
You may not care, but the "Image" data type is one of the few reference data types in LabVIEW. This means there is a buffer holding the image and if you write to the buffer in one loop, and read from it in another loop, the actual data that is read will depend on when those write and reads happen in relation to each other.
You absolutely should care because (depending on your Frame rate and other considerations) the Images you save may have rather little resemblance to the "Image" that you view in the Display Window inside the Acquisition Loop. Ordinarily, you would use a Queue or Stream Channel (yay!) to create a Producer/Consumer design that lets the Consumer "lag" the Producer, at least initially, and "catch up" without missing any data, but since what you are passing is the address of the Image Buffer in LabVIEW, if you've only allocated a single buffer, you are always passing the same thing in the Stream, so it will show whatever is in the current buffer.
Needless to say, learning how to handle images and buffers was one of the more confusing and challenging aspects of learning how to use IMAQdx to save streaming videos. I'm grateful I'm not doing that these days ...
Bob Schor