04-09-2007 01:49 PM
Hi Dennis,
I appreciate your time and support.
I am making things more complicated i guess.... yes even i was able to change the number of samples & the sample rate when i read the channels in a separate program....( i just tried out doing with DAQmx...it worked fine )
but the challenge arised only when i tried to implement in my real time program....
lemme try one more time explaining my situation.....please be patient with me i am totally confused.........................
In the first frame of my program i configured the channels (4 channels ) and after that added sample clock and obtained the task ID.
moving on , in my 3rd main frame i read the channels by using the task id ( from first frame) and obtained the channel data and did the necessary calculations etc. this is my regular sequence of the program.
my timing issues starts when the program is in the 3rd main frame.
i have 3 flat sequence structures in 3rd main frame.( the program takes approximately 150 - 200ms for the 3rd frame to complete )
0 - timing starts.
1 - processing
2 - obtaining all the values & plotting
3 - calculating the time considering the number of samples per second.
As i cannot produce my entire code here ,i will just attached 3 flat sequences which will enhance the understanding of my code..............
but when i interrupt the program to do some operation which is present in the 2nd main frame , i still need to read the channel data to be read continuously in one of the subvi's.
so my questions are ,
1.In the frame 1 i am reading the channels continuously to get the data..................
2. Even when i interrupt the program , i need to read the channels continuously...................
what determines the sample speed here?????
please help me out to resolve this issue.am becoming mad
thanks
radhika
04-09-2007 04:03 PM
04-09-2007 04:12 PM
I agree about the producer/consumer. In fact, I already mentioned it.
I would not even try to understand a VI with so many nested sequence structures. Of course, I wouldn't use any sequence structures at all but that's a different story.
You statement that in frame 1 you are doing a continuous acquisition is completely wrong. You are doing just the opposite of continuous acquisition.
04-10-2007 08:45 AM
Radhika,
You need to do a lot of code cleaning, I think, for anybody to understand it as a whole...
I can tell you one shortcut, wherein you can change all your Stacked Sequences into Flat Sequences by Rt clicking on the Stacked Sequence frame border & choosing Replace with Flat Sequence structure.
Go doing this first from the innermost working code part to the outermost.
By doing this, you can get a clear idea of the whole code by yourself.
Then, if you re not clear still, repost that new code here, so that the experts will tell you where all you can eliminate the unnecessary parts in your code...
Unlike what you ve stated in your post, they re not Flat Sequence structures, but Stacked Sequence structures.
Flat Sequences are never numbered... !
04-10-2007 08:48 AM
Post your VI saved in LV 7.1.
I ll try to help you, if time permits...
04-10-2007 12:13 PM
Hi partha...
yea i know it was stacked sequence structures.....
sure i will change to flat sequence and post any Q if any......
thanks for ur time.....
radhika