Forums › BB Series Discussions › BB60C matlab bbgetiq.m example code › Reply To: BB60C matlab bbgetiq.m example code
jgauthier
Participant
- bbConfigureIO(int32(0), int32(64))
- bbConfigureIQCenter(CenterFreq)
- bbConfigureIQ(downsample, bandwidth)
- vsgSetFrequency(CenterFreq)
- bbConfigureIQCenter(CenterFreq)
- bbInitiate(uint32(4), uint32(0))
- vsgSubmitTrigger()
- vsgSubmitIQ(iqPtr, count)
- vsgFlushAndWait()
- GetIQData(iqCount, purge)
Andrew,
Still not seeing triggers. Could it be the order I’m executing things?
I tried switching the order of vsgFlushAndWait and GetIQData, but it makes no difference.
In GetIQData, I have:
function [status, iqArray] = GetIQData(handle, iqCount, purge)
nullPtr = int32(0);
purgeArg = int32(purge);
iqArrayPtr = libpointer('singlePtr', zeros(iqCount*2, 1));
iqCountInt = int32(iqCount);
triggerPtr = libpointer('int32Ptr', ones(4,1)); % pointer to array of 32-bit integers
triggerCount = int32(4); % size of the trigger array (32-bit int)
status = calllib('bb_api','bbGetIQUnpacked',handle,...
iqArrayPtr,iqCountInt,triggerPtr,triggerCount,...
purgeArg,nullPtr,nullPtr,nullPtr,nullPtr);
calllib('vsg_api', 'vsgFlushAndWait', handle);
fprintf('Triggers:\n');
triggers = triggerPtr.Value;
disp(triggers);
% Convert results to complex numbers
iqArray = reshape(iqArrayPtr.Value, 2, iqCount);
iqArray = iqArray(1,:) + 1i * iqArray(2,:);
iqArray = transpose(iqArray);
end % of GetIQDataAnd I still find no triggers – disp(triggers) shows:
Triggers:
0
0
0
0Any hints?
Thanks,
JonG
