01-07-2010 03:39 PM
01-08-2010 10:46 AM
Hi haploanddogs,
Can you give more detail about how you are interfacing between ML and LabVIEW? Did you build the LabVIEW VI into a DLL and then are now calling it from ML? Is this all occuring on the same computer?
Thank you for choosing National Instruments.
Aaron
National Instruments
Applications Engineer
01-08-2010 11:16 AM
I have built the vi into a .dll. I have a very simple script that creates pointers for the program to use, then passes them by refrence. Attached is the matlab call to the dll. Interestingly if I pass by pointer I get a -200474 error, however if I use a direct refrence I get a -50352 error. I am not quite sure what is going on.
>> loadlibrary('check_speed_jitter','check_speed_jitter.h')
>> meanHZ=libpointer( 'doublePtr', 0 );
>> std_dev=libpointer( 'doublePtr', 0 );
>> MAXtime=libpointer( 'doublePtr', 0 );
>> MINtime=libpointer( 'doublePtr', 0 );
>> ErrorCode=libpointer('int32Ptr',0);
>> get(ErrorCode)
Value: 0
DataType: 'int32Ptr'
>> [a,b,c,d,f,g,h]=calllib('check_speed_jitter','Check_Speed_Jitter',40,ErrorCode,meanHZ,std_dev,MAXtime,MINtime)
>> get(ErrorCode)
Value: -50352
DataType: 'int32Ptr'
>> num_in=libpointer('int32Ptr',40)
>> [a,b,c,d,f,g,h]=calllib('check_speed_jitter','Check_Speed_Jitter',num_in,ErrorCode,meanHZ,std_dev,MAXtime,MINtime)
>> get(ErrorCode)
Value: -200474
DataType: 'int32Ptr'
Regards,
01-12-2010 12:24 AM
Hi haploanddogs,
Have you checked out this Developer Zone? It talks about using the Math Interface Toolkit to convert VIs to MEX-files which can be used by ML.
Regarding error -200474 and -50352, can you tell at which point (which VI) the error is occuring in your copiled DLL?
Thank you for choosing National Instruments.
Aaron P
National Instruments
Applications Engineer