Jump to content

USB Camera Error


Recommended Posts

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

Link to comment

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)

  • Like 1
Link to comment

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)

Link to comment

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.

  • Like 1
Link to comment

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.

post-18102-094355100 1284408251_thumb.pn

post-18102-052943400 1284408320_thumb.pn

Link to comment

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 by ShaunR
  • Like 1
Link to comment

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.

  • Like 1
Link to comment

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. biggrin.gif

Link to comment

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. biggrin.gif

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 :) )

Link to comment

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...

Link to comment

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 :oops:

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.

Link to comment

Huwaaaaahhhhh ShaunR,

It's work perfectly ! laugh.gif

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, worshippy.gif Ehehehe...

Is there any appreciation in this forum like NI forum (mark as a solution) ?

Link to comment

Huwaaaaahhhhh ShaunR,

It's work perfectly ! laugh.gif

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, worshippy.gif 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 by ShaunR
Link to comment

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?

Link to comment
  • 2 weeks later...

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?

Link to comment

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.

Link to comment

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?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.