03-21-2019 06:22 AM
I am a labview novice. I have a few problems with the VI attached, I would really appreciate some expert user comments on the following issues: (note, there are a range of subVIs from instruments which I haven’t attached)
I really hope I have explained things properly, many many thanks to whoever will help!
Solved! Go to Solution.
03-21-2019 06:55 AM
Hi even,
to solve that Error -200279: DON'T use an additional wait time in your loop when you have set the DAQmx task to a fixed samplerate!
Other things:
- get rid of all those ExpressVIs (SplitSignal, MergeSignal) when handling your sample data! Use simple IndexArray functions instead!
- just read 1 sample per channel instead of "N samples" with a default "-1" for number of samples: now you will get just a 1D array of samples, with one sample per channel. No need to convert a 2D array to DDT to several DDTs to not so many DDTs to 1D arrays! Much easier!
Like this:
03-21-2019 07:05 AM
Hi Gerard,
Thanks so much for your reply. Unfortunately I have already tried the following:
to solve that Error -200279: DON'T use an additional wait time in your loop when you have set the DAQmx task to a fixed samplerate!
- I already have a fixed sample rate (I think)
- while loop with no wait time still flags Error -200279
Other things:
- get rid of all those ExpressVIs (SplitSignal, MergeSignal) when handling your sample data! Use simple IndexArray functions instead!
- Index array for splirring the gives me very random numbers, any idea why? I will try again though.
- just read 1 sample per channel instead of "N samples" with a default "-1" for number of samples: now you will get just a 1D array of samples, with one sample per channel. No need to convert a 2D array to DDT to several DDTs to not so many DDTs to 1D arrays! Much easier!
- Cool! I will try that.
Thank you!
03-21-2019 07:18 AM
Hi even,
your "Global channel" consists of 3 entries: Power, Load, and Cell5:1. I guess these are 7 DAQmx channels - but you should know that for sure from your global definition. That's why I index upto 7 values from the 1D array.
Btw. your first entry is "Power", but you wired that value to the Load indicator. The 2nd "Load" value is wired to the Power indicator - do you know why you did that?
03-21-2019 07:19 AM
Please read the Data Sheet of your 9239
The smallest possible sampling rate is about 1.62 kHz. Even if you request 1 Hz aquisition rate, daqmx will ignore this request and coerce this to a valid valie.
Regards, Jens
03-21-2019 07:22 AM
Hi even,
Jens is right! I didn't notice that special DAQ device.
So set a sample rate of 2.5kHz, read 2500 samples per channel and average each channel to get again 1S/s in the loop.
You might also set 2.5kHz samplerate and read 500 samples to get a new set of data each 0.2s…
03-22-2019 01:11 PM
Thank you so much guys!!