From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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?

The last .uir file and the two project files.
Gerardo O.
RF SW Engineering R&D
National Instruments
0 Kudos
Message 11 of 19
(4,829 Views)
The last .uir file.
Gerardo O.
RF SW Engineering R&D
National Instruments
0 Kudos
Message 12 of 19
(4,827 Views)
Hi

The arbitrary waveform generator documentation says that we can control the digital gain by scaling the waveform appropriately before it enters the DAC in NI 5421. However, I am unable to find any C function attribute associated with this functionality. The way I located this "digital gain" was by searching in "NI-FGEN --> Documentation --> NI signal generators help". Theres some reference to Labview commands but nothing pertaining to C. Can you please point me to the appropriate functional attribute in C?

Thanks
Jagadish
0 Kudos
Message 13 of 19
(4,807 Views)
Hi

Can you tell me how to use the attribute "NIFGEN_ATTR_DIGITAL_GAIN" in a C function??

Thanks
Jagadish
0 Kudos
Message 14 of 19
(4,805 Views)
Hi,

Since the attribute you mention is type ViReal64, then you will need to use niFgen_SetAttributeViReal64:

ViStatus niFgen_SetAttributeViReal64 (ViSession vi, ViConstString channelName, ViAttr attributeID, ViReal64 attributeValue);

Search for this command in the help and you will see the entire description.

Hope this helps,
Gerardo O.
RF SW Engineering R&D
National Instruments
0 Kudos
Message 15 of 19
(4,800 Views)

Hi

Thanks for your earlier reply. Just one more question 🙂 I am trying to use "niFgen_SetAttributeViInt32" in order to configure the AWG to use the direct path using the attribute "NIFGEN_VAL_DIRECT_ANALOG_PATH". The function arguments are:  

niFgen_SetAttributeViInt32(ViSession vi, ViConstString channelName, ViAttr attributeID, ViInt32 attributeValue);

I am unable to figure out that attribute value I need to assign in order to use the direct path or alternatively the main paths etc. Can you please let me know?

Thanks

Jagadish

 

0 Kudos
Message 16 of 19
(4,792 Views)
Hi,

The actual attribute to change is "Analog Path" and the actual value is "NIFGEN_VAL_DIRECT_ANALOG_PATH".
I found this information when I look at the Analog Path help page: "Output Attributes:Analog Path".
Usually, values in cap case are constants and will be values in text based programming of our drivers.

Hope this helps,
Gerardo O.
RF SW Engineering R&D
National Instruments
0 Kudos
Message 17 of 19
(4,788 Views)
Hi Gerardo

You have been most helpful so far 🙂 I am now able to fully control the AWG. I am now trying to also include the RF upconverter in the loop and use the RFSG module. I do have the documentation, but do not have any C file examples like in the case of NIFGEN. I only seem to have CVI files along with the NI installation. Can you please send me a sample C code that uses both the AWG as well as the RF module? Even a simple sine wave/arbitrary waveform generation would be most helpful.

Thanks
Jagadish
0 Kudos
Message 18 of 19
(4,778 Views)
Hello Jagadish,

Unfortunatelly there are no directly in C examples for RFSG (Probably after this you might not think I was very helpful haha).
Again, we will need to use CVI examples and "Translate" them into tour specific application. I am attaching a single tone generation for RFSG which probably you have since you installed the driver.
These CVI examples will help you understand each call. Remember that you will need to remove basically the user interface part and they will be very close to ANSI C application.
Hope this helps little more and probably you can publish your code in our examples section and have your name there Smiley Indifferent.
Gerardo O.
RF SW Engineering R&D
National Instruments
0 Kudos
Message 19 of 19
(4,774 Views)