PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate a clock from 2 square waveform by trig on 5422

hi,
 
I want to generate a square waveform by sweeping from 2 square waveform ( different frequency ).
i tried the FGEN sweep exemple but the problem is the output turn off in the sweep time.
 
i use labview 8.5 and the PXI-5422.
 
my program : output = wave1 until trig
                       if trig
                              output = wave2 ( for finite cycle ) and then return to wave1
 
 
thanks.
0 Kudos
Message 1 of 13
(3,721 Views)
Hello,
 
Could you be more precise ? I don't understand what you want to do. Why don't you use a counter to do that ?
 
Regards,
0 Kudos
Message 2 of 13
(3,702 Views)

hi,

thanks for the reply !

i hope that this will be clear :

wave1 : ____/'''''''''''''''''\___________/''''''''''''''''''\____----------- for exmple 1Mhz

wave2 : ____/""\__/""\__/""\__/""\__/""\__/""\__/""\__------------ for exemple 10Mhz

 

trig :      ___________________________________________________________/""""""""""""\__________________________________________

output : ____/'''''''''''''''''\___________/'''''''''''''''''\___________/'''''''''''''''''\___________/""\__/""\__/""\__/""\__/""\__/'''''''''''''''''\___________/'''''''''''''''''\____

so, the output generate always the wave1 until there is a trig, and when a trig ->  the output generate wave2 for a number of pulse that i enter manualy ( here it's 5 pulse ) and after the 5 pulse, the output sweep again to the wave 1 until that i stop the process, and of course all the transitions are on the fly not like the exemple of standart function.

i tried to do this with a script, but the problem is that i can't choice the frequency of wave1 and wave2 because it's arbitrary !!!

i think that if the 5422 support the frequency list Mode it will be OK, but ...

is there any solution ?!

 

thanks again.

0 Kudos
Message 3 of 13
(3,697 Views)

Bonjour,

Ci-joint un programme qui devrait vous aider dans votre démarche. Avez vous pensé à regarder les exemples fournient avec LabVIEW ?

Cordialement,



Message Edité par Maxime MULLER le 07-23-2008 04:37 AM
0 Kudos
Message 4 of 13
(3,645 Views)
thanks for the reply,
 
i see all the exemple of fgen in labview, and finaly i use the Fgen Switch between Waveforms.vi exemple with some modification in the script and ofcourse i remove the part of software trigger.
 
now i can generate my sequence with external trig.
 
the script:
 
script SwitchWaveforms
wait until scriptTrigger1    
 repeat until scriptTrigger0
         generate Waveform1
      end repeat
repeat N  // ( N times )
generate Waveform2
end repeat
       repeat until scriptTrigger2
    generate Waveform1
      end repeat
 end script
0 Kudos
Message 5 of 13
(3,638 Views)
thanks for the reply,
 
i see all the exemple of fgen in labview, and finaly i use the Fgen Switch between Waveforms.vi exemple with some modification in the script and ofcourse i remove the part of software trigger.
 
now i can generate my sequence with external trig.
 
the script:
 
script SwitchWaveforms
wait until scriptTrigger1    
  repeat until scriptTrigger0
         generate Waveform1
      end repeat
repeat N  // ( N times )
generate Waveform2
end repeat
       repeat until scriptTrigger2
    generate Waveform1
      end repeat
 end script
0 Kudos
Message 6 of 13
(3,638 Views)
thanks for the reply,
 
i see all the exemple of fgen in labview, and finaly i use the Fgen Switch between Waveforms.vi exemple with some modification in the script and ofcourse i remove the part of software trigger.
 
now i can generate my sequence with external trig.
 
the script:
 
script SwitchWaveforms
wait until scriptTrigger1    
   repeat until scriptTrigger0
         generate Waveform1
      end repeat
repeat N  // ( N times )
generate Waveform2
end repeat
       repeat until scriptTrigger2
    generate Waveform1
      end repeat
 end script
0 Kudos
Message 7 of 13
(3,638 Views)
thanks for the reply,
 
i see all the exemple of fgen in labview, and finaly i use the Fgen Switch between Waveforms.vi exemple with some modification in the script and ofcourse i remove the part of software trigger.
 
now i can generate my sequence with external trig.
 
the script:
 
script SwitchWaveforms
wait until scriptTrigger1    
    repeat until scriptTrigger0
         generate Waveform1
      end repeat
repeat N  // ( N times )
generate Waveform2
end repeat
       repeat until scriptTrigger2
    generate Waveform1
      end repeat
 end script
0 Kudos
Message 8 of 13
(3,638 Views)
thanks for the reply,
 
i see all the exemple of fgen in labview, and finaly i use the Fgen Switch between Waveforms.vi exemple with some modification in the script and ofcourse i remove the part of software trigger.
 
now i can generate my sequence with external trig.
 
the script:
 
script SwitchWaveforms
wait until scriptTrigger1    
     repeat until scriptTrigger0
         generate Waveform1
      end repeat
repeat N  // ( N times )
generate Waveform2
end repeat
       repeat until scriptTrigger2
    generate Waveform1
      end repeat
 end script
0 Kudos
Message 9 of 13
(3,638 Views)
thanks for the reply,
 
i see all the exemple of fgen in labview, and finaly i use the Fgen Switch between Waveforms.vi exemple with some modification in the script and ofcourse i remove the part of software trigger.
 
now i can generate my sequence with external trig.
 
the script:
 
script SwitchWaveforms
wait until scriptTrigger1    
      repeat until scriptTrigger0
         generate Waveform1
      end repeat
repeat N  // ( N times )
generate Waveform2
end repeat
       repeat until scriptTrigger2
    generate Waveform1
      end repeat
 end script
0 Kudos
Message 10 of 13
(3,638 Views)