08-29-2007 10:08 PM - edited 08-29-2007 10:08 PM
Message Edited by Maclean on 08-29-2007 10:09 PM
08-30-2007 04:56 PM
Hi Maclean,
Thanks for compiling the files to mex for me. I am having trouble though. I created the following program in matlab.
[Image_Parameters_:_Image_Type] = begin_image_acquisition
for i = 1:2
[Acquired_Buffer_Number, Image_Pixels_(U8)] = acquire_image_array(Image_Type)
image(Image_Pixels_(U8) )
end
stop_acquire;
I am getting the following error :
Error: File: c:\mfiles\mex\progA.m Line: 3 Column: 20
Missing variable or function.
I think something is wrong with the begin_image_acquisition function. Any thoughts? Maybe the underscores in the [Image_Parameters_:_Image_Type] output variable are screwing things up? I also noticed a couple things that puzzled me. The imaq session and error parameter are not being passed out of begin_image_acquistition function, but the acquire_image_array function needs them (at least in labview it does).
Thanks,
Ruz
08-30-2007 05:17 PM
Hi again Maclean,
As a follow up. I noticed that having a colon in the output argument is confusing matlab when I call the mex file. However, when I change the syntax I still get an error. For example... at the cmd prompt I typed in
>> [test] = begin_image_acquisition
??? One or more output arguments not assigned during call to 'begin_image_acquisition'.
I think the colon in the output name in labview is screwing up the conversion to the mex function and the output variable is not getting passed to matlab correctly. I found the following on the mathworks web site. See below.
For Versions of MATLAB up to MATLAB 6.1 (R12.1):
Warning: One or more output arguments not assigned
during call to ‹function›.
For MATLAB 6.5 (R13):
??? One or more output arguments not assigned
during call to ‹function›.
Explanation:
One of the functions you have called is defined to return an output argument but that output argument does not exist in that function when it tries to return.
Common causes:
You have misspelled the name of one of your output arguments inside your function, or you have forgotten to assign a value to one of the output arguments of your function. Alternatively, the function was originally written with one or more output arguments, but the section of the function that computed the output argument was removed or modified in such a way that the output argument is now extraneous.
08-30-2007 05:28 PM
08-30-2007 06:54 PM
Ahh. Okay. I will see if I can do that.
I appreciate your help.
-Ruz