10-31-2012 09:43 PM
We are needing to make a quick prototype with the NI USRP-2920 and I do not know LabView. Yes, I know I need to learn, but I am much faster with C# or C++ (.net).
Is it possible to completely interface with the NI-USRP using a .dll? Is it compatible with C#? If not, is it compatible with .net C++?
Just looking for some insight.
Thanks for the help.
11-01-2012 11:17 AM
Hey Nick_S_86,
NI-USRP won't just natively work in C# or .net C++, but it should be fairly simple to create a wrapper for it and call into the dll. I haven't personally done it, but I checked with our driver team and they said there is no reason it can't be done.
11-01-2012 11:24 AM
Which dll are you talking about? Is there documentation or code examples I can use?
11-01-2012 11:31 AM
Hi Nick_S_86,
You can use the niusrp.dll. Using the dll outside of the LabVIEW environment is not a supported feature, so there is no documentation for a text based API and there are no examples. However, you can use the NI USRP help documentation for details about the functions available in the driver. You can find the documentation by going to Start >> All Programs >> National Instruments >> NI-USPR >> Documentation.
11-01-2012 11:45 AM
Nick,
You should be able to find the header files for the niUSRP.dll at C:\Program Files\National Instruments\NI-USRP\includes
You will also need to link your compiler to the library file located at C:\Program Files\National Instruments\NI-USRP\lib\msc
10-10-2013 12:42 PM
Hello,
I'm trying to control my USRP2921 via my own C++ application.
I can't compile program that create an USRP device...
This is what I get in terminal (ubuntu) when I try to compile following code:
#include <uhd/utils/thread_priority.hpp>
#include <uhd/utils/safe_main.hpp>
#include <uhd/usrp/multi_usrp.hpp>
#include <boost/program_options.hpp>
#include <boost/format.hpp>
#include <boost/thread.hpp>
#include <iostream>
#include <fstream>
#include <complex>
#include <csignal>
int UHD_SAFE_MAIN(int argc, char *argv[])
{
std::string args ="192.168.10.2";
uhd::usrp::multi_usrp::sptr usrp = uhd::usrp::multi_usrp::make(args);
return EXIT_SUCCESS;
}
/tmp/ccQJzixr.o: In function `_main(int, char**)':
USRP_Control.cpp:(.text+0x126): undefined reference to `uhd::device_addr_t::device_addr_t(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
USRP_Control.cpp:(.text+0x138): undefined reference to `uhd::usrp::multi_usrp::make(uhd::device_addr_t const&)'
collect2: ld returned 1 exit status
Could anybody help me?
10-10-2013 01:08 PM
Hey TomStr,
It looks like you are using UHD in your application. I recommend you check out the USRP users mailing list for UHD support. While you may get an answer on this forum, this forum provides support more targeted for NI-USRP hardware questions or NI-USRP driver and LabVIEW questions.
You can find more information about the mailing list and other forums of support here:
http://code.ettus.com/redmine/ettus/projects/uhd/wiki
10-19-2013 07:17 AM
Hi Sarah_Y,
Thank you for your response. Yes, indeed I'm using UHD. It was a linker problem. Resolved.
I'd like to ask about USRP-2921 sampling rate and maximum bandwidth. I'd like to send signal of 20 MHz bandwidth on 5.8 GHz frequency center.
So I have to sample my signal with rate at least 40MS/s.
But maximum sampling rate that I could set equals 33,333333 MS/s...
Do you know what is a problem?
10-22-2013 11:25 AM
Sample rate chances happen in the FPGA. The rates are all divisors of a 100 MHz clock. For 40 MS/s of data you need to set the sampling rate to 50 MS/s
= 100 MS/s divide by 2. Divide by 3 is 33.3 MS/s you saw. Divide by 4 is next at 25MS/s. You can continue to divide down to 200kS/s.
10-30-2013 01:17 PM
Thank you.
And I have another doubt - how we could determine bandwidth of the received signal? Is it equal the IF filter bandwidth?