Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

set_CameraAttribute

I am using an NI PCI-1426 Camera Link frame grabber to interface with a Dalsa P2-2x 8K40 digital camera. I am programming using IMAQ under C#. I have been able to grab images and start and stop acquisitions using the IMAQ AcquireImage, Start, Stop, etc. methods. I have also tried to change parameters in the camera itself  using the set_CameraAttribute method. If I set a property and read it back, it appears in the code that it is successful (no error and the value read back is what it was just set to). However, the property change does not have any affect on the camera's performance (if I make the same change from MAX, the camera very clearly responds). It appears that
the change is happening only in the C# control itself and is not being communicated to the camera. Is there another command necessary to actually send the information to the camera? I am making sure that acquisition is halted before changing the properties. To check myself I have changed Getting Started example which is shipped with IMAQ but has not got any positive results. There is the code which I have added to the example:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_Click
    CWIMAQ1.set_CameraAttribute("DataMode", "8 Bit")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_Click
    CWIMAQ2.set_CameraAttribute("DataMode", "10 Bit")
End Sub
Where is the problem? What should I do in order to solve it?
0 Kudos
Message 1 of 5
(3,723 Views)

Hi 20

 

When you run this code do you encounter any errors? The syntax looks correct, however changing camera attributes will only be temporary, the defaults are what is set in Measurement and Automation Explorer. Make sure you are not changing attributes and then reinitializing the camera.


Thank You
Eric Reid
National Instruments
Motion R&D
0 Kudos
Message 2 of 5
(3,709 Views)
I haven't seen any errors. Moreover I've added a line of code which performs a CWIMAQ1.get_CameraAttribute("DataMode") command immideatly after the CWIMAQ2.set_CameraAttribute("DataMode", "10 Bit") command and the result that I've got back was "10 Bit" , but images which were coming back from the frame grabber were 16 Bit images.
0 Kudos
Message 3 of 5
(3,696 Views)

Hi 20,

 

LabVIEW uses 8-bit or 16-bit image depth.  When a 10 bit image is saved, it would be saved as a 16 bit image with 6 empty bits.

Stephen Meserve
National Instruments
0 Kudos
Message 4 of 5
(3,682 Views)
I'm sorry I've sent a request for 8Bit image but qot back 16Bit
0 Kudos
Message 5 of 5
(3,669 Views)