Example LabVIEW Apps - Dashboard, CMUcam2 and Motors

Danny Diaz and I have created a couple of example LabVIEW applications for everyone to use. In particular, we hope that you’ll find the Dashboard and CMUcam2 applications to be very useful.

For the next week or so, you’ll be able to access the files via NI’s FTP site. There are 4 files - all titled “LabVIEW…zip”. We’ll need to move the files to a different location in the next few days but we’ll keep the link up-to-date.

[strike]The zip files are password-protected. We’ll publish the password tomorrow at noon EST.[/strike]

DISCLAIMER - some of the user manual docs in the CMUcam2 zip file are still being worked on. We’ll let you know when new versions have been released.

Good Luck!
Russ

The password is:
[strike]LVFRC2006![/strike] - EDIT: All passwords have been removed.

Have Fun!

We have a new version of both the Motor Sim Application and the CMUCam2 Application.

The motor sim application should be functionally the same, but for those of you who are interested in how it works, this new version will be a little easier to follow.

For the CMUCam2 application, there is a major new feature that allows you to use tracking line mode 2 (see the camera reference) which returns only statistics about each line instead of a bitmap of the tracked pixels. This allows you to get nearly 8 updates / second. Mode 1 (tracking bitmap) will run at just over 2 updates / second. Given that the target is a rectangle, it should be possible to get all the information available about the target in mode 2. This will hopefully prove useful in preparing the camera for use on the RC.

The update also fixes a possible problem with the frame grabbing function that would cause the frame to not be fully downloaded from the camera. This was most often evident when using a USB to RS232 converter as opposed to a standard serial port.

The updates are located at the NI FTP Site for now.

Good luck!
-Joe

Are you guys ready for a [new version of the LabVIEW CMUCam2 App](ftp://ftp.ni.com/outgoing/FRC/LabVIEW CMUCam2 App.Update.2006.01.17.zip)?

It’s posted in the usual place.

This time we sport the correct display of YCrCb data (no more purple, YEA!). You also have the ability to look at each color channel individually, now. While you are looking at a particular channel, you can select a color like always, except it will only limit the tracking to that channel. The other channels will be ignored. This way if you look at each of the channels and see a large contrast in one of them, then you can look specifically for that. When you change color space, these channel displays change too (though the names in the controls don’t… sorry :frowning: ).

Also, note the smaller library size. That’s the result of removing all the lovely default images of Russ’s place. :wink:

Best of luck!
-Joe

I’m attaching a test release of the frame CMUCam2 App in an attempt to figure out what the trouble is that people are having with the download bar repeating and failing to grab more than one frame. Try this version and let me know what your results are. :confused:

Thanks!
-Joe

LabVIEW CMUCam2 App.Update.2006.01.25.zip (761 KB)


LabVIEW CMUCam2 App.Update.2006.01.25.zip (761 KB)

I believe we’ve figured out what’s going on. Some people’s serial ports are unbuffered and the VISA driver is unable to keep up with the camera’s processor which sends one byte immediately after the another. This can cause overflows and loss of data. This specifically applies to VISA error -1073807252 which indicates a hardware buffer overflow in the UART. I’ve added an option to the CMUCam2 LabVIEW Application allowing you to make the camera wait a certain number of bit periods between each byte that it sends. This will slow your transfers, but will eliminate the overflows.

Please let me know if you are unable to resolve the problem (specifically the error listed above) by increasing this delay. This isn’t expected to solve any other errors. :wink:

Cheers!
-Joe

LabVIEW CMUCam2 App.Update.2006.01.27.zip (775 KB)


LabVIEW CMUCam2 App.Update.2006.01.27.zip (775 KB)

This link will no longer be active once the maintenance scripts clean the files up, which could be any day now. A more permanent place has been found for the “base” files, you can access them via the NI Developer Zone which is fully searchable.

-Danny

Here is an update for the LabVIEW Dashboard application. It was found that on computers using a USB-to-Serial converter the Dashboard would occasionally spike its CPU utilization. To correct this the “Dashboard Read” VI has been modified, but there is no need to modify the “Dashboard Display” - hence it is recommended you replace your “Dashboard Read” VI with the one contained within the attached file.

-Danny

LabVIEW Dashboard 1-28-2006.zip (403 KB)


LabVIEW Dashboard 1-28-2006.zip (403 KB)

Here is another update for the CMUCam2 GUI App. This one should be more robust with frame grabbing. It should be able to reliably restart a new frame grab if a former one fails. Give it a try and let me know if it resolves any of your issues.

Thanks,
-Joe

EDIT: Correct file posted now. Had tracking problem.

LabVIEW CMUCam2 App.Update.2006.01.31.zip (793 KB)


LabVIEW CMUCam2 App.Update.2006.01.31.zip (793 KB)

I have finally just decided to combine the “base” LabVIEW CMUCam2 Application and the most recent “patch” into one export, it is my hope this will make using this application a lot easier for those new to this experience.

LabVIEW CMUCam2 Application (1-21-2007) [http]](http://labview8.ni.com/pub/frc/Full LabVIEW CMU Cam2 App (1-21-2007).zip) [ftp]](ftp://ftp.ni.com/pub/frc/Full LabVIEW CMU Cam2 App (1-21-2007).zip)

Dig in! :stuck_out_tongue:
-Danny