Hopefully someone can help me!
My setup is:
3 of 6602 PCI counter cards
Labview 7.1
1 RTSI cable
4 External TTL signals, variable upto 4Khz (2 on 'Dev1', 2 on 'Dev2') All on gate connections
1 External TTL ‘base’ signal, variable upto 450Khz on gate0 of ‘Dev1’
1 External Trigger signal on Sorce2 ‘Dev3’
I have been trying to write a vi to calculate phase shift between the 4 TTL signals with reference to the ‘base’ signal without much success.
The 4 TTL signals above are proportional to the ‘base’ signal, but do have slight phase shift between each other and with respect to the ‘base’ signal, which is what I want to calculate. The trigger signal is used to start the samples simultaneously.
Initially I tried to sample the frequency of all five channels and then calculate the error – no joy. I now believe the best way to do this is to count the number of edges on the base signal that occur for every ‘period’ on each of the gate signals. i.e. to end up with an array of 4 columns with 30 rows each with a number of ‘base’ edge counts. I can then calculate the positive or negative shift.
I have used four counter tasks to try to achieve this but can’t get it working. The trouble is that Labview gives me an error that the counter is already reserved (I believe from the first task). I have tried to use the ‘DAQmx export signal’ vi to export the ‘base’ clock of gate0 Dev1 to a RTSI line to make the signal available to all counters, again with no joy. Please see attached snippet.
Is it possible to do this, and if so is this the best way to achieve what I’m trying to do?
Any help and suggestions would be greatly appreciated!!!!!
Many thanks in advance.