From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

block size / real time

Solved!
Go to solution

Hi,

 

I know that some of you have already had this type of problem, and I've tried to solve mine with your solutions but it did'nt work yet... My problem is the follower : I need to stop the acquisition with a pre-definied global variable. At the beginning of the program you have to choose the acquisition time (in second), thanks to the action module. Then, measurement starts, and when the program notice a variation of the input (definied), it begins to write the values in a folder and register datas.

 

After the relay module, I put a Time-based module and choose "measurement time in second". The statistic module pick up the max and min and then I do a substraction (max-min) to have the real time of acquisition (which start thanks to the combi-trigger). I use the formula In(0) > global variable (pre-definied) and then, an action which stop the measurement when the global variable (acquisition time) is exceed.

 

I want to have 2sec of acquisition time, but the routine often stops around 2.047s but it's not precise enough (with auto-block size (512) at 1000Hz)... So, I've tried to change the time bases to block size = 1 and sample rate = 1000 (for all : driver, dasylab and the capture card). But now, the acquisition time doesn't seem to match with the real time...!

 

For more informations, I use :

USB 1608G (MCC-DRV)

Dasylab 12 (evaluation version).

 

If you have an idea of what I have to do... A precision of 1ms would be great (like a block size of 1 with sample rate of 1000Hz...)

 

I joined the worsheeet below for a better understanding.

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

To simplify... I need to acquire data only for 10sec (for example). So, I use the Time Base module "time measurement in second" but with a sampling rate of 1000Hz and a block size of 1 it don't seems I register seconds... But maybe numbers of blocks...?

 

I'm confused because it looks too simple...!

0 Kudos
Message 2 of 3
(6,001 Views)
Solution
Accepted by topic author M.Charbonneau

If it could serve to others... I found (fortunately ^^) the solution !

 

I used the time base module, I've chosen "time of day" and then, I put the statistic module "Statistical values" and I take the max, the min. After this, I put an Arithmetic module and do "max - min".

 

I hope that's ok, but it's look like the good way to find what I was looking for...

 

 

0 Kudos
Message 3 of 3
(5,997 Views)