10-02-2022 10:47 AM
(I should note that many of the things that I know from LabVIEW is experimenting and watching simple video examples.) Hi! I ran into a problem that while LabVIEW is connecting through TCP, I do not get new images from my camera. Or plainly, every time I use a loop I do not get camera footage. (I know that it is because the vision acquisition block is outside the loop).
So my question is: is there a proper way to code this? the image acquisition cannot exist in every loop that I make, and it would be best if I could have a live footage at all times. I would not like to have two VIs open, as having the camera footage next to the buttons while controlling it would be ideal.
Solved! Go to Solution.
10-02-2022 11:47 AM
Once you show us the code that does not work, we can offer suggestions to fix it.
(If something is outside the loop, it of course executes only once).
Your second paragraph is confusing? Why do you need so many loops and VIs? Where is "the button"?
10-02-2022 03:53 PM
So I made a simple version of the code, which I think shows some of the problem. While sending data by TCP, or entering any other loop in the program, I do not get any new images from Vision acquisition. I know this is because well.. it is executing what it is inside this loop, and when it is done it starts to give me live footage again.
But is there a way to get a live footage all the time despite the code executing other parts of the code?
10-02-2022 06:05 PM
LabVIEW is a highly parallel Language, so you can place the vision part in an independent while loop.
Lots of your code could be greatly simplified, for example by the "Ramp pattern" function. Done correctly, You can use the outer loop for the ramping. No need for the inner FOR loop. Think state machine! You probably don't even need a case structure for the tab control.
10-03-2022 06:34 AM
Well, I'm embarrassed to say that I did not know LabVIEW was capable of parallel language, so this is a nice surprise! (I'm relatively new to this). So thankyou very much!
I looked up state machine and the tab control, and I think Ill stick to tab control just because it is a little easier for me to understand .
I do not understand however, the ramp pattern case structure even after some time of searching. (Didn't quite understand the LabVIEW help explanation either.) Is it possible for you to direct me to an explanation video or examples? or even better, if you have the time to edit my VI so I can understand how to use it the most efficient way.
Anyway, thank you for the help!
10-03-2022 10:40 AM
@GGorge wrote:
or even better, if you have the time to edit my VI so I can understand how to use it the most efficient way.
Anyway, thank you for the help!
Well, I don't have your camera hardware, so I simply use an independent loop to animate a dial. The UI loop is for the user control. See if it makes sense. Instead of sending TCP commands, I just change the value of a slider to simulate movement.