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.
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.
03-14-2007 01:35 AM - edited 03-14-2007 01:35 AM
Message Edited by Puranik on 03-14-2007 01:38 AM
03-14-2007 05:32 PM
Prashantha,
It looks like you are using LabWindows to do your programming. I would suggest starting with the example programs (Help » Find Example… » Hardware Input and Output » Modular Instruments » Arbitrary Waveform Generation). I used these and was able to produce sine, square, dc values, etc. Please let me know if you have further questions.
03-14-2007 08:08 PM
Hi Prashantha,
I was wondering what is the frequency of the waveform 5406 is generating for 0 Hz on your side?
I made a simple example code with the parameters you have described and ran it. I couldn't see the behaviour you were describing.
Am I missing anything as how you are measuring the signal ?
I would recommend using NI-FGEN Soft Front Panel to create frequency list and generate the list to isolate the issue.
Thanks,
03-15-2007 01:50 AM
Hi David,
Thanks for your reply.
I again tried the example program (Help » Find Example… » Hardware Input and Output » Modular Instruments » Arbitrary Waveform Generation). I have few points to clarify here
1. We are using PXI-5406 which doesn't support for Arbitrary Waveform mode so we can use ONLY frequency-List metod. ( In arbitrary waveform we can generate SineWave followed by DC with 0V).
2. I used frequency-List method to generate the waveform using soft-front-panel and found that PANEL DOESN'T ALLOW to enter 0Hz as one of the frequencies in Frequency-list. It rounds off 0-Hz into 9.313mHz frequency which is minimal possible frequency.
So Pls clarify whether "we can use PXI-5406" for Burst wave generation ( i.e. Sine wave-400Hz for 1Sec followed by a 0V-DC for another 1 Sec and whole waveform is repetitive).
Thanks
Prashantha
03-15-2007 02:04 AM
Hi,
Thanks for your reply.
I tried to gererate SINEE_WAVE and with frequency 400-Hz and SINE Wave with 0-Hz using NI-Soft front panel and here is the results.
1. I used frequency-List method to generate the waveform using soft-front-panel and found that PANEL DOESN'T ALLOW to enter 0Hz as one of the frequencies in Frequency-list. It rounds off 0-Hz into 9.313mHz frequency which is minimal possible frequency.
Pls let me know how you are able to get the proper waveform. I'll again specify our requirement,
Requirement: Sine wave-Burst.
Detail. 400-cycles of Sine wave of 400-Hz, ( i.e 400Hz-sine wave for 1.0 sec) followed by 0-V DC for 1.Sec. This whole waveform should be repetitive.
Note: This is one of the requirements under Burst-waveform , we have similar requirement for different frewuency and different duration.
Pls let me know you suggestion on this. Your input will help in great extent to take the decision.
Thanks
Prashantha
03-15-2007 05:45 PM
03-16-2007 02:00 AM
Hi,
I have experimented by creating different frequency list and I captured the waveform fro the following requirement.
Burst 400 Cycle, Frequency:400Hz, Period 2-Sec ( i.e 1-sec Sine wave of 400 Hz and 1-Sec silent , whole waveform is repetitive).
The channel 1 waveform is generated using Frequency-List method, and Channel-2 waveform is generated throuth HP-3314A Function generator ( exisitng Fgen and we are working on to replace this model).
You can notice these differences with the NI and HP (stand-alone- GPIB) function generators.
NI-Fgen --- Silent mode is not really silent it is a low frequency sine-wave ( it repeates over a period difficult get full cycle in one screen-shot). whereas HP silent mode is really silent. ( In HP-It's called N-Cycle mode and we can select thenumber of cycles, waveform type, amplitude, offset, frequency and in addtion to that WE CAN SELECT - TRIGGER INTERVAL ).
Pls let me know is there any way I can generate the waveform using NI-PXI-5406 which can match with the HP-3314A waveform?
I created the frequency List with only 0-Hz and found it's 0-Hz signal not a very low frequency signal. ( In above example i'm sine-wave amplitude is 1-Vpp)
Thanks
Prashantha ( prashantha.puranik@honeywell.com)
03-16-2007 12:21 PM
Hi Prashantha,
Thanks for taking those screenshots. They really helped us understand the scenario well. When the function generator generates 0Hz, it simply holds the last generated value. When it jumps from 400 Hz to 0Hz, it is generating the last point in the 400 Hz sine waveform.
Before I jump into conclusion to explain the scenario here.
Can you please post the code you used for the test so that we can execute here rather than the code snippet? Then I can probably point the exact solution.
03-20-2007 01:18 AM
Hi,
Thanks for your inputs. Pls find the code below,
#include "nifgen.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <windows.h>
#define WFM_SIZE 1000
#define SEQ_SIZE 2
int main(int argc, char *argv[]) {
ViChar Resource[256];
long j=0;
const ViChar * ChannelName = "0";
ViReal64 freqArray[]={400.0,0.0},durationArray[]={1.0,1.0};
ViReal64 freqArray2[]={0.0},durationArray2[]={1.0};
ViInt32 frequencyListHandle;
ViStatus error = VI_SUCCESS;
ViSession vi=VI_NULL;
ViReal64 amplitude=1.0,dcOffset=0.0;
// set default values
strcpy(Resource, "DAQ::5::INSTR");
/*- Initialize the session ----------------------------------------------*/
printf("Initializing %s\n", Resource);
checkErr(niFgen_init(Resource, VI_TRUE, VI_TRUE, &vi));
// niFgen_ConfigureTriggerMode (vi, VI_NULL, NIFGEN_VAL_STEPPED);
/*- Configure output for sequence mode ----------------------------------*/
checkErr(niFgen_ConfigureOutputMode(vi, 101));
printf("Mode Value %d\r\n",NIFGEN_VAL_OUTPUT_FREQ_LIST);
niFgen_CreateFreqList(vi, NIFGEN_VAL_WFM_SINE,\
2,freqArray,durationArray,&frequencyListHandle);
niFgen_ConfigureFreqList(vi, VI_NULL,frequencyListHandle,\
amplitude,dcOffset,0);
/*- Enable output and start generating ----------------------------------*/
checkErr(niFgen_ConfigureOutputEnabled(vi, ChannelName, VI_TRUE));
checkErr(niFgen_InitiateGeneration(vi));
// clear the input buffer, then wait for user input before closing the session.
// (DAQmx devices will quit generating the output when the session is closed).
fflush( stdin );
printf("Press Enter to continue...\n");
getchar();
Error:
/*- Process any errors ---------------------------------------------------*/
if(error != VI_SUCCESS) {
ViChar errMsg[256];
niFgen_ErrorHandler(vi, error, errMsg);
printf("Error %x: %s\n", error, errMsg);
}
/*- Close the session ----------------------------------------------------*/
if (vi) niFgen_close (vi);
return 0;
}
Pls let me know is there any way we can generate the required waveform using frequencyList or using niFgen_DefineUserStandardWaveform method.
Thanks
Prashantha
03-21-2007 12:01 PM