10-13-2008 09:25 PM
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
Solved! Go to Solution.
10-15-2008 09:16 AM
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.
10-27-2008 10:39 PM
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
10-27-2008 11:03 PM
The error is as follows
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
10-29-2008 08:49 AM
10-29-2008 09:38 AM
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
10-29-2008 11:05 AM
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()