Quantcast
Channel: Counter/Timer topics
Viewing all articles
Browse latest Browse all 1271

Periodically timed pulse counting

$
0
0

Hi all,

 

For my research project I'm working on a tabletop fusion device. The main goal is to investigate the neutron production. At the moment I'm automising as much as possible. 

I have 3 analog input signals for voltage, pressure and current and 1 analog output signal to control the voltage and I have a USB camera continously filming the inside of the reactor. Furthermore the neutron counter puts out TTL pulses usually at 25-100Hz.

 

The aim of my program is to continuously measure the analog signals so I can see the pressure, current and voltage and video in real time. Furthermore I'd like to periodically (when I press a button) measure the neutrons for a set period of time and during this time I'd like to record a movie. After such a measurement I'd like to plot the pressure, voltage and current vs. time (for the duration of the measurement) in one plot and total counts, and counts per second vs. time in a second plot.

 

I've done this with a different ADC/DAC device and it worked allthough the aquisition rate was low. I used to measure pressure through serial communication with the pressure meter (which made the loop time very long) but now I've figured out a way to measure the pressure directly with an analog signal. Since the other adc/dac device had only 2 adc channels I switched to the PCIe-6361 and now I'm  trying to replicate my program.

I've made two timed loops, one running on its own doing all the analog and video aquisition, and another timed loop inside a case structure inside a while loop. When I press a button the case with the timed loop is selected and this loop starts the aquiring the counter data and outputting that together with the data from the other (continuous) loop. In my old program I used a local variable of the cluster with my data, in my new program I'm trying notifiers. After the set time is up the timed loop should end and all data should be put in an array to be made into a waveform and plotted. I also would like to see the remaining time of a counting period and perhaps the total counts in real time during counting.

 

At the moment I'm stuck configuring the DAQ counter to do the same thing I did with my old program. I read some stuff about pause triggers, and using a second counter to generate a clocksignal for the first but that only confused me more, escpecially what clock times to pick . Furthermore I'm worried about the timed loops running in parallel, I assume they're not synchronized, is that a problem?

Is it an option to put the counter in the continous loop, and use the second (occassional) loop purely for data logging, resetting the counter when I start a measurement? 

Are there any other bottlenecks I'm not aware of? 

 

I added both VI files, FusorDiag and FusorDiag2. The first, allthough some VI's in it are not visible, works and is instructive of what I'd like to achieve. The second is very similar, but not yet finished, (I haven't put the data in an array, or attempted to make the waveforms and plots). Any advice is more than welcome.  

 

Kind regards, 

 

Mick Wijnen


Viewing all articles
Browse latest Browse all 1271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>