07-04-2010 09:27 PM
Hi All
I have a question when looking on NationalInstruments.Analysis.SignalGeneration classes which including many Signal type generator but all of them didn't bind with any particular hardware device. What kind of hardware resource this class use to generate those signals ( a host PC or intrumental hardware) . If it is the first case how could we generate a HF signal for RF application ( in a range of multiple GHz) . If it is the second case , how we could bind the instrument hardware to this class as I didn't see any mean that we could bind the instant of this class and the instant of modular instrument class.
Similar question for RFSA and NationalInstruments.Analysis.SpectralMeasurements .
Hope that some one could give a clarification .
Regards
07-07-2010 04:01 PM
Hello Khammonh,
For the niRFSG_WriteArbWaveform function you need an array of ViReal64 values for the I data and an array of ViReal64 values for the Q data.
Any function that can provide this type of information can be used to supply this data to the waveform function.
As for binding the classes together, you are probably better off just passing the data from the signal generator to the RF waveform.
Let me know if you need any more information about RF Generation with RFSG and I will be happy to help.
Regards,
Dan King
07-08-2010 01:15 AM
Hi Dan
Thank for reply
If possible I need a sample code in VB.NET or C# for RFSG application .
Regarding I and Q data if we use SineSignal's instant class to generate by shifting the I and Q phase to 90 degree different (Sine and Cosine function) , would this guarantee that the generate array of double data refer to the same angle e.g. Sin(X) and Cos(X) as in the constructor of SineSignal class take only Frequency, Amplitude and phase . The Sine object would be one instant of SineSignal with phase=0 and the Cos object would be another instant with phase equal +90 or -90 . When these two object instant invoke its Generate method do they start at the same angle or time so that we can couple both I and Q without worry that they are at the same polar position.
Anyway if you have a full sequence sample code it would help me to understand it more clearly.
Regards
07-09-2010 10:47 AM
Hello Khammonh,
I couldn't find any example code in VB.NET or C#, but I did find a wrapper for the driver so that you can use NI-RFSG in either VB.NET or C#. You can find the wrapper in KnowledgeBase 3939UN5B: Microsoft Visual C# and Visual Basic .NET Wrappers for National Instruments .... Even through the wrapper was designed for an older version of NI-RFSG the calls into the DLL are the same. Additional functions are available in the driver, but not included in the wrapper. If any of these functions end up being necessary for your application you shouldn't have any problem adding them to the wrapper.
I also attached an example from CVI, which should give you an idea of the flow of an RFSG application. Information on each of the functions can be found in the NI RF Signal Generators Help, let me know if you have any questions about any of the functions.
As far as creating the data, the functions you have described will create waveforms with their first sample as the phase you specify. They will both start at zero in time.
Let me know if you have any further questions about getting started with your application.
Regards,
Dan King