LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Syncing an instrument ramp with another device reading signal

I am attempting to ramp up the mass a mass spectrometer (MS) is passing while measuring the signal that passes through the MS.

 

The MS is an Extrel QMS that is controlled via a 0-10 VDC mass command and three -5 to 5 VDC control commands that control other variables.  I haven't finalized (or bought) the DAQ that will control this but I am thinking the PCI-6703 or PCI-6704.

 

The measuring device is a Keithley 6514 measuring current.  This is controlled via GPIB going to an Agilent 82357a.

 

I have attached a simplified version of the VI I am working on.

 

There will be four waveforms for the four analog outputs.  The t0 and the dt will be the same and the Y-values will be different. (I combined these in the example VI for simplicity).  The dt is based on the set integration time of the 6514 which is PLC of 1 = 16.67ms.  This way the voltage ramps a step for evey keithley reading.

 

The rest of it is the usual setup where I activate the AOs and I use an internal channel to have the mass command also be AI.  The timing is synced to the waveform.  The DAQ Write task is synced to the start trigger of the DAQ Read task.

 

This way all of the ramps and the read of the mass command ramp start at the same time.

 

For the 6514 I set it up to write to a buffer for read speed. I want to start writing to the buffer as the ramp starts and when the ramp ends have it read from the buffer.  This should collect at the same speed as the ramp because I am syncing dt with the PLC value of the 6514.  This is my hardware syncing.

 

All of the waveforms are in the loop because I want to be able to change their values without needing to stop the program. (Not sure if this is possible)

 

I think that I have it setup so that the buffer is sized to the number of steps in the voltage ramp and then auto reads out what's at the buffer when the buffer is full. So this should sync the end of the read.

 

The part I am wondering about is how to start the 6514 filling its buffer at the same time the ramp starts. 

 

Thank you for any help/advice.

0 Kudos
Message 1 of 2
(2,562 Views)

Hello Syncing_Mass_Specs,

 

I see the next details in your block diagram that you might want to check before you get your DAQ tasks to work properly:

 

  • Usually, the task configuration includes the timing information and the Start Task VI. This means, theDAQmx Timing, DAQmx Start Trigger, and DAQmx Start Task should be outside of the while loop, since calling them again once the task has started will cause errors in the API. I recommend you check the next resources:
  • I suggest you test your tasks separately, before trying to make a VI as large as this one, work. For example: have one VI to do the GPIB handling. See if that works, and note how it operates. Then make another VI to do the DAQ tasks, and check they work correctly. Then you want to be developing your whole application together. After every part of it proves to work as expected in a separate way.
  • Finally, I recommend you check the built in Examples, and see hoy they handle the DAQmx tasks. They present the best practices for read/write to all types of inputs and outputs. I would suggest especially the one located at Help > Find Examples > Hardware Input and Output > DAQmx > Analog Output > Voltage - Continuous Output.vi

 

Good luck with your application! Let us know which further questions do you have.

0 Kudos
Message 2 of 2
(2,492 Views)