Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Exposure / White - Black Voltage settings on PCI-1410 Frame grabber

Solved!
Go to solution

Hello,

 

I am using a PCI-1410 frame grabber and have written the acquisition software in Visual Basic .NET.

 

In measurment studio there is a button that automatically sets the white and black voltages based on the input voltages to the channel.

 

I want to impliment this in my VB.NET code.  I am aware of the "CWIMAQ.BlackReferenceVolt " and  "CWIMAQ.WhiteReferenceVolt" properities BUT is there something that will auto set the voltages?  I am asking because i have fond no function that will probe to find what the highest and lowest voltage is which is nessasary to dynamically set the voltages.

 

Thanks

 

Jonathan

0 Kudos
Message 1 of 7
(5,059 Views)

Hi Jonathan,

 

I do not see any built in functions for this but you can write a small algorithm to do this. Follow this link: Auto Exposure -take a look at Page 1, Mathieu Steiner's post.

--Michelle

National Instruments
0 Kudos
Message 2 of 7
(5,041 Views)

Hi Michelle,

Thanks for the info. I am having a problem using the histogram command.

I wrote a simple function that is excuted on Button2 click but the code program crashes when i get to the final line.  Is there something I am missing? 

 

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim CWIMAQVision3 As New NationalInstruments.CWIMAQControls.CWIMAQVision
        Dim HistogramReport As New NationalInstruments.CWIMAQControls.CWIMAQHistogramReport
        CWIMAQVision3.Histogram2(AxCWIMAQViewer3.Image, HistogramReport)

 

Thanks again

0 Kudos
Message 3 of 7
(4,966 Views)

 The error is as follows

Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

 

0 Kudos
Message 4 of 7
(4,962 Views)
It seems that you are working with another Applications Engineer regarding this issue via email?
--Michelle

National Instruments
0 Kudos
Message 5 of 7
(4,945 Views)

I sent an email but have not yet recieved a response.

 

I think the problem has to do with how I am difining the CWIMAQVision.

 

Is there supposed to be a CWIMAQVision in the tool box as there is a CWIMAQ and CWIMAQViewer?  Because in the example code I see, CWIMAQViewer is not difined as i do.

 

Thanks

Jonathan

0 Kudos
Message 6 of 7
(4,936 Views)
Solution
Accepted by topic author Jomile

Through forum searching.  If found the solution below to create the IMAQVision control.  Im assuming the reason that it was not available is because I do not have the vision license installed

 

        Dim IMAQVision As New NationalInstruments.CWIMAQControls.AxCWIMAQVision
        IMAQVision.CreateControl()

0 Kudos
Message 7 of 7
(4,932 Views)