11-23-2005 03:07 AM
11-23-2005 03:38 AM
Hi,
From your VI, I understand this.
Once you press enable, you want to do an acq and calculate mean every 100th milli sec
The sampling rate you have selected and number of samples to read will result in data getting acquired for 100 milli sec or 1/10th of a sec.
so, once you press enable, you will want this config and acq to be happpening 10 times in a sec, or 100 mSec per acq.
To achieve this, the timeout case event should be executing continously after pressing enable.
so the timeout will be 1 milli sec.
But, even this should not really give accurate 1/10th sec acq, the reason being you are creating a virtual channel and start each time before doing a DAQmx read and this also takes some finite time.
so, think of a way to get over this.
regards
Dev
11-23-2005 03:49 AM
Hi,
I still don't understand timeout here. could you explain to me first. I am in an urgent, could you pls reply to me promply. I appreicate your help
11-23-2005 03:52 AM
Hi Dev:
I think I had some idea. You mean in the eable event structure, the timeout is set 1 in the shift register. Am I correct?
11-23-2005 03:59 AM
Hi Dev:
I am sorry. I think I would like to make thing easy, so I need to answer your suggestion again here. Is it important to count the finite time. because I just to need to make it like DMM. The value is stable and it can stay there for a minimum of 2 seconds.
11-23-2005 05:06 AM
Hi,
i am trying to send an attachment
And it is failing, 😞
plz wait till i am able to send it
regards
Dev
11-23-2005 05:20 AM
Hi,
Take a look at attached VI( meter_1 is the main VI and one acq is the sub vi)
I have tried to do the same what your current meter VI does, but with different logic.
It does what you want to achieve without the use of events..
When you press enable, first the 'enable digital port' is set and then a sub vi opens which does continous acq with an iteration every 1/10 of a sec.
On this sub vi, pressing reset, stops acq and sets the 'reset digital port' and returns to main screen
Hope this helps
Regards
Dev11-23-2005 08:59 PM
Hi Dev:
Thanks.
In your previous mail, do you mean your example will skip the 1ms timeout in shift register of the event structure when pressing the enable button on or off, that way i can get an accurate 1/10th sec acq. Am I correct?
If so, I would also like to know if I add one or two push buttons, you perfer adding it in the case structure, not event structure, I need your suggestions.
Attachment is what I am trying to do right now, I have add niScope EX Multi Record vi in it.
11-23-2005 11:00 PM
Hi,
Your attachment is missing!
This is what i tried to demonstrate in my VI.
"In the Vi you developed using event structure, you will not read input every 1/10 of a sec, since when flow goes to the time out case, first your virtual channel is created, then sample clock is set and start acq is given and all this takes some time to happen.After this, DAQmx read for 1/10 to of a second. Totally, this timeout condition will take more than 1/10 of second to finish. and your objective is not achieved.
The 1 msec time out ensures that teh time out condition is executed almost continously till you press reset and make it -1"
However in the attached VI where i have not used case structure, continous AI read happens every 1/10 of a sec without configuring AI for each loop.
Hope this answers your doubt.
regards
Dev
11-23-2005 11:25 PM
Hi Dev:
I am very sorry. I thought I did my attachmet because I remebered I did it one more time. Anyway, I am attating my file. Please take a look and give me some suggestions. Thanks!