Forums › BB Series Discussions › BB60C matlab bbgetiq.m example code › Reply To: BB60C matlab bbgetiq.m example code
jgauthier
Participant
Back at it after a week’s vacation…
I realized I was calling libpointer with the wrong parameters, so I changed it to:
triggerCount = int32(70); % size of the trigger array (32-bit int)
% from SDK example "iq_external_trigger.cpp"
triggerArray = 0:0:triggerCount; % array where we'll store trigger events...
triggers = libpointer('int32', triggerArray); % pointer to array of 32-bit ints
...
status = calllib('bb_api','bbGetIQUnpacked',handle,iqarrayptr,iqcountint,triggers,triggerCount,purgearg,nullptr,nullptr,nullptr,nullptr);I still get an error, but it’s
Parameter must be scalar.
Error in libpointer (line 21)
ptr=lib.pointer(varargin{:});
Error in bbgetiq (line 67)
triggers = libpointer('int32', triggerArray); % pointer to array of 32-bit intsAre there any working examples of calling that C-library function from MATLAB? I’m stumped.
