Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change while loop exicution time to microsecond

I am using hytek daq www.hytekautomation.com/Products/IUSBDAQ.html .i need to measur eangular position using counter.

my problem is I am uable to get count accurately.

2.Time Difference between the rising edge and falling edge of the counter input is 0.2 milli second.

 

But iam gatting at 16ms time difference.

 

My question is how to reduce the accusition time to us.

 

Regards,

R.Karthick

 

 

0 Kudos
Message 1 of 6
(3,967 Views)

The 16 milliseconds is probably the OS timing.

 

From a quick glance at the manual for that device, it appears that reading the counter and reading the digital I/O lines are done under software timing. That means that each counter read or each digital port read requires a separate call to the subVI and then to the .dll which actually communicates with the device.  The .dll calls pass through the OS and will thus be limited by how fast the OS will respond.

 

What kind of transducer are you using to generate your angular position signals? You might be able to use the streaming analog input capability of the device to capture all the transitions in your signal.  You may not get updates more often than 16 ms, but all the transitiosn will be in the data.

 

Lynn

0 Kudos
Message 2 of 6
(3,961 Views)

Thanks for your reply sir,

 

Iam using manually made ir counter for generating 20 pulse per revelution. I record data using write measurement file in that i am getting 20,40,60.

but i need 1234567890,123456789.

 

i tryied a lot but i didnt get output. so i had generated a data usind increment and shif register. my problem is in ploting graph. please see the attached file.

 

Regards karthick.

0 Kudos
Message 3 of 6
(3,915 Views)

I do not have any way to generate data like you have so it is hard to determine what might be wrong. Your diagram is large and has many bends in the wires making it difficult to interpret.

 

The shift register carrying a Double (near the top of the while loop) never changes.  Nothing is ever written to it inside the loop, so it always is zero.  Is that what you intended?

 

Your PV graph simulation is driven by two sine waves of varying amplitudes.  Each time it plots you will get a straight line. The slope will change based on the ratio of the amplitudes.  But this will never produce a graph like the one you "need".

 

The comparisons and chained Select functions take up a lot of Block Diagram space and are hard to read.  An array of limits, Search 1D Array, and a case structure can simplify the code.  This example does not work exactly like the original because you have one >= comparison, but it may give you some ideas.

 

Lynn

0 Kudos
Message 4 of 6
(3,907 Views)

Thanks For your reply sir,

 

 

I newer to labvieww thats y i finding difficult to simplyfy graph.

 

 

Sir your file is not opening it shows genric error.

i sm useing labview 2009

0 Kudos
Message 5 of 6
(3,897 Views)

This should be a 2009 version.  I do not have 2009 on this computer so I have not checked it.

 

Lynn

0 Kudos
Message 6 of 6
(3,892 Views)