04-28-2008 12:08 PM
04-29-2008 04:31 PM
Hi Monica,
It sounds like you are on the right track with combining those two examples. The Digital Output Task in the Cont Write Dig-Port-Ext-Clk.vi example is configured to be a continuous hardware timed digital output. You must provide an external sample clock to time this output however. This is where the Counter Output task comes in. The Gen Dig Pulse Train-Continuous.vi shows you how to setup a counter to generate a clock for you. This clock can be used to time the Digital output task. Here are some important things to remember when setting this up.
Please let me know if you have any questions and take care.
Thanks,
05-19-2008 12:34 PM
05-20-2008 11:35 AM
Hi Anna,
The best way to do this will depend on the rate you are trying to acquire at and how the data will need to be split up. How quickly are you scanning through the 16 amplifier channels? Do you need to have more than one sample from each channel before it moves on to the next and if so how many samples? It would be best to make the sampling rate of the analog input task a multiple of the digital task’s sampling rate. If you just need one sample per amplifier channel for each pass of the digital task then you could use the same clock driving the digital output task for the analog input sample clock. If you do this I would make the digital task change on the rising edge of the clock and the analog input task on the falling edge. This way you have half a period for the digital lines to change and the amplifier to settle before the sample is taken. I would recommend reading the data as an array instead of a waveform if you do not need the timestamp information in the waveform. This is because it will be easier to split up as an array. You can then use the Decimate 1D Array to split the array up into 16 parts. Let me know if you have any questions.
Thanks,
05-20-2008 11:55 PM
05-22-2008 02:38 PM
Hey Anna,
You can specify which edge of the sample clock the digital output and analog input tasks use by setting the “active edge” terminal of the DAQmx Timing VI for each task. You can set the active edge to either rising or falling. Since you need the time stamp data from the waveforms it can be a little complicated splitting the waveforms up correctly. I’ve attached a VI I wrote that does this. You can use this as a subVI. Pass your waveform into it and wire the number of channels you have to the “# of Decimated Waveforms”. In your case this should be 16. The output will then be an array of 16 waveforms, one for each of your amplifier channels. Make sure the number of samples in your original waveform is a multiple of 16. You can do this by setting the “Samples to Read” terminal of your DAQmx Read Vi to a multiple of 16 also. Let me know if you have any questions.
Thanks,
10-18-2018 09:29 AM
Hello Monica
Now, I have the same project to deal with multiplexer using labview. Would you please provide your Vi? I think this will help to solve the problem.
Thank you very much!
gjhtim