04-07-2010 05:06 PM
I have a JAI BM 500-CL camera, and NI PCIe 1427 card. I could use Measurment & Automation (MAX) to access my camera, and do a grab. during grabing, I could adjust the camera attributes in MAX, for example, exposure time, and at the same time, looking at the image window of MAX, to find out what is the best setting for my experiment. at the end, save the change, exit MAX and later if I use labview, these setting are kept defualt. this is convenient. Can I do the same thing in a VI instead of MAX? I know you could use SetCameraAttribute.vi to set a value to that attribute, but once you set, you could not change it during grab. I tried to modify the example, LL Grab.vi, to put a SetCameraAttribute.vi in the loop, but it seems not work. then I tried to add another IMAQ start.vi in the loop too. but got an error message, saying " there is no IMAQ start". I wonder if anyone else tried.
thanks,
t.z.
04-08-2010 01:41 AM
04-08-2010 09:03 AM
Due to the way camera serial commands work in the camera file, the acquisition must be started and stopped when changing any camera attributes. Basically it is due to the fact that many serial actions can change certain parameters of the acquisition. In MAX, when you are changing things while it is acquiring, MAX is silently stopping the acquisition, changing the attribute, and starting it back up again.
If you want to control some features while acquiring (say exposure time) you can always just directly send the camera-specific commands using the serial read/write VIs in your appliction. Otherwise you can simply restart the acquisition each time like what MAX does.
Eric
04-09-2010 01:29 PM
hi, Muks,
this is a VI which I modified by Bluechees's suggestion.
regards,
t.z.
04-09-2010 01:33 PM
Hi, Bluecheese,
i tried to follow your idea and modified my VI, each time when I tried to modify an attribute, I use IMAQ stop.vi, then set the attributes and start again. one thing is the system response very slow. it seems working, but one more problem showed up: you did not see smooth moves in the image windows, but like slow motion. I wonder why. see the attached VI in above post.
regards,
t.z.
04-10-2010 10:22 AM
You have the right idea, but you made a few mistakes. Here are the problems:
1. Remove both sequences. They aren't doing anything for your program.
2. Remove the 1000 msec delay when changing the attributes. That just slows down your program.
3. I assume you want it to update the attributes whenever you press the Reset button. If this is true, you need to switch the True and False cases. Right now it updates the attributes every time through the loop unless you press Reset.
4. I don't know if the frame number is reset when you stop and start an acquisition. If it is, you will need to reset your frame number also. You would need to use a shift register to store the frame number instead of the loop index.
5. If you must acquire every frame, change the number of frames in the acquistion setup to be a larger number like 30 or so. With 1 frame, you can only get the next image. If missing frames is fine, I would remove the wire for the frame index (connected to loop counter) and just let it return the next image.
There may still be other issues with your code, but this should get you going.
Bruce
10-29-2010 10:45 AM
I am looking for a camera file for the JAI BM500CL. Can you help?
10-29-2010 12:53 PM
Yes:
I C D file in the link below 🙂
http://sine.ni.com/apps/utf8/nipc.product?pid=8793&asid=1102
-AK2DM
10-29-2010 02:52 PM
Great. Thanks!