Our target is to Synchronise the NI 5401(Frequency Generator) with the NI 6040 trigger.
This is how we do this...
1. At first, we Configure and Initialize generation in NI 5401 with the following commands
checkErr(niFgen_init(resource, VI_TRUE, VI_TRUE, &instrHandle));
checkErr(niFgen_AbortGeneration(instrHandle));
checkErr(niFgen_ConfigureOutputMode (instrHandle, NIFGEN_VAL_OUTPUT_FUNC ));
checkErr(niFgen_ConfigureStandardWaveform(instrHandle, VI_NULL, NIFGEN_VAL_WFM_SINE,Amplitude,Offset,Frequency,Phase));
checkErr(niFgen_EnableAnalogFilter (instrHandle, "0", 0));
checkErr(niFgen_EnableDigitalFilter (instrHandle, "0"));
checkErr(niFgen_ConfigureOutputEnabled(instrHandle, "0", VI_TRUE));
checkErr(niFgen_ConfigureTriggerMode (instrHandle, "0", NIFGEN_VAL_SINGLE));
checkErr(niFgen_ConfigureTriggerSource(instrHandle, "0",NIFGEN_VAL_RTSI_2));
checkErr(niFgen_InitiateGeneration (instrHandle));
/** With these commands the NI 5401 should wait for the trigger signal from RTSI 2**/
2. Then we start the trigger from NI 6040 through RTSI2
So that as soon as the NI 5401 receives a trigger it must start generating. But due to +5V output from the NI 6040 the wave form geneartion takes place before receiving the trigger. (e.g. when checkErr(niFgen_InitiateGeneration (instrHandle)) it already starts generation without waiting for the trigger).
As you said it is not behaving exactly when we route a signal. Please provide us with a solution which could make the RTSI to output 0V when the Ni 6040 is intialized.
With Regards,
Nirmal
ISI-SYS
Kassel, Germany