Closed Monkeymerlot closed 4 years ago
Are you saying that even if the image is updated in an “UI: update” state it will still have flicker, because the imaq image is updated by ref? Delaying front panel updates blight be a good way to go. Would that be driven by the timeout frame?
I think the reason it flickers is because we write the background image, then the overlay. So it goes Image + overlay ->image->image + overlay. I did some investigating and I think that it would just be best to create a new reference, work with that, then write it to the imaq indicator, and then close the original reference.
I fixed this by working with a "work" reference and then copying over to the IMAQ control, which is in its own state now:
Refresh Render: Display Background: Data Initialize:
IMAQ is by reference, so if you change things using that reference, it will update in real time. This can cause some flicker. See this gif: (edit: you cant see flicker in gif because frame rate is too low, so I removed it)
There are a few ways to resolve this issue. First, is by delaying front panel updates until the entire operation is done. Second, is making a copy of the reference using IMAQ Copy.vi, work using this copied reference, and then at the end update the indicator with the new backend reference. I am not sure which one of these would be best so I am open to ideas and suggestions.