LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

number of samples per second

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

0 Kudos
Message 21 of 26
(1,162 Views)
Hi
It is very difficult to comprehend your code

Q1: Are you actually saving your data to disk at any time?


Maybe I'm missing a point but would it not be better to have a consumer/ client  model ( use two loops) 'runnning independant 'of each other apart from updates.


With regard to 2nd question

your have already set up the sample speed, if you have no buffers then it is very possible that salient data could be lost ( overwritten)

Xseadog





0 Kudos
Message 22 of 26
(1,153 Views)

I agree about the producer/consumer. In fact, I already mentioned it.Smiley Wink

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.

0 Kudos
Message 23 of 26
(1,149 Views)

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... ! Smiley Wink

- Partha ( CLD until Oct 2024 🙂 )
Message 24 of 26
(1,136 Views)

Post your VI saved in LV 7.1.

I ll try to help you, if time permits... Smiley Wink

- Partha ( CLD until Oct 2024 🙂 )
Message 25 of 26
(1,135 Views)

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

0 Kudos
Message 26 of 26
(1,124 Views)