08-26-2013 02:49 AM
Hello everyone,
I have 2 channels (one strain gauge and one LVDT)
I want to get 1 sample per second (I don't really need more than 1 sample per second right now) from both channles and draw a XY graph
the problem is if I set the DAQ-assist as shown in "DAq-Setting" I got the Error-200279.
it's important for me to have nice continuous graph so i want to set it to continuous sample
i dont really know what to do even changing the Number of samples or Timeout doesn't do anything
(I also attached my code)
thanks in advance
08-26-2013 05:07 PM
Hello deCipher,
What device are you using? What is the delay time you have set? Have you tried sampling at a higher rate and decimating the samples once you get them? Here is an example of how to decimate a 2D array:
https://decibel.ni.com/content/docs/DOC-13925
Regards,
-Travis E
08-26-2013 11:50 PM
I'm using NI-cDAQ-9178 and for time delay even if i put "-1" it doesn't fix the problem.
I'm working on decimating the samples but still I don't understand even with the higher samples, if I select "continuous" instead of "N samples" i got the error!
is there any way to fix this issue?
Regards
08-28-2013 09:11 AM
Hello deCipher,
It sounds like there is a time discrepancy between the loop time and the Sample Rate of the DAQ Assistant. Right now you are trying to run the DAQ Assistant continuously, which will make the hardware gather the amount of samples you requested return them and try to gather more. Your current Sample rate is 1 S/s with 2 set as the number of samples to acquire which means the DAQ assistant is going to take 2 seconds to gather its information. I think this is too slow and would suggest for you to increase both the Sample Rate (not the loop delay) and the samples to acquire. I would also change the sampling mode to N Samples since you are in a loop so at each iteration you know that you are taking only N samples.
-Travis E
08-29-2013 12:56 AM
thats true! but there are few things that i dont understand
1) if I choose N samples the minimum number is 2 what if i just need one? is there anyway to get one sample per second?
2) if I go with more than one sample per second im not going to have a nice graph with the continuos line and its going to be dots which i dont like!
I'm very intrested in decimating the array im working on it, might need some help to make it work
regards
08-29-2013 07:49 PM
Hello deCipher,
You will get an error if you try to set the timing for your card to 1 sample per second if you have it set up as N Samples. You can achieve the 1 sample per second setup through software timing by specifying "1 Sample (On Demand)" in the Acquisition Mode then placing the DAQ assistant in a loop that has a delay of 1000 ms. You would not need to decimate your data after this.
Regards,
-Travis E
08-30-2013 10:31 AM
thats funny, I also get an error if I choose"1 Sample (On Demand)". I wonder, does my device support this mode? because when you select this mode there is no other option and it keeps saying
"
Error -200077 occurred at DAQ
Assistant
Possible Reason(s):
Requested value
is not a supported value for this property. The property value may be invalid
because it conflicts with another property.
Property:
SampTimingType
Requested Value: On Demand
You Can Select:
Sample Clock
Device: cDAQ1
"
I have no control on Sample Clock
Regards
09-03-2013 07:19 PM
Hello deCipher,
I apologize for the misinformation, cDAQ does not support hardware timed single point. Lets try using a software timed approach as outlined in this example:
https://decibel.ni.com/content/docs/DOC-11353
You should be able to set the samples to read overall as well as the delay in the loop. I do not believe this will give any issues since you will no longer relay on the timing engine of the device but rather the software time of the while loop.
Regards,
-Travis E