- AuthorSearch Results
Found in Replies
- This reply was modified 6 years ago by
Andrew.
Andrew posted on April 24, 2019 at 11:17 am View this postIn reply to: SM200A Needs
AndrewModeratorKaiser,
We have several customers running multiple SM200s on a single PC. I’m aware of one customer running 4 SM’s streaming I/Q.
You are correct in that the biggest issue is generally USB throughput, but we have found that 2 SM’s will run just fine on a single PC (higher end desktop). You only really need to consider USB adapter cards above 2 SM’s.
If you are on Windows, everything should just work out of the box. If you are on Linux, take a look at the appendix in the latest API manual. I have some notes for multi-unit use on Linux.
How much processing power you need it really going to be dependent on what type of processing you add to the system. A standard 4 core PC will run 2 SM’s if you did not perform any processing.
Regards
Found in Replies
Andrew posted on April 16, 2019 at 9:53 am View this postIn reply to: How can I get receiver power with Visual Studio
AndrewModeratorHello,
We don’t have a function in the API that directly provides you the measurements that the “Measuring Receiver” does from Spike. I can tell you the general idea behind the it though.
You could reproduce it with the API by using basic sweep functionality with the flat-top window (default) and finding the peak value in the sweep. Reference level would then be used to adjust the sensitivity of the receiver as you adjust your input level to the receiver. You would want to measure the offset before and after a ref level change and include that offset in your final calculation.
A lower RBW on the sweep would get you finer frequency resolution if needed.
Let us know if you have additional questions.
RegardsFound in Topics
Anonymous
Anonymous posted on April 16, 2019 at 7:07 am View this postTopic: How can I get receiver power with Visual Studio
in forum SA Series DiscussionsIt seems like that is not too difficult to get receiver power for the measurement receiver of SA44B with Visual Studio. But I can’t figure it out how to use API function for Signalhound devices. Maybe someone can help me with an example of Visual Studio code which can work with some Signalhound’s API functions?
Found in Replies
Andrew posted on March 28, 2019 at 8:29 am View this postIn reply to: Api can use in Linux ?
AndrewModeratorWe do not have plans to develop a Linux API for the VSG25A at this point.
Regards
Found in Replies
firatcnur posted on March 26, 2019 at 4:22 pm View this postIn reply to: Api can use in Linux ?
firatcnurParticipantDo you have a shared object I could utilize in Linux to call APIs?
There are shared objects for the other signal hound product ranges, however, I did not come across one for vsg25 ( might be looking at the wrong places ….).
Regards
Found in Replies
Andrew posted on March 15, 2019 at 8:33 am View this postIn reply to: Queued Sweep Synchronizations
AndrewModeratorKaiser,
For normal sweep speed, (via the smSetSweepSpeed function) the resolution on which we can change the GPIO output is multiples of 39.0625 MHz. (N * 39.0625 MHz) If you are using the fast sweep speed, that number is 156.25 MHz but can be offset by a multiple of 39.0625 MHz. (N * 156.25M + 39.0625M * [0,1,2,3 depending on factors]) If you use the same sweep settings, the API will be consistent about what LO steps it changes the GPIO on.
I believe the logic is, that if your GPIO freq exceeds the freq calculated from the equations above, then we perform the switch. If you use these multiples directly, pick a number slightly higher to force the switch.
It sounds like you just need to nail this down for just a couple sweep configurations? This should be enough information for you to start adjusting the frequency on the GPIO steps and choosing the best values for your sweeps?
Regards,
AndrewFound in Replies
Andrew posted on February 20, 2019 at 12:11 pm View this postIn reply to: Error compiling Linux sample code
AndrewModeratorHi Kaiser,
I updated the SDK with a rebuilt SM API 1.1.7. I tested it on Ubuntu 18.04 before uploading. I’m not sure where it got corrupted before. Thanks for your patience.
Regards,
AndrewFound in Replies
ray62202 posted on February 14, 2019 at 8:15 am View this postIn reply to: Error compiling Linux sample code
ray62202ParticipantKaiser, I was able to find out that the library image was corrupted with the following command:
$ readelf –a libbb_api.so.4.0.2
The output of readelf will tell you about the different pieces of the library, and if they are corrupted. Substitute the file name of the library you are using in the command.
Andrew updated the library for me, and I’ve been cruising along just fine ever since.
– Ray
Found in Replies
Andrew posted on February 14, 2019 at 7:53 am View this postIn reply to: Error compiling Linux sample code
AndrewModeratorKaiser,
I will look into this.
Which build of the SM API are you using and on which OS?Thanks,
AndrewFound in Replies
kaiser posted on February 14, 2019 at 7:46 am View this postIn reply to: Error compiling Linux sample code
kaiserParticipantIs it possible that we’re seeing something like that also in the sm_api.so file in the downloads? Getting a very similar linker error
“/usr/bin/ld: out of memory allocating 1189565853043737155 bytes after a total of 186720 bytes”
when trying to compile a very basic program (just trying to open the device), and I just earlier today used wget to get the file, unzip it and grab the .so file.
Thoughts?
Found in Replies
Andrew posted on January 25, 2019 at 10:17 am View this postIn reply to: Queued Sweep Synchronizations
AndrewModeratorKaiser,
I don’t think the GPIO sweep switching is going to be adequate for your task since you are doing the 100MHz spans. It was originally designed to antenna switch over multiple GHz sweeps. It only operates at the granularity of the LO step freq which is 160MHz in your case, or 40MHz in the slower sweeps.
The I/Q GPIO switching you saw does not work in sweep mode.
Thinking about what we could add to the API, what if the API gave you the ability to queue GPIO switches in between sweeps. For instance, insert a single GPIO switch in between StartSweeps? Do you think this would be adequate for your measurements?
I don’t think it would slow down the sweep speed at all.
Given the 100MHz span, I think you would have to give up sweep speed to accomplish what you need with our current API.
If you think the proposed solution would work, I can potentially look into adding this for a future update? You could simulate this by calling
smGetSweep() -> smSetGPIOState() -> etc..
albeit at a slower sweep speed.Regards,
AndrewFound in Replies
- This reply was modified 6 years, 3 months ago by
kaiser.
kaiser posted on January 25, 2019 at 10:07 am View this postIn reply to: Queued Sweep Synchronizations
kaiserParticipantAlso, real quickly. Why is the C# API declaration for smSetGPIOSweep commented out for the structs? It should be fairly simple to pass an array of structs from C# to C++, like so:
[StructLayout(LayoutKind.Sequential)]
public struct SmGPIOStep
{public double freq;
public Byte mask; // gpio bitspublic SmGPIOStep(double f, Byte m)
{
this.freq = f;
this.mask = m;
}
}[DllImport(“sm_api.dll”, CallingConvention = CallingConvention.Cdecl)]
public static extern SmStatus smSetGPIOSweep(int device,[In, Out]SmGPIOStep[] steps, int stepCount);Is there some mismatch or oddities on the other side? It’s just two fairly straightforward variables.
Edit: If I put one of the GPIO’s on the O-scope, and run the GPIO Sweep sample code with this change in C#, I get a waveform that looks about right….
Found in Replies
kaiser posted on January 25, 2019 at 8:05 am View this postIn reply to: Queued Sweep Synchronizations
kaiserParticipantThanks for the detailed reply Andrew. Like I said, interrupts would be the best case. I’ve extensively used to National Instruments samplers, and my understanding form talking to their engineers is that they open multiple pipes on the USB connection; one for high bandwidth streaming, and one for low latency notification. So, for example if I’m sampling 32 inputs at 16-bits, 30kHz I get a stream very similar to what I get from the SM200A, but also can have extremely low latency notifications (non-deterministic of course, but low latency) of events like sample start / sample end or change detection on some pins. I imagine that it would complicate your drivers somewhat and might not be worth it. Like I said, in a perfect world 🙂
What I’ve done is grabbed one of our microcontrollers (a SAME54 board) from the back, and am working to integrate that. The thought is that I can use the GPIO of the SM200A to notify the microcontroller of when a sweep end. The microcontroller gets an interrupt, and then communicates with the attached equipment to prepare it for the next sweep while the SM200A is running.
Basically, I need to keep the SM200A sweeping my 100MHz band of interest at the 0.3ms sweep time that I am getting now, but also in between sweeps configure my support hardware for the next sweep. I can’t afford to let the sweep time increase any, and I have to sweep the entire 100MHz, can’t get it down to 40MHz.
The microcontroller in debug mode yesterday could update the support hardware at >100kHz, so I should be able to keep the SM200A in fast sweeping mode, and just upon notification of the sweep end (or that the sweep has hit a certain frequency to account for any latency), update the equipment while the SM200A prepares for the next sweep.
I’m running through a couple hundred test states of the support equipment while this happens. So, the best way would be for the GPIO to essentially increment/change every scan. But I don’t see exactly how I could do that with the GPIO; it seems to be more inter-scan focused than intra-scan focused or time-based (which might work).
So let’s talk GPIO:
If I use GPIO sweeping, does it reset every sweep, or run independently? Say I.m sweeping up to 2.9-3GHz. If I set the GPIO sweeping to increment every time I pass 2.99GHz, would it continue to increment every sweep, or reset? If it just continually incremented down the list, that would be awesome. If it resets, then I can probably make it work, but then move a ton of functionality to the microcontroller and end up with potential for them to get out of sync (microcontroller counting pulses, and running the show rather than the main computer telling it which state to go into). Guess that I can probably test this.
With GPIO switching — the examples I saw show it going alongside IQ streaming, and the API indicates that it’s “output while the device is streaming IQ data”. So I assume that it doesn’t work with regular sweeping? If it did, is the timing good enough between it and the sweep, that I could get/keep them synchronized? I didn’t see a great mechanism for that, and am unsure how I would synchronize, but could be missing something.
Still just trying to find the right way to skin the cat here 🙂
Found in Replies
Andrew posted on January 24, 2019 at 10:56 am View this postIn reply to: Queued Sweep Synchronizations
AndrewModeratorHi Kaiser,
It sounds like most of your assumptions about the API are correct regarding timings/etc.
FinishSweep returns when the data has returned and that data has been processed. One of the issues here is that the API will batch several operations/transfers together when we can, and in the event of queued sweeps, if you queue up several small sweeps, it might collect and process all these sweeps at the “same time” as seen by the PC (all the data is returned from the FPGA in the same transfer). So the FinishSweep might return and all the sweeps might already be done. It’s not until you get to wider span sweeps where FinishSweep could return when the next sweep has only just started.
I think the only way to guarantee some action occurs between two sweeps (at a software level) is to start/finish 1 sweep at a time.
If you can operate in a 40MHz bandwidth, using I/Q streaming with external triggers into the device to help sync would be a good way to go.
The software interrupts are an interesting idea, but I do think they would suffer from the same issue, where USB commands and data xfers would be batched together at times and it would be impossible to insert a software interrupt between two very small sweeps since they would occur back to back all on the FPGA. (FFTs for ‘fast sweep mode’ occur on the FPGA, so once the data is xferred back to the PC it doesn’t undergo any extensive processing.)
The GPIO sweeping mechanism (changing the GPIO on frequency crossings) was designed with this type of problem in mind and it sounds like you have already evaluated this feature.
Would an external trigger indicating a sweep is starting/ending be of interest? It’s not something we can do right now, but maybe we could consider it for a future update.
Regards,
AndrewFound in Topics
kaiser posted on January 22, 2019 at 9:22 am View this postTopic: Queued Sweep Synchronizations
in forum SM Series DiscussionsThe SM200A is working great so far for me. Right now I’m looking into the best way to synchronize external actions with seeps.
For example, right now I queue up 12 sweeps, and start them with sm_api.smStartSweep(handle,i) and then continuously read them with
SmStatus status = sm_api.smFinishSweep(handle, queuePos, null,sweepsMax[j], ref sweeptimeEpoch[j]);
sm_api.smStartSweep(handle, queuePos);
I would like to synchronize some external events with start/stop of these queued sweeps. So, I guess my question is, is finish sweep basically the end of the sweep with minimum latency?
Based upon what I’ve seen, I have ~0.1ms for the LO to get back in position to start the next sweep. I’d like to issue a notice to some equipment before the next sweep starts. Is FinishSweep a good spot to do that, or is there some other synchronization that I can do? I know that I can twiddle GPIO ports, but my output is happening on the same system that’s working with the SignalHound.
I could also connect GPS, get time counts on sweeps, and run an external synchronization thread that looks at when the sweeps are executed, and send the commands at appropriate sweep intervals, but I’m concerned about >0.1ms deviation from system clock synchronization to SM200A GPS clock, and how to keep locked. If there was a way to query the SM200A clock, then I could likely synchronize also, but then even on Linux you’re getting into minimum system timeslice concerns, but interrupts could probably be generated to get good alignment.
It would be a lot easier if smFinishSweep is basically immediately returned post sweep, but my guess is that it returns once the data is present, which is a bit after the sweep, and thus not suitable to inter-process synchronization.
Found in Replies
kaiser posted on January 9, 2019 at 7:47 am View this postIn reply to: Precise Synchronization
kaiserParticipantI don’t see the post I made yesterday up here, so here I go again.
As I said before, I decided to get an SM200A and see how that works. The queuing up of sweeps is huge and really this device is much faster.
Right now I’m scanning 100MHz at ~0.3ms, which is great. Theoretically it could go as fast as 0.1ms (1THz/s sweep rate). I expect that a lot of the increase in time is sweeping the LO back to the beginning of the spectrum? I’m not sure.
Either way, I’m pretty happy with the SM200A and it’s performance.
The capture is a bit noisier, which will require me to add some smoothing or similar to my algorithms, but it’s not a huge deal.
Overall, if I could eek out a bit more performance (faster scans), that would be great. Here’s some prototype code I was using to test it below; any thoughts?Again, great device!
// Configure the receiver sweep functionality
// Things to note for THz sweep speeds
// smSweepSpeedFast must be set
// RBW must equal VBW and be above 30kHz for Nuttall window
sm_api.smSetSweepSpeed(handle, SmSweepSpeed.smSweepSpeedFast);
sm_api.smSetRefLevel(handle, -20.0); // -20dBm reference level
sm_api.smSetSweepCenterSpan(handle, 2.45e9, 1.0e8);sm_api.smSetSweepCoupling(handle, 100.0e3, 100.0e3, 0.001); // 100kHz rbw/vbw
sm_api.smSetSweepDetector(handle, SmDetector.smDetectorAverage, SmVideoUnits.smVideoPower); // min/max power detector
sm_api.smSetSweepScale(handle,SmScale.smScaleLog); // return sweep in dBm
sm_api.smSetSweepWindow(handle,SmWindowType.smWindowNutall);
sm_api.smSetSweepSpurReject(handle,SmBool.smFalse); // No software spur reject in fast sweep
sm_api.smSetPreselector(handle, SmBool.smFalse); // No preselector in fast sweep// Initialize the device for sweep measurement mode
SmStatus status = sm_api.smConfigure(handle,SmMode.smModeSweeping);
double actualRBW = 0, actualVBW = 0, actualStartFreq = 0, binSize = 0;
int sweepLength = 0;
sm_api.smGetSweepParameters(handle, ref actualRBW, ref actualVBW, ref actualStartFreq, ref binSize, ref sweepLength);float[] sweepMax, sweepMin;
sweepMax = new float[sweepLength];
float[][] sweepsMax = new float[1000][];
float[][] sweepsMin = new float[1000][];
for (int i = 0; i < 1000; i++)
{
sweepsMax[i] = new float[sweepLength];
sweepsMin[i] = new float[sweepLength];
}
sweepMin = new float[sweepLength];long[] sweeptimeEpoch = new long[1000];
//the API allows us to queue up to 16 sweeps. They recommend queueing ~4 sweeps
//but we’re pretty narrow sweeps, so let’s try 12 to start…
// Start all sweeps in queue
int sweepsToQueue = 16;
for (int i = 0; i < sweepsToQueue; i++)
{
sm_api.smStartSweep(handle, i);
}
int j = 0;
int queuePos = 0;
while (j < 1000)
{
SmStatus status = sm_api.smFinishSweep(handle, queuePos, null,sweepsMax[j], ref sweeptimeEpoch[j]);// Process/store sweep here
// Sweep in contained in the ‘sweep’ array// Start it back up
sm_api.smStartSweep(handle, queuePos);// Increase and wrap our queue pos
queuePos++;
if (queuePos >= sweepsToQueue)
{
queuePos = 0;
}j++;
}Found in Replies
catalin_ro posted on January 7, 2019 at 7:08 am View this postIn reply to: Precise Synchronization
catalin_roParticipantIf “shared clock” implies getting the clock from one BB60C to the other BB60C, some special API functions must be called in order for the API to use the same reference clock frequency. The 10MHz built into the BB60C is not quite 10MHz, but slightly off. When set to external reference, the API considers exactly 10MHz.
The end result of this issue is a tuned frequency mismatch and slight sampling rate difference.
Found in Replies
catalin_ro posted on December 29, 2018 at 7:54 am View this postIn reply to: Precise Synchronization
catalin_roParticipantI’m using twin BB60Cs in something similar. And I’ve been through the same issues roughly two years ago.
(1) If you pass reference clock from one receiver to the other you need to properly set the reference clock frequency in both. When you will get proper time alignment you will see the drift. Discuss with Andrew about the special, kind of “dangerous”, API calls for properly setting the timebase information.
(2) Use IQ streaming instead of sweeping.
(3) Use an external trigger! A simple controller that can issue the sync pulses whenever you need and then align the samples in software. But be aware that there is a 4 samples pulse position imprecision at widest streaming bandwidth, as far as I recall. In my case the upper level algorithm automatically compensates it.
Found in Replies
Andrew posted on December 14, 2018 at 11:42 am View this postIn reply to: Precise Synchronization
AndrewModeratorSpike does additional processing per sweep that could be slowing it down a bit. You should measure the sweep times using the API for an accurate number to see if it would be adequate for your application. The BB60C doesn’t have any sweep queuing mechanism, so you incur the over head of processing and USB latencies for each sweep. 6-7 ms is probably the ball park for the fastest possible times.
We don’t have an SM200A demo/loaner program. If you are outside the US, your distributor might have a loaner program.
Regards
Found in Topics
kaiser posted on December 13, 2018 at 11:55 am View this postTopic: Precise Synchronization
in forum BB Series DiscussionsI’m trying to capture spectrum from two BB60C’s at exactly the same time, and having some issues.
The two references are locked; one set to output external reference, and the other set to receive an external reference. Good there.
Then I tried just kicking them off at the same time, via something like this, hoping that it would essentially :
` while (j < 1000)
{Thread FirstSH = new Thread(delegate () {
var status = bb_api.bbFetchTrace_32f(DeviceHandles[0], unchecked((int)traceLen), sweepsMin[j], sweepsMax[j]);
});
Thread SecondSH = new Thread(delegate () {
var status = bb_api.bbFetchTrace_32f(DeviceHandles[1], unchecked((int)traceLen), sweepsMin2[j], sweepsMax2[j]);
});
FirstSH.Start();
SecondSH.Start();FirstSH.Join();
SecondSH.Join();
j++;
}`They start at basically the same time, but I can tell that they aren’t. How? Well, I’m essentially trying to measure a signal’s characteristics in two polarizations. So one BB60C on one polarization, and the other on the second. The signal is a TDMA signal (think standard Wifi), and often times one BB60 will see the signal, but the other won’t or have a partial capture, or whatever. So it’s not super-synchronized, which is causing havoc for my measurements.
So, I hook up a waveform generator (btw, feature request; make the trig/sync port be an in/out like the reference for synzhronizing sweeping of units. That would eliminate my need for the waveform generator).
But, the API doesn’t allow me to trigger a sweep from an external trigger (just in zero-span and some other modes). Or at least I can’t find a way for it to let me.
It looks like I could maybe set it to stream, and that would work…but I need to cover ~100MHz on each, and the simple spectral display is all I need.
Maybe I could stream IQ, and then tyr to time-align the trigger buffers between the two? Would that work well for getting me a simple spectral plot?
Anyone have any ideas? Is allowing triggers something that could be added to a mode in an upcoming release?
Thanks!
- This reply was modified 6 years ago by
- AuthorSearch Results