- AuthorSearch Results
Found in Replies
rpettingill posted on October 6, 2020 at 5:57 am View this postIn reply to: SM200C TCP/UDP packet format?
rpettingillParticipantLike I said, API usage won’t be possible on an embedded device with no OS.
As a future feature request, maybe create an abstracted packet protocol that allows low level interfacing, and all your proprietary chip configurations can be handled internally? Just something to consider to reach more customers.
Found in Replies
Andrew posted on October 5, 2020 at 11:11 am View this postIn reply to: SM200C Phase Noise with pulsed input
AndrewModeratorrpettingill,
No the Spike software is not capable of measuring phase noise on a pulsed signal. There is no synchronization mechanism built in to software to synchronize to a pulse. Additionally, the measurement duration can be > 1 second depending on what phase noise offsets are selected. You wouldn’t be able to get much resolution on a 5us pulse.
If possible, I would recommend using a CW output on your transmitter, or you would need to roll your own phase noise measurement using our API or trying to capture the pulse in zero-span and post-processing the captured I/Q waveform.
Regards,
AndrewFound in Replies
Justin Crooks posted on October 2, 2020 at 11:19 am View this postIn reply to: SM200C TCP/UDP packet format?
Justin CrooksModeratorThe protocol to simply configure a center frequency contains commands to directly set registers on about a dozen different chips, writes values to FIR filters to optimize IF flatness and image rejection at the frequency selected, and digital tuners to center the frequency of the I/Q data. The API handles all of this behind the scenes.
Found in Replies
Andrew posted on September 24, 2020 at 11:13 am View this postIn reply to: BB60C matlab bbgetiq.m example code
AndrewModeratorSo, you would want to set purge to false. Purge tells the API to throw away any accumulated data in the API, which would include your waveform and trigger location. Once you set purge to false, you will also need to poll the API until you see the trigger position.
Regards
Found in Replies
Andrew posted on September 24, 2020 at 8:18 am View this postIn reply to: BB60C matlab bbgetiq.m example code
AndrewModeratorAre you setting purge to true in that example? Effectively flushing any data and triggers that have accumulated?
I see only one GetIQData function call. The BB60C is a streaming device, so how much data do you have accumulated before the actual trigger occurs? Are you sure the trigger isn’t buffered in the API and you just haven’t polled it yet through the getIQ function?
The BB60C API only stores about 1/2 second of I/Q data. If this buffer fills, it will be forced to wrap it’s internal circular buffer. If it takes you 1/2 second to call getIQ after configuring you might have discarded that I/Q data.
Ideally, you would be polling the BB60C in another thread and waiting for the trigger to occur or transmitting the VSG60 waveform and trigger in another thread while you poll the BB60C in your main thread. That way there is no worries about any I/Q accumulation buffers overflowing. If your VSG60 waveform is short, that is probably not the case here, but worth noting.
Found in Replies
- 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)
jgauthier posted on September 23, 2020 at 9:50 pm View this postIn reply to: BB60C matlab bbgetiq.m example code
jgauthierParticipantAndrew,
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 GetIQData
And I still find no triggers – disp(triggers) shows:
Triggers: 0 0 0 0
Any hints?
Thanks,
JonGFound in Replies
Andrew posted on September 23, 2020 at 8:15 am View this postIn reply to: I/Q Capture duration
AndrewModeratorDhivagar,
Please check your email, as I have responded to these questions through email.
I am copying my email response below.
The “export as CSV” feature in Spike will only export the data that is visible on the Spike display. Spike can only display up to 4 million points at a time. The recording feature can record much longer durations of I/Q than the “export as CSV” feature. If you need recording longer than 4 million points, you will need to use the recording feature in zero-span mode or use the API and program a custom recording solution. You cannot record longer than this using the CSV feature in Spike.
The data that is stored in the CSV files when using the “export as CSV” feature, is I/Q values. Each line of the file is one I/Q value separated by a comma. Each I/Q pair is separated by a newline. Each I/Q value is scaled to mW. To convert to power (dBm) use the equation 10*log10(i^2*q^2).
You can learn about the I/Q file format when using the Record I/Q feature in zero-span by looking at the Spike user manual on page 77. https://signalhound.com/sigdownloads/Spike/Spike-User-Manual.pdf
The I/Q data store in the recording file is stored as full scale 16-bit complex integers.If you want to convert the I/Q recording to a CSV file, you will need to write a program to parse the binary file. You can do this in any programming language or environment such as MATLAB if you have access to such. We do not provide any such conversion utilities.
Regards
Found in Topics
DDR posted on September 21, 2020 at 5:23 am View this postTopic: SA44B With SCIPI
in forum SA Series DiscussionsSA44B is working fine with SCPI commands. But, I am facing some issues in span settings.
I want to check the frequencies with a 2GHz span.
When set to 2GHz span, peak tracking is not proper & suddenly the application is closing.
With a 100MHz span, it is working fine. But with 100 MHz, i need to change that parameter for every 100MHz and have to run the application.
So I want to set wider span or is there any API to move the peak to the center?
Can anyone suggest me a solution for this problem?
Found in Replies
Andrew posted on September 17, 2020 at 9:48 am View this postIn reply to: bbConfigureIQ maximum filter bandwidth?
AndrewModeratorjgauthier,
80% is a good number to use across the board. I will say, there is a trick you can use to ensure you are always getting the maximum available bandwidth. If you simply set the bandwidth equal to the sample rate (100%), then after you configure the receiver you can call the bbQueryStreamInfo function, and it will report the bandwidth that was actually used by the API. It will internally clamp to the upper bound for each given decimation.
The maximum bandwidth for any given decimation was calculated by looking at the decimation filters available at each decimation stage and making a decision about what cutoff frequency is going to give us the performance we need at that given rate.
Regards,
AndrewFound in Topics
jgauthier posted on September 17, 2020 at 7:21 am View this postTopic: bbConfigureIQ maximum filter bandwidth?
in forum BB Series DiscussionsFor the bbConfigureIQ function, how is the Maximum Bandwidth column on page 22 of the BB60 API manual calculated? Are these approximated? Some are exactly 0.8 * SampleRate, others are a bit more. I realize they’re maximums, and I can specify narrower filtering…
I’m just trying to decide if I should just use that 80% across the board as a max bandwidth, or populate a table using a 14×2 array and choose a particular decimation/MaxBW pair…
Found in Replies
Andrew posted on September 10, 2020 at 8:31 am View this postIn reply to: BB60C not working with HDSDR v2.80
AndrewModeratorHi jraymond,
I have heard reports of this as well. We haven’t used or compiled the HDSDR project in a few years. I believe some customers have got this working by recompiling the project against the latest BB60C API. There have been hardware changes since our last HDSDR release such that the newer APIs are needed to interface BB60Cs. You could try dropping in the latest BB60C API to see if that works.
I’m not sure when we will swing back to this project. Maybe some other customers here could make some recommendations.
Regards,
AndrewFound in Replies
Andrew posted on September 8, 2020 at 12:24 pm View this postIn reply to: BB60C matlab bbgetiq.m example code
AndrewModeratorJon,
Here is some code to get this going.
First, you will want to ensure you configure the external port to accept a rising edge (or falling) external trigger.
calllib('bb_api', 'bbConfigureIO', handle, int32(0), int32(64));
The best time to call this would be right after opening the device and only once. The 64 is taken from the header, it is the value for BB_PORT2_IN_TRIGGER_RISING_EDGE (0x40).
Then you will want to create a trigger array and count just like the iq data.
% Trigger parameters triggerptr = libpointer('int32Ptr', zeros(4, 1)); triggercount = int32(4);
In this instance I am creating an array of 4 integers to store trigger positions. If I am only expecting 1 trigger, then an array of one will work fine.
Now I need to call bbGetIQ with these new parameters.
status = calllib('bb_api', 'bbGetIQUnpacked', handle, ... iqarrayptr, iqcountint, triggerptr, triggercount, purgearg, ... nullptr, nullptr, nullptr, nullptr);
And pull out the array when it returns
triggers = triggerptr.Value;
If a trigger occurred during this capture of I/Q, you will see it in the trigger array.
disp(triggers);
Might show
230722 0 0 0
Meaning an external trigger event occurred at sample index 230722 (zero-based).
Regards,
AndrewFound in Replies
jgauthier posted on September 8, 2020 at 8:38 am View this postIn reply to: BB60C matlab bbgetiq.m example code
jgauthierParticipantBack 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 ints
Are there any working examples of calling that C-library function from MATLAB? I’m stumped.
Found in Replies
jgauthier posted on August 28, 2020 at 3:29 pm View this postIn reply to: BB60C matlab bbgetiq.m example code
jgauthierParticipantI’m getting there, but having problems with MATLAB.
I started with the
bbgetiq.m
in the SDK, and modified it by trying to redefine the arraytriggers
and the size of ittriggerCount
as specified in the API manual forbbGetIQUnpacked
.I tried:
triggerCount = int32(70); triggers = libpointer('int32', triggerCount); calllib('bb_api','bbGetIQUnpacked',handle,iqarrayptr,iqcountint,... triggers,triggerCount,purgearg,nullptr,nullptr,nullptr,nullptr);
but MATALAB complains:
Error using calllib Array must be numeric or logical or a pointer to one
I can’t figure out how to properly define an array of integers ‘triggerCount’ long…
Found in Replies
Andrew posted on August 27, 2020 at 12:46 pm View this postIn reply to: BB60C matlab bbgetiq.m example code
AndrewModeratorThanks for the clarification.
Yes, you would need to call the vsgSubmitTrigger function from Matlab which you should find easy if you glance at the other wrapper code in VSG60 matlab class.
You could create a loop like this
while(forever) {
vsgSetFreq
vsgSubmitTrigger
vsgSubmitIQ(your_iq_cw_array)
}The trigger is submitted inline with any other function calls to the API.
Hope this helps.
Regards,
AndrewFound in Replies
Andrew posted on August 27, 2020 at 8:58 am View this postIn reply to: BB60C matlab bbgetiq.m example code
AndrewModeratorJGauthier,
You will need to write a dedicated function for that. A wrapper function around the GetIQ functionality should be adequate for performing any triggering on the I/Q data. You could perform video or external triggering with this function. (you didn’t specify trigger type in your message) If external triggering, there is a C++ example showing you how to detect an external trigger event, you would need to then align your capture on the trigger position and collect any additional samples required (with purge disabled to ensure continuity)
The API does not perform any triggering for the user, only provides the facilities for triggering to be performed.
Let me know if you have specific questions as you work through this.
Regards,
AndrewFound in Replies
jgauthier posted on August 27, 2020 at 8:34 am View this postIn reply to: BB60C matlab bbgetiq.m example code
jgauthierParticipantThanks! Is there any example MATLAB code to collect IQ data upon a trigger input from the VSG60 to the BB60? Going through the SDK, all I find on triggers is in the API, not any of the sample code. I.e, do I have to add to VSG60.m to get trigger output status, or should I write a dedicated function for that?
Found in Replies
Andrew posted on August 21, 2020 at 11:31 am View this postIn reply to: BB60C matlab bbgetiq.m example code
AndrewModeratorHi Jgauthier,
This is a good question. The reason this is called twice has less to do with the purge parameter, and more to do with wanting to discard the first chunk of I/Q samples in the stream. Your assumptions about the purge parameter are correct. There are potentially several FIR filters (depending on settings) that are in the signal processing chain when I/Q streaming. These filters take hundreds/thousands of samples to ‘charge’ and until they do, the I/Q samples will not be amplitude accurate. By calling the function once with the purge parameter, this ensures that the first large segment of I/Q samples subject to this charge time are discarded. This is not necessary, but if you do this, doing this only once after each configure is adequate.
Another interesting component of this, the first call to GetIQ might not purge any samples, as there may not be any samples collected yet on the PC. So the worst case scenario is that the first call is just waiting until some samples arrive on the PC, and the second call is the one that actually purges that first chunk of I/Q to arrive.
Feel free to try just 1 call and see if that affects your application.
Also, waiting some small amount of time (100ms) before calling getIQ after configuring the receiver would ensure that the first call to GetIQ purges the first samples.
We chose to give these samples to the user instead of discard them in the API as they could still contain information just at a reduced amplitude.
If you are using any sort of triggering to acquire your waveform, calling the function twice is probably not necessary.
Regards,
AndrewFound in Topics
jgauthier posted on August 21, 2020 at 11:11 am View this postTopic: BB60C matlab bbgetiq.m example code
in forum BB Series DiscussionsSince I’m just a noob when it comes to spectrum analyzers, I have a question when grabbing real-time IQ data from the BB60C.
In the example MATLAB code in bbgetiq.m provided in the SDK:
iqlen = 1024; % Flush IQ data filter ramp up time [status, iqdata] = bbgetiq(handle, iqlen, true); % Get actual data [status, iqdata] = bbgetiq(handle, iqlen, true);
If I’m passing true as the purge argument, then why does the example call the bbgetiq function twice? According to the BB API manual, specifying purge = TRUE discards “any samples acquired by the API since the last time and(sic) bbGetIQ function was called.
It seems that if it were set to false you’d have to call it twice, but if true wouldn’t that accomplish the intent here?
Found in Replies
Andrew posted on May 12, 2020 at 10:52 am View this postIn reply to: Labview Library Errors
AndrewModeratorJason,
The BB60C DLL also relies on the ftd2xx.dll. Is that also present? We include it in the SDK alongside the bb_api.dll.
- AuthorSearch Results