12-28-2012 08:56 AM
Hello,
I am using labview 2011 and need to latch the data from two timer tasks of a 6602 board at the same time and then perform the read. One task is a period measurement the other is a two edge speration. It sounds pretty simple and I am sure it is, I just haven't located the correct information yet, If someone would point point me in the correct direction.
Thanks,
Mike
01-02-2013 11:39 AM - edited 01-02-2013 11:40 AM
Hi Mike,
Depending on how tight you need your synchronization to be, you can achieve it either in software or hardware.
Software timing involves starting the two tasks at the same time (using a flat sequence structure). However, this will introduce a lot of variability and time delay between the two starts, which depends on the operating system.
The other solution, which provides much stricter synchronization, is to use hardware timing. For the latter you will need to use a trigger to arm and start the counters. This example would be a great place to start.
Hope this helps.
01-03-2013 08:27 AM
Great I was looking into the hardware trigger but then thought I couldn't be done. This is what I am looking for and will give it a try. I will update this post once I try it.
Regards,
M
01-03-2013 02:58 PM
While it's true that a digital edge arm start trigger can help to sync the tasks to begin together, the nature of the measurements you're making also have a big impact on whether you can depend on the buffered data remaining "synced." Both measurement types will latch measurement data at times determined by the signal(s) being characterized. You cannot configure either task type to sample at a known constant rate. You can only accept samples at the rate dictated by the signals' own edges.
Ok, so having said all that, here are some implications:
1. a cumulative sum of all your period data will effectively give you timestamps for all the active edges, with t=0 set by the arm start trigger edge.
2. there is no information inherent in a two edge separation measurement that can identify the time relative to the arm start trigger. You'll get a bunch of measured interval times with completely unknown times between those intervals
3. caveat: if you are somehow using the same signal edge for both measurements AND getting one measurement of two-edge separation for each and every period measurement, ONLY then would you be able to reconstruct the timestamps relative to the arm start trigger edge.
So I'd caution you that the idea of latching readings in sync or reconstructing relative edge times between the measurements is pretty unlikely to work except under some very specific circumstances.
-Kevin P
01-03-2013 04:15 PM
Understood Thanks. The simplest why to look at two pulse streams is that can is used to determine RPM and the other is phase measurment between two other pulse streams. The frequency of all these singals is much greater than the sampling rate, which we will say is 1 sample second for this example. On the interval I want to trigger and latch the values of both at the same point in time. This will then repeat until I get to a predetermined RPM at which the test is complete.
M