LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx and tick count issue

I will admit, it has been a while since I wrote code for Labview.  I got help earlier with the tick count and creating a 0-1 second timer with it.  Now I have a problem with that code within a While loop that has data passed to it from a DAQmx vi.

 

When I run the code (while it is connected to my CompactDAQ) the tick count operates at the same speed as the sample clock.  This makes sense to me.

 

 

My question is, is there any way in the sample code that I have posted to get it to run at a faster pace than the sample clock through either another loop or any other solutions.  I do need the Elapsed time elsewhere in the while loop where it is currently located as well.

 

Thank you for any help

0 Kudos
Message 1 of 10
(3,149 Views)

Each loop can only run at 1 cycle per cycle due to the DAQ read.  Since you are capturing at 1kS/s and reading 1000 samples, your read will take at least 1 second.  You have to wait for the data to come in, after all.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 10
(3,143 Views)

Please post in 2009 version.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 10
(3,142 Views)

With that in mind, is there any way to do what I would like to do through either the use of multiple loops or another way to get a 0-1 second clock that continuously runs?

0 Kudos
Message 4 of 10
(3,139 Views)

Hope I did this correctly and I apologize if I didn't.

 

 

0 Kudos
Message 5 of 10
(3,138 Views)

@P Anand wrote:

Please post in 2009 version.


Here's the important part.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 10
(3,135 Views)

I don't see where your timer is of any use.  You are trying to get the elaspsed time's ms only when the loop is taking a second.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 10
(3,132 Views)

I only posted what was important for my question. I am using the timer to be able to control a set of external relays on a % of time on basis. 

 

 

 

I am trying right now to rebuild the program with 2 separate while loops that only need to pass information to each other periodically.  Thus far this appears to be working and I will post my solution if I am successful.

0 Kudos
Message 8 of 10
(3,128 Views)

@crossrulz wrote:

@P Anand wrote:

Please post in 2009 version.


Here's the important part.

 


Thanks crossrulz for translating. 🙂 (crossrulz - your name?)

-----

The best solution is the one you find it by yourself
0 Kudos
Message 9 of 10
(3,122 Views)

Here was my eventual Solution. 

 

 

 

0 Kudos
Message 10 of 10
(3,108 Views)