LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using the PCIe-6321 as a function generator

Hi, I have been trying to write this code for a few days now but I have just been spinning my wheels and I was hoping for a fresh pair of eyes to tell me something that I'm not seeing.

 

I have attached a diagram of the set-up I am chasing. Prior to buying the PCIe-6321, I was using an Agilent AFG, but that was needed for another application.

 

I am trying to write a code that will allow me to generate a single 10 Hz ramp waveform that will control a galvanometer, which will turn a scanning mirror from one side to the other. While this is happening, I need the code to generate a digital pulse that will trigger another part of the code to send out 500 10 kHz pulses. I have an SCB-68, with one analog output feeding the galvanometer and one digital output feeding another function generator (which is awaiting a trigger). 

 

I have attached two codes that I colleague of mine wrote, which I believe will help me achieve my goal. The "ygalvo" code should be the subVI #1 in the diagram and the "xygalvo" should be the subVI #2 in the diagram. 

 

Thank you, any comments or response are greatly appreciated.

0 Kudos
Message 1 of 5
(2,898 Views)

If there is any additional information that would be helpful in understanding my problem, I would be glad to provide it.

0 Kudos
Message 2 of 5
(2,885 Views)

Hello mohrr,

 

Are you having any specific problem?

Where exactly is that you are stuck?

Mr.O
Applications Engineer
National Instruments
0 Kudos
Message 3 of 5
(2,874 Views)

I'm not sure how to trigger the subVI #2 off of subVI #1.

0 Kudos
Message 4 of 5
(2,871 Views)

Hello mohrr,

 

The PCIe-6321 doesn't have internal triggers you you have to export the signals to a PFI line ant the use the signal as external trigger.

If you are not very familiar about how to do that, here you can find two documents that can give you an idea about how does it work.

 

http://digital.ni.com/public.nsf/allkb/A099C37789AACEE386256E35007338E6?OpenDocument

 

 

http://digital.ni.com/public.nsf/allkb/3A7F1402B2A1CE7686256E93007E66C0?OpenDocument

 

 

  

Mr.O
Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(2,853 Views)