- AuthorSearch Results
Found in Replies
Andrew posted on December 18, 2023 at 8:08 am View this postIn reply to: BB60C: automate stop and start Spike SHR recodings
AndrewModeratorYou are correct. The sweep recordings cannot currently be controlled via SCPI. This has been requested before and is something we hope to add to our software in a future release.
Until we can add this to the software, there might be another solution. You could use the API and store the data in the SHR file format. Located in the SDK, you can find an example SHR file parser project. From this project, you can learn about the file format and use the API to retrieve sweeps to store in your own SHR files.
Found in Topics
WKlym posted on December 15, 2023 at 4:02 pm View this postHi, I have a fleet of BB60C/D (QTY 27) units connected to antennas to monitor for receive in-band interference & signal quality. Occasionally we have to do long term monitoring and have the units recording 24/7. We have the unit connected to an RF switch to allow us to monitor either the LHCP or RHCP coming from the antennas. What I want to do is automate the following processes:
1. We have to log into the remote PC and manually stop and start the recording each day.
2. We have to manually change the file name of the recording each time to indicate if we’re on LHCP or RHCP pol. I’d like to be able to automate the naming of the file as well to represent that info. The remote PC has visibility into the state of the RF switch.
I would normally automate something like this with SCPI commands, but it seems that the SHR recording functions have no SCPI commands available. Also I was not able to find out how to interface with the SHR recording functions through the API.
Ideally I’d like to use SHR recordings instead of a custom API recording implementation as they already hold all of the data I need + they have your wonderful spike UI for playback. If I had to write a custom recording file through the API, I can guarantee my playback method would not be as pretty.
If you guys have any advice on what I should do, please let me know. Any help would be appreciated. Thanks.
Found in Replies
Andrew posted on November 15, 2023 at 8:02 am View this postIn reply to: Creating QAM256 signal with VSG60A API
AndrewModeratorMCarr,
The API does not have any of the modulation capabilities. When using the API you have to provide your own waveform. You have a couple options,
– The VSG60 UI can be programmed using SCPI commands. in the SDK, look under the SCPI folder and you will find a manual and examples for configuring the software via SCPI commands. Labview has support for sending SCPI commands. In this scenario, the VSG60 software would be running, and then you would run a SCPI “script” in Labview (or any other programming language) that would configure the software.
– Generate your own I/Q waveform. If you don’t know how to generate a QAM waveform, you could use offerings from Labview such as,
https://www.ni.com/en/support/downloads/software-products/download.labview-modulation-toolkit.html#484334
or MATLABs communication toolbox. If you generate the waveform outside labview, then you would want to save it as a file, and in Labview, load the file and feed it to the API.Found in Topics
MCarr posted on November 15, 2023 at 12:54 am View this postTopic: Creating QAM256 signal with VSG60A API
in forum VSG Series DiscussionsHi,
We trying to replicate the attached modulation using the provided API in in C#.
I’m not clear how to perform this using the command set available.
Are there any examples or maybe just a bit of guidance to push us in the right dirrection.
Thanks
Attachments:
You must be logged in to view attached files.Found in Replies
Andrew posted on November 14, 2023 at 9:13 am View this postIn reply to: VSG60 AWGN using Python Example
AndrewModeratorThe API certainly should be able to interface several devices. We interface up to 8 devices in our manufacturing line using the API. What you will find is that most PCs will limit the number of actively streaming VSG60’s to 2, primarily limited by USB throughput and CPU cycles. Some PCs do struggle to transmit on 2 simultaneously. If you are also using one of our spectrum analyzers, you might consider moving the analyzer to another PC for making measurements.
If you are on Linux, please be sure to read the section on Linux in the VSG60 manual,
https://signalhound.com/sigdownloads/SDK/online_docs/vsg60_api/index.html#autotoc_md9Opening a second device should be as simple as calling vsgOpenDevice a second time with a new handle variable. This will result in you having two handles, one for each device. The handle values should be 0 and 1 after the vsgOpenDevice function returns.
If you are on Windows, you can verify that you see 2 devices connected in the device manager. If you don’t, then you need to resolve this first. The LED should also be solid green on both units when connected and idle.
We have not tested multiple devices in our Python environment, but it should be the same. If possible, you can test multiple devices in C++. The Python wrapper simply wraps the C interface. You can see the function assignment in the vsg_api.py file.
Found in Topics
TPascente posted on November 14, 2023 at 7:09 am View this postTopic: LabVIEW Device not open
in forum BB Series DiscussionsHi,
I am using a BB60C and its working well with the Spike SW. But when using the LabVIEW examples, I keep getting the “Device not open” error when running the vi. I re-loaded the bb_api-64.dll driver from the LabVIEW drivers download (and deleted the -64 text) and restarted by PC and got the vi to work once. After the second time using the vi I get the same error. Any suggestions on how to fix this? Is there a different dll available? Any help is appreciated. Thanks!!Attachments:
You must be logged in to view attached files.Found in Replies
SignalHoundUser posted on November 12, 2023 at 4:12 am View this postIn reply to: VSG60 AWGN using Python Example
SignalHoundUserParticipantForum wont allow .py files. Hopefully the txt will work.
# -*- coding: utf-8 -*-
# This example generates a basic AWGN signal.
from vsgdevice.vsg_api import *
from time import sleep
import matplotlib.pyplot as plt
#numpy.set_printoptions(threshold=numpy.inf) #Use to print full length arraysdef plot_complex_fft(complex_data, sampling_rate):
# Calculate and plot the Frequency data
# Calculate FFT
fft_result = numpy.fft.fft(complex_data)
fft_freq = numpy.fft.fftfreq(len(complex_data), 1 / sampling_rate)
# print(fft_freq)
# Plot the results
plt.figure(figsize=(10, 6))# Plot the frequency-domain signal (FFT)
plt.plot(fft_freq, numpy.real(fft_result), color=’red’, label=’I Data’)
plt.plot(fft_freq, numpy.imag(fft_result), color=’blue’, label=’Q Data’)
# plt.plot(numpy.abs(fft_result))
plt.title(‘FFT of Complex Signal’)
plt.xlabel(‘Frequency (Hz)’)
plt.ylabel(‘Amplitude’)plt.show()
def plot_IQ(complex_data, sampling_rate):
# Plot the Time Series results
plt.figure(figsize=(10, 6))
# Separate the real and imaginary parts
I_data = numpy.real(complex_data)
Q_data = numpy.imag(complex_data)
# Plot the frequency-domain signal (FFT)
plt.plot(I_data, color=’red’, label=’I Data’)
plt.plot(Q_data, color=’blue’, label=’Q Data’)# plt.plot(numpy.abs(fft_result))
plt.title(‘Complex Signal’)
plt.xlabel(‘Samples’)
plt.ylabel(‘Amplitude’)plt.show()
def low_pass_filter(complex_data: numpy.ndarray, BW: int = 40e6, sampling_rate: int = 50e6) -> numpy.ndarray:
# translate bandlimit from Hz to dataindex according to sampling rate and data size
bandlimit_index = int(BW * (complex_data.size/2) / sampling_rate)
fsig = numpy.fft.fft(complex_data)for i in range(bandlimit_index + 1, len(fsig) – bandlimit_index):
fsig[i] = 0adata_filtered = numpy.fft.ifft(fsig)
return adata_filtered
def normalise_level(complex_data):
# Normalise average level to 0dB
aveSig = numpy.average(numpy.abs(complex_data))
aveSigdB = 20*numpy.log10(aveSig) # should be 0dB
print(“Normalised Signal dB = ” + str(aveSigdB))
complex_data *= 1/aveSig
aveSig = numpy.average(numpy.abs(complex_data))
aveSigdB = 20*numpy.log10(aveSig) # should be 0dB
print(“Normalised Signal dB = ” + str(aveSigdB))return complex_data
def interleaved_to_complex(interleaved_data):
# Reshape the interleaved data into a complex array
complex_data = interleaved_data[0::2] + 1j * interleaved_data[1::2]
return complex_datadef complex_to_interleaved(complex_data):
# Separate the real and imaginary parts
real_parts = numpy.real(complex_data)
imag_parts = numpy.imag(complex_data)# Interleave the real and imaginary parts
interleaved_iq = numpy.empty(2 * len(complex_data), dtype=numpy.float32)
interleaved_iq[0::2] = real_parts
interleaved_iq[1::2] = imag_partsreturn interleaved_iq
def complex_AWGN(length, stddev):
iq = numpy.random.normal(0, stddev, length) + 1j * \
numpy.random.normal(0, stddev, length) # .astype(numpy.float32)
return iqdef generate_iq():
# Open deviceret = vsg_open_device()
print(ret)
handle = ret[“handle”]serialNumber = vsg_get_serial_number(handle)[“serial”]
# Configure generator
freq = 1.0e9 # Hz
sample_rate = 50.0e6 # samples per second
BW = 40.0e6 # Target bandwidth of AWGN
level = -20.0 # dBmvsg_set_frequency(handle, freq)
vsg_set_level(handle, level)
vsg_set_sample_rate(handle, sample_rate)
vsg_recal(handle)# Gernerate Waveform
iq = complex_AWGN(16384, 100)
iq = low_pass_filter(iq, BW, sample_rate)
iq = normalise_level(iq) #Set IQ to 0dB
iq = complex_to_interleaved(iq)vsg_repeat_waveform(handle, iq.astype(numpy.float32), int(len(iq)/2))
print(“Waveform set”)# Ramp Power
for power in range(-100, -30, 5):vsg_set_level(handle, power)
print(“Power = ” + str(power))
scaling = vsg_get_IQ_scale(handle)[“iq_scale”]
print(“scaling = ” + str(scaling))
sleep(1)
print(“complete”)
# Stop waveform
vsg_abort(handle)# Done with device
vsg_close_device(handle)
print(“closed”)if __name__ == “__main__”:
generate_iq()Found in Replies
andrewclegg posted on November 9, 2023 at 11:42 am View this postIn reply to: Remote Usage of BB60c
andrewcleggParticipantThe older version I’m running now shows 3.4.2. If it’s helpful, the “About” screen also shows BB API Version 4.2.0, SAAPI Version 3.1.4, SM API Version 2.0.2, product ID 4300-1101. This is pretty much a random version that I still had the install package sitting around my disk drive, so whatever happened was after this version. The connectivity issue started roughly a year ago. So not very exact, but that would give you a rough range. It occurred to me at the time that it would be useful if it was possible to download previous versions of drivers and Spike. Is that a thing?
An important fact is that I’m still running Windows 7 on this particular installation. So perhaps if I had a laptop running Windows 11 it wouldn’t be an issue. When I find some time I can give that a try, but I usually don’t like to mess with things that are stable.
Found in Topics
PSkou posted on November 6, 2023 at 8:48 am View this postTopic: MAX HOLD configuration using Python SDK
in forum General DiscussionsI am trying to capture the MAX power value of a single SBAND ping, using the Python API.
I am able to do it using the Spike software (see attached) but I’m having problems configuring the BB60C the same way using the library.Can somebody help me reproduce the same spectrum analyzer behavior?
That would mean:
1-Configure SA w/ MAX HOLD feature
2-Send ping
3-Retrieve max value.Thanks.
Attachments:
You must be logged in to view attached files.Found in Replies
Roger posted on September 6, 2023 at 8:17 am View this postIn reply to: module bbdevice.bb_api not found
RogerModeratorHello, there are a few steps required for Linux use:
1. Trim the version info off the shared object library file name, and place it in folder bbdevice/ along with libftd2xx.so.
So, bbdevice/ should contain:
– bb_api.py
– libbb_api.so
– libftd2xx.so2. Change the CDLL import line in bb_api.py to read:
bblib = CDLL("bbdevice/libbb_api.so")
3. Set the LD_LIBRARY_PATH to the bbdevice/ directory (since that’s where the ftdi library is):
Run in terminal from the examples/python directory:
export LD_LIBRARY_PATH="$(pwd)/bbdevice"
Now the examples should be able to be run from the examples/python directory.
Found in Replies
HDwi posted on September 5, 2023 at 11:02 pm View this postIn reply to: module bbdevice.bb_api not found
HDwiParticipant(f”{‘Error’ if status < 0 else ‘Warning’} {status}: {bb_get_error_string(status)} in {func.__name__}()”)
and i got this error when i try to running bb_api.py
Found in Topics
HDwi posted on September 5, 2023 at 8:44 pm View this postTopic: module bbdevice.bb_api not found
in forum BB Series DiscussionsI try to run sweep_plot.py from the example in linux 18.04 but i got error said ‘module bbdevice.bb_api not found. it was said to put bb_api.so in bbdevice folder but i couldn’t find it, i just found libbb_api.so.5.0.5 in the lib directory? I already tried this examples in windows platform and had no problem
Found in Replies
Andrew posted on August 31, 2023 at 8:25 am View this postIn reply to: VSG60 Streaming GSM Recording
AndrewModeratorHi NMullin,
Thanks for the follow up.
I do not believe there is currently a way to play a streaming scenario only once. I will see if this is something that can be easily added.
I should at least mention, that it is possible to use the API to transmit a waveform. The API is an interface for programmatically controlling the instrument without need for the UI application. This would allow you to perform this task relatively easy if you are comfortable writing software. See link below for more information.
https://signalhound.com/software/signal-hound-software-development-kit-sdk/
Found in Topics
Jacks posted on May 9, 2023 at 8:11 am View this postTopic: Crash sm_api library.
in forum SM Series DiscussionsWe are having problems with the sm_api library. When using it with SM200C, in an absolutely arbitrary interval, our application crashes completely with an error in the Windows log (screenshot attached). The api version we use is the latest 2.3.3 (the same was observed in the previous one). Device firmware 9.9 (more than 40 pcs) and one with 8.8. The PCs are configured according to the instructions for the SM200C. All possible tests for the operation of RAM have been completed, everything is fine with it. The problem arises when receiving a trace. We ask for your advice and help in eliminating this problem.
Can’t add screenshots, site says Error: Slow down; you move too fast. From Text:
From Event viewer
Faulting application name: Atdi.AppServer.Svchost.64.exe, version: 1.0.0.0, time stamp: 0xe02756a4
Faulting module name: sm_api_x64.dll, version: 0.0.0.0, time stamp: 0x629e5a23
Exception code: 0xc0000005
Fault offset: 0x000000000005940d
Faulting process id: 0x160c
Faulting application start time: 0x01d97f452637d434
Faulting application path: C:\ATDI\DeviceServer\Atdi.AppServer.Svchost.64.exe
Faulting module path: C:\ATDI\DeviceServer\DLL\sm_api_x64.dll
Report Id: 013daf79-b44a-43fa-a2d1-9deff58071cc
Faulting package full name:
Faulting package-relative application ID:Found in Replies
CCanaff posted on April 14, 2023 at 2:02 am View this postIn reply to: SDK Python on Linux – dependencies between .so files
CCanaffParticipantLooks like it doesn’t work if bb_api.so is also present in the bbdevice directory as a copy of libbb_api.so or as a symbolic link…You have to be sure to make the bblib =CDLL(“bbdevice/libbb_api.so”)
in the bbdevice/bb_api.h file and to get the two libraries bbdevice/libbb_api.so and bbdevice/libftd2xx.so without file or symbolic link referring to bb_api.so in the bbdevice directory.
And the LD_LIBRARY_PATH have to be set.Now it works…
Thanks for your help,
Charles
Found in Replies
Roger posted on April 13, 2023 at 10:54 am View this postIn reply to: SDK Python on Linux – dependencies between .so files
RogerModeratorHi Charles,
Try renaming both .so files to have a “lib” prefix, and updating the CDLL call accordingly. So, the bbdevice directory would contain libbb_api.so and libftd2xx.so. The call would be
bblib = CDLL("bbdevice/libbb_api.so")
You are correct that LD_LIBRARY_PATH needs to be set. We are updating the documentation.
Thanks for reaching out.
-Roger
Found in Topics
CCanaff posted on April 13, 2023 at 2:29 am View this postHi!
I try to run the SDK on Linux Ubuntu. It is ok for C++. I managed the libraries but, for Python, I did not succeeded. I changed the CDLL call in the bbdevice/bb_api.h to use
the .so version of bb_api.so (instead of the dll for Windows). It looks like make correct access to the bb_api.so file…but the bb_api.so file looks like getting a dependency to the libftd2xx.so and it gives me the following error :python3 list_devices.py
(I tried it with the other scripts…same result…it is on the first lines on the import call)<….from bbdevice.bb_api import *
ImportError: libftd2xx.so: cannot open shared object file: no such file or directory….>So it looks like putting the path of the libraries (which include the libftd2xx.so)
in the LD_LIBRARY_PATH solved the problem but an other error popped :<<….from bbdevice.bb_api import *
ImportError: dynamic module does not define module export function (PyInit_bb_api)…>I am not used in interfacing C++ shared libraries dependencies with Python…
I tried to change stuff in the bb_api.h but it doesn’t seems to work.It may be simple Python’s adjustments…
Can somebody help me on that ?
Thanks,
CharlesFound in Replies
- This reply was modified 2 years, 1 month ago by
MVincent.
MVincent posted on March 9, 2023 at 4:36 am View this postIn reply to: VSG60 Crashing & Spike (BB60C) Disconnected
MVincentParticipantI’d like to add that in my case, the issue was Linux not allocating enough memory to USB devices.
As soon as I enabled the VSG60A while the BB60C was running, the application would either crash or disconnect one or both devices.
https://signalhound.com/sigdownloads/SDK/online_docs/vsg60_api/index.html contains instructions on how to solve:
sudo sh -c ‘echo 32 > /sys/module/usbcore/parameters/usbfs_memory_mb’Additionally, here’s how to make these new settings persist at boot:
Create a file: /etc/modprobe.d/signalhound_usb.confContaining:
# 16mb per signalhound device is needed, we set 3x that value here to have some head-room
options usbcore usbfs_memory_mb=48Next reboot, this will automatically be applied!
Found in Topics
JGeng posted on October 12, 2022 at 8:57 am View this postTopic: Changing center freq in iq capturing
in forum BB Series DiscussionsHello,
I’m acquiring IQ data using bbGetIQUnpacked API.
I was hoping to hopping from one frequency to another, do I have to reconfigure using bb_configure_IQ_center and then reinitiate again?
That takes about couple ms and I’m hoping not having a large gap when switching frequency.
Thanks.Bests,
JingFound in Replies
Jacks posted on October 12, 2022 at 3:05 am View this postIn reply to: SM200C get NMEA messages
JacksParticipantAnswer to my question.
This was a bad example for C# in API. More precisely, the wrong import of the library. Correct like this:
[DllImport(DLL_NAME_Win32, EntryPoint = “smGetGPSInfo”, CallingConvention = CallingConvention.Cdecl)]
private static extern SmStatus smGetGPSInfo_Win32(int device, SmBool refresh,
ref SmBool updated, ref long secSinceEpoch, ref double latitude,
ref double longitude, ref double altitude, [Out] char[] nmea, ref int nmeaLen);- This reply was modified 2 years, 1 month ago by
- AuthorSearch Results