01-21-2016 05:52 AM
Hi
So please find the attached example
The problem is because You are acquiring one sample with dynamic data type (to complex for simple scalar). So You need to extract this scalar from the DDT, in my
example i convert group of signals to 1D DBL array, then You are able do scale it by multiplying or dividing. Then You need to build waveform inside the loop and covert it to the temperature. At the end You need to extract the samples from the array of the waveforms.
In general this apllication simulates temperature reading from 2 chanels(1 sample with DDT as output) convert this data to temperature and display the results.
As You can see this application could be much more simpler with DAQmx API.
Please write a feedback
Regards
01-21-2016 01:29 PM - edited 01-21-2016 01:40 PM
I'm still trying to know arrays and loops better but it seems that I;m standing in the same place all the time. Could you tell me, how to make this loop working for 20 channels ? I tried to use your piece of program but as you said, it works for two channels 😞 I must be really unlucky to have such assignement to do when having small knowledge about programming.
P.S. Indicator shows only 0 and 1. ( 2 iterations ) Maybe I should rewire my daqs outputs from just two to 4 and 16 and then put them together before the loop ?
01-22-2016 08:33 AM
Try attached example. It measures data, convert it to temperature, displays it on waveform chart, and latch measurement from all channels every specified time and calculate difference.
Please pay attention to the basics, as You can see i copy and paste every solution i send to You in this and previous topic. Please study materials i send You before in previous topic, its really enough to write application like that.
Please treat this example as a framework because we can't give You the ready solutions.
Regards
01-22-2016 09:22 AM
@Galjuntur wrote:
Well, I forgot about it 😮
I got two possibilities :
a) using constant value ( which is not connected yet - i don't think that cjc voltage = cjc temperature)
b) using one thermocouple as a cjc sensor
So you have to find out how the TC EMF amplifier is handling the CJC. At the point where the TC voltage (or EMF) is measured by connecting the TC wire with a (usually) copper wire, is your CJC.
If you make a shortcut at the TC input (of the amplifier) you should read the CJC temperature ... if it make a CJC compensation itself. If it is a simple amplifier you read zero 😉
If your CJC is always at 'stable' room temperature you can asume that roomtemperature as your 'constant' CJC temperature.
here is my suggestion including these useless dynamic data conversion.... if you use DAQmx directly read an array of wfrms 😉
01-23-2016 02:59 PM
Thank you for your solutions and vis. I think I get this now.