Papang Posted September 13, 2010 Report Share Posted September 13, 2010 Hi everyone, I was create USB camera trough TCP/IP connection. The objective is client side display whatever server side record, it's just look like yahoo messenger web camera system but in one way communication only. I have 2 sets of program but has same objective. -Testing Camera-client(1)&Testing Camera-server(1) is blinking. -Testing Camera-client&Testing Camera-server is very slow. I really appreciate your help guys. Thank you. Testing Camera-Client (1).vi Testing Camera-Server (1).vi Testing Camera-Client.vi Testing Camera-Server.vi Quote Link to comment
ShaunR Posted September 13, 2010 Report Share Posted September 13, 2010 The IMAQ USB library is ancient.. It was a quick fix before Measurement & Automation explorer supported USB and has many issues such as memory leaks and and the installer has issues with win7. I strongly suggest you use the measurement & automation explorer first and use the image libraries to interface to it. However. To stop the blinking you could try selecting "Synchronous Display" by right-clicking on the image indicator and selecting "Advanced>>Synchronous Display". If that fails then you are probably receiving incomplete/corrupted packets or you are timing out, reading nothing and then updating the display.. The second one is so slow because you have put a 500ms wait in the loop and a receive time-out of 500 ms.Remove the wait ms and use the default time-out (i.e don't wire it) 1 Quote Link to comment
Papang Posted September 13, 2010 Author Report Share Posted September 13, 2010 Hi ShaunR, Thank's for your advices, but the first is still blinking but not fast as the previous one. Is there any other solution? And for the second, if I remove wait ms. The client side not display any image from the server side. So I decide to reduce the amount from 500 to 160 and it works but the display is not smooth really. Is there any other solution or advice what should I do? Thank you. The IMAQ USB library is ancient.. It was a quick fix before Measurement & Automation explorer supported USB and has many issues such as memory leaks and and the installer has issues with win7. I strongly suggest you use the measurement & automation explorer first and use the image libraries to interface to it. However. To stop the blinking you could try selecting "Synchronous Display" by right-clicking on the image indicator and selecting "Advanced>>Synchronous Display". If that fails then you are probably receiving incomplete/corrupted packets or you are timing out, reading nothing and then updating the display.. The second one is so slow because you have put a 500ms wait in the loop and a receive time-out of 500 ms.Remove the wait ms and use the default time-out (i.e don't wire it) Quote Link to comment
ShaunR Posted September 13, 2010 Report Share Posted September 13, 2010 Hi ShaunR, Thank's for your advices, but the first is still blinking but not fast as the previous one. Is there any other solution? And for the second, if I remove wait ms. The client side not display any image from the server side. So I decide to reduce the amount from 500 to 160 and it works but the display is not smooth really. Is there any other solution or advice what should I do? Thank you. I can't actually run your code to try things because I'm running windows 7. Maybe someone else might have more luck installing it. But. Try something like this. Make a copy of the image and transmit the copy. 1 Quote Link to comment
Papang Posted September 13, 2010 Author Report Share Posted September 13, 2010 I have do what you ask, but it's still blinking Here is the block diagrams. I can't actually run your code to try things because I'm running windows 7. Maybe someone else might have more luck installing it. But. Try something like this. Make a copy of the image and transmit the copy. Quote Link to comment
ShaunR Posted September 13, 2010 Report Share Posted September 13, 2010 (edited) Make sure that your camera is working properly in Measurement and automation explorer. It should auto-detect your camera and In the main window area you can press "Grab" to make sure you get an image. Use this for capture instead (I've saved a version in LV 9.0 and 8.5) This I can test an works fine (no flashing, fast frame-rate @ 640x480) Edited September 13, 2010 by ShaunR 1 Quote Link to comment
Papang Posted September 14, 2010 Author Report Share Posted September 14, 2010 Wow, It's work ShaunR. Thank you very much. Quote Link to comment
ShaunR Posted September 14, 2010 Report Share Posted September 14, 2010 Wow, It's work ShaunR. Thank you very much. Sweet. Those old USB drivers should be taken off the NI site. I've just noticed I forgot to "Dispose" the IMAQ image reference. Not a big deal in this case but this is how memory leaks start. 1 Quote Link to comment
Papang Posted September 14, 2010 Author Report Share Posted September 14, 2010 Sorry disturb you again.But when I open it at the second time, the error comes out like this.. You know why, so i cannot open the files again. Here the error. Quote Link to comment
Papang Posted September 14, 2010 Author Report Share Posted September 14, 2010 Is it because I'm using version 8.5? I read from NI forum tells the errors comes from 8.5 bugs, so I need to move on version 9.0 SP1. Is that correct? I haven't try yet, so any other opinion? Quote Link to comment
ShaunR Posted September 14, 2010 Report Share Posted September 14, 2010 Is it because I'm using version 8.5? I read from NI forum tells the errors comes from 8.5 bugs, so I need to move on version 9.0 SP1. Is that correct? I haven't try yet, so any other opinion? It's difficult to say why. But as NI have reported this as a bug in 8.5 for loading vi's saved to a previous version then its likely to be the case. As you were able to load it the first time.I would suggest you over-write the vi from the zip. Then reboot to make sure memory is clean, and open the VIs again. You should now be in the same position as when you downloaded the file originally (hopefully). If you are able to load the VI again, save it to a different location so that it is not a "converted" vi. Hopefully by doing this whatever the issue is with loading converted VIs will be removed. I have also posted the VIs diagrams below (they aren't difficult). It would only take a few minutes to re-write them. 1 Quote Link to comment
Papang Posted September 14, 2010 Author Report Share Posted September 14, 2010 I was able to get the original file zip that you posted yesterday. I able to open it again, run it, it works then I close it, try to open again and the error comes out. And then I try to create my own programs based on your VIs diagrams, it works but when I open, the error comes out again. But let me try your VIs diagram that you just post, I think there is something different from your previous VIs. I will let you know if any progress. By the way, thank you for assisting me here. Quote Link to comment
ShaunR Posted September 14, 2010 Report Share Posted September 14, 2010 I was able to get the original file zip that you posted yesterday. I able to open it again, run it, it works then I close it, try to open again and the error comes out. And then I try to create my own programs based on your VIs diagrams, it works but when I open, the error comes out again. But let me try your VIs diagram that you just post, I think there is something different from your previous VIs. I will let you know if any progress. By the way, thank you for assisting me here. Yes you are right. Apart from adding the "Dispose" I also removed the conversion from an image to an array (and visa versa) as I indicated in my previous post. Although I don't think it will solve your problem (but we can hope ) Quote Link to comment
Papang Posted September 15, 2010 Author Report Share Posted September 15, 2010 Yes you are right. Apart from adding the "Dispose" I also removed the conversion from an image to an array (and visa versa) as I indicated in my previous post. Although I don't think it will solve your problem (but we can hope ) Hi ShaunR, The VIs diagrams thatt you post yesterday, it works but the image display is non-current like stammering.But no error at all... Quote Link to comment
ShaunR Posted September 15, 2010 Report Share Posted September 15, 2010 Hi ShaunR, The VIs diagrams thatt you post yesterday, it works but the image display is non-current like stammering.But no error at all... Yes. That is because it is in fact a single reference (something I always hated about the vision stuff but I guess a necessary evil). So we really need to use something that makes a copy of the image and transmits that rather than the reference But we cannot use the conversion to an array because you cannot open it (is that right?) Try changing the standard flatten to string to the IMAQ one. Quote Link to comment
Papang Posted September 15, 2010 Author Report Share Posted September 15, 2010 Huwaaaaahhhhh ShaunR, It's work perfectly ! I was tried to close the Vis, open it again, run it, close it, open it again, run it (ehehehe) several times and no error. Thank you so much ! Thank you for assisting me this far, Ehehehe... Is there any appreciation in this forum like NI forum (mark as a solution) ? Quote Link to comment
ShaunR Posted September 15, 2010 Report Share Posted September 15, 2010 (edited) Huwaaaaahhhhh ShaunR, It's work perfectly ! I was tried to close the Vis, open it again, run it, close it, open it again, run it (ehehehe) several times and no error. Thank you so much ! Thank you for assisting me this far, Ehehehe... Is there any appreciation in this forum like NI forum (mark as a solution) ? Sweet. Press the green plus "+" on the right of my post. As you are using TCPIP to transmit your data. You might want to take a look at dispatcher. Edited September 15, 2010 by ShaunR Quote Link to comment
Papang Posted September 16, 2010 Author Report Share Posted September 16, 2010 Sweet. Press the green plus "+" on the right of my post. As you are using TCPIP to transmit your data. You might want to take a look at dispatcher. I press the green + until my limit out. ehehe.. I saw your dispatcher but I'm not really understand on it, I'm still newbie in LabView world. But thank you for introduce me something new. If I have any question, may I ask you again? Quote Link to comment
ShaunR Posted September 16, 2010 Report Share Posted September 16, 2010 If I have any question, may I ask you again? That's what we're here for Quote Link to comment
Papang Posted September 16, 2010 Author Report Share Posted September 16, 2010 That's what we're here for Ahahaha, Thank you, By the way, do you know any learning center for labview in malaysia? Quote Link to comment
ShaunR Posted September 16, 2010 Report Share Posted September 16, 2010 Ahahaha, Thank you, By the way, do you know any learning center for labview in malaysia? Talk to your sales rep or contact the regional office National Instruments Asean 1 Quote Link to comment
Papang Posted September 26, 2010 Author Report Share Posted September 26, 2010 Hi ShaunR, I have a question regarding these VIs. I want to put play and stop button at the client side. So when I press play, the camera show the images and when press stop, camera stop receiving the images from the server. And that case may loop over and over again. Is it possible to implement? Quote Link to comment
ShaunR Posted September 26, 2010 Report Share Posted September 26, 2010 Hi ShaunR, I have a question regarding these VIs. I want to put play and stop button at the client side. So when I press play, the camera show the images and when press stop, camera stop receiving the images from the server. And that case may loop over and over again. Is it possible to implement? Yes. Take a look at Data Client.vi and Data Server.vi in the NI examples. Quote Link to comment
ShaunR Posted September 26, 2010 Report Share Posted September 26, 2010 Give this a try. 1 Quote Link to comment
Papang Posted September 26, 2010 Author Report Share Posted September 26, 2010 Give this a try. Hi ShaunR, The programs was work perfectly. But when I press stop button in the client side, the programs was stop running. I put a while loop over the client diagram to make it able to play again after it stop but it doesnt work. (what i'm trying to do is client side able to play and display the image from the server side even its stopped, so it able to play over and over during system running) Do you know how? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.