02-27-2018 05:49 PM
Hi,
I am trying to implement a simple code based on the producer/consumer architecture using DAQmx. So far, my code is quite simple and looks like the one below.
My questions are quite basic at the moment as I am trying to get a better understanding of the different coding techniques and the benefits each one has to offer. I was wondering, how can I implement that in a producer/consumer architecture so later I will be able to add additional processes in the consumer part?
Also in my saved tdms file, at the moment, I have only one column with my measurements. The optimal would be a 1st column to include the, a 2nd with the elapsed time while the rest of the columns will include my measurements depending on how many physical channels I have selected initially. By relative time I mean that the first cell will include the time of my computer's clock when I hit the "run" button and the last one the time when I hit the "stop". In-between the time values will depend on the rate and number of samples per channel.
I would appreciate any advice, hints or reference to examples I can study.
Solved! Go to Solution.
02-28-2018 06:28 AM - edited 02-28-2018 06:29 AM
Here is an initial cut at the Producer/Consumer setup using DAQmx.
As far as writing the time channels, you will have to do that yourself. But you can look at the Get Waveform Time Array VI in the Waveform palette to get the time values you want and then write them to the appropriate group and column.
02-28-2018 06:44 AM - edited 02-28-2018 06:48 AM
Enable DAQmx Logging and presto.
Tim/\/\/\/\/...you know better
02-28-2018 08:33 AM
@JÞB wrote:
Enable DAQmx Logging and presto.
Tim/\/\/\/\/...you know better
I almost mentioned that, but got distracted. Besides, the OP wanted a time column, which the DAQmx Configure Logging does not do. That might be worth making an Idea Exchange entry...
03-02-2018 12:34 PM
@crossrulz the "1D array of waveforms" which element is exaclty?
03-03-2018 06:23 AM
@MichailM wrote:
@crossrulz the "1D array of waveforms" which element is exaclty?
I am not sure what you are asking here. If you want to read multiple channels, you will get an array of waveforms (each item in the array will be a waveform for a single channel). I just created a constant from that output after configuring the DAQmx Write.
06-19-2019 09:42 PM
hi Crossrulz,
how to create the waveform constant for data type? what if i want to use two waveforms?
thank you!
liang
06-20-2019 06:04 AM
@frogliang wrote:
hi Crossrulz,
how to create the waveform constant for data type? what if i want to use two waveforms?
thank you!
liang
For a constant i usually r-click a fitting wire, in this case from the DAQ Read, and Create Constant. If you want to, make/read and array. 🙂
/Y
06-20-2019 07:46 AM
thanks a lot!