11-18-2008 11:47 AM
11-18-2008 05:59 PM
11-18-2008 09:42 PM
http://forums.ni.com/ni/board/message?board.id=200&message.id=11721&requireLogin=False
Take a look at this thread, on the second page one of your techs says
Hi -
Even if you don't have a license for
Vision you can still use some methods on the CWIMAQVision control,
including the File I/O methods such as WriteBMPFile.
Greg Stoll
Vision R&D
National Instruments
11-19-2008 10:30 AM
Hey,
If another engineer says that it can be done, its possible that it can be. However, in the documentation I looked in, it said that function (at least write PNG) fell under VDM, meaning you would need an active copy. I would try the BMP to see if that works for you.
As far as entering values, I did not need to enter any when I created that code, I just used the code I gave you. (This is for the original writePNG code) after creating a CWIMAQVision object on the fp.
11-19-2008 01:01 PM - edited 11-19-2008 01:02 PM
From your code:
CWIMAQ1.Interface = Text1.Text
What have you defined Text1 to be?
11-19-2008 01:21 PM
That was part of the example, and was left as default.
The only thing I added at all was the vision object and the one line of code.
11-19-2008 07:39 PM
11-20-2008 10:04 AM
Hey timmkish,
I'll look into it some more, but I don't believe that you need the () where you are getting your error, I did not have that and my code worked.
Since we are having so much trouble with this, I might reccomend opening an example, running a simple snap with no save, making sure it works. Then adding only the save line of code. Nothing else extra, just to make sure that you can do this before implementing the wait.
11-20-2008 11:57 AM
Chris,
That's what I'm trying to do.
Except all of the Snap examples I've opened thusfar, do not have an CWIMAQ object on the form. So I have to do two steps, add the CWIMAQ object in the designer window, then add the single line of code. I've tried doing that and I'm getting that same error.
11-20-2008 12:04 PM
Actually, I just found an example code in
F:\Documents and Settings\All Users\Documents\National Instruments\NI-IMAQ\Examples\MSVB.NET\Triggered Sequence\Triggered Sequence.vbp
that has the CWIMAQ object already part of the code. Without modifying any part of the example code, running the program generates the exact same interface error on this line
CWIMAQ1.LoadInterfaceDefaults()
What is interesting is the previous three lines of code:
CWIMAQ1.Images.RemoveAll()
CWIMAQ1.Images.Add(NumBuffers)
CWIMAQ1.Signals.Item("TriggerLine1").Initialize(LineType.SelectedIndex, NationalInstruments.CWIMAQControls.CWIMAQSignalActions.cwimaqCaptureStart,
NationalInstruments.CWIMAQControls.CWIMAQSignalPolarities.cwimaqActiveHigh, LineNumber.SelectedIndex)
execute fine! So the CWIMAQ object is at least partially behaving. It's something to do with the CWIMAQ interface that keeps causing the error