PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I interfacce with NI 5670 using just C/C++ without having to go through Labview?

Hi all

I am trying to interface with NI 5670 composite module consisting of a high speed AWG and an RF upconverter. I am currently controlling the device using Labview, which I am not very comfortable with. Is there some way I can talk to this device using just C/C++ programming without having to go through Labview? Any suggestions or tutorial references are most welcome. Thanks in advance.

Jagadish
0 Kudos
Message 1 of 19
(5,413 Views)
Hello Jagadish,

I am assumign you installed te RSFG driver and that you are programming it with LabVIEW VIs. There is a very similar interface using C programming. There is a help file that contains information about the NI-RFSG functions, attributes, and values that you can use when programming your application. You can locate this help file under your start menu » all programs » National Instruments » NI-RFSG » Documentation » NI RF Signal Generators Help.
Then you browse under Programming » NI-RFSG C Function Reference.

If you have LabWindows/CVI, you will find examples installed in your machine and you will be able to use this as a secondary interface.
Just as curiosity, what exactly you do not find confortable with LabVIEW? Have you tried to submit a product suggestion?
This feedback is valuable for us, thank you.
Gerardo O.
RF SW Engineering R&D
National Instruments
0 Kudos
Message 2 of 19
(5,399 Views)
Hi Gerardo
 
Thanks a lot for your valuable feedback. The reason I was not very comfortable with Labview was due to lack of formal training. This is my first time with LabView and felt it would be easier to control the instrument from remote using C. I will probably sign up for one of your training sessions some time. Also, if you are aware of any, can you point me to some C/C++ tutorials for instrument control other than the help included in the documentation?
 
Thanks
Jagadish
0 Kudos
Message 3 of 19
(5,400 Views)
Hi Jagadish,

Thank you for this feedback, let me answer this in different sections:

"The reason I was not very comfortable with Labview was due to lack of formal training. This is my first time with LabView and felt it would be easier to control the instrument from remote using C. I will probably sign up for one of your training sessions some time"

Training is something very recommended if you plan to continue developing in LabVIEW. There are two types of classes I would recommend, one is LabVIEW Basics and other is RF Application Development. You can find more information about schedules for your location at this link.

"Also, if you are aware of any, can you point me to some C/C++ tutorials for instrument control other than the help included in the documentation?"

I do not know any tutorial for text base instrumentation sorry. Probably other members in the forum. I do only know about this LabVIEW tutorial that might help you if you still feel like giving LabVIEW a second chance. If you plan to do more stuff with the program I highly recommend it since will help you develop faster once you learn to use it.
For RF applications there are two stages: Learning LabVIEW and learning the RF driver. The tutorial will help you for the first link. The examples can help you for the second part.
The only resources might help you getting started with C programming are the CVI examples. I have attached a C example and you will see the function calls. Even if there is some CVI specific code, you can see the structure of the program:
Main
Sub Routines
Description
Hope this helps and best of lucks.
Gerardo O.
RF SW Engineering R&D
National Instruments
0 Kudos
Message 4 of 19
(5,391 Views)
Hi Gerardo

Thanks again. You said you were attaching something? Can you please tell me how to access it? I couldn't immediately locate anything on the screen.

Regards
Jagadish
0 Kudos
Message 5 of 19
(5,390 Views)
Hello Jagadish,

My bad, here is it.
In fact, this time I will attach two. The file "SingleToneGeneration.c" is the base to generate a common wavefor as simple as possible.
The file "ArbitraryWaveformGeneration.c" is how to generate any kind of waveform and download it to the board memory.

Gerardo O.
RF SW Engineering R&D
National Instruments
Download All
0 Kudos
Message 6 of 19
(5,379 Views)

Hi Gerardo

Thanks for the examples, but I have another small problem. The header files you use in these files like combobox.h, nimodinst.h etc. do not seem to be a part of the NI package that came with NI 5670. Can you please tell me where I can get them?

 

Thanks

Jagadish

0 Kudos
Message 7 of 19
(5,369 Views)

Hi Jagadish,

Thank you for pointing this out. I have attached this here. I would like to point out two things:
1. These examples are install with the free driver download if you have CVI.
2. Since they are specific for CVI, the header files will also be specific for CVI. The only thing that is missing for this code is the User interface (or .uir file). Notice that all examples online include at least the three files (.c, .h and .uir).

I am attaching both .h files and .uir files.
Hope this clarify how to use the C function calls.
Gerardo O.
RF SW Engineering R&D
National Instruments
0 Kudos
Message 8 of 19
(5,364 Views)
You forgot the attachments again 🙂

Jagadish
0 Kudos
Message 9 of 19
(5,365 Views)
I notice that once I post it. If you preview the post, the attachments erase on this browser.
My apologies,
Gerardo O.
RF SW Engineering R&D
National Instruments
0 Kudos
Message 10 of 19
(5,359 Views)