LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

4472 DSA and 6601 counter

Hello:
 
I'm using NI 4472 DSA card and NI 6601 counter on PCI slots for digital tacho processing. I collect analog data through 4472 and I need to sample these data based on encoder pulses I receive from the rotating shaft. In fact, I'm using Order Analysis Toolkit and I need to divide the signal based on equal angle.
 
I tried to configure "OAT Even Angle Signal Processing" VI for digital tacho, having no luck so far. The example is written for PXI slot and I do not know how to synchronize these two data acquisition systems together.
 
Does anybody have any example code I can use?
 
My system is as follows:
 
Labview 7.1 on XP
OAT 2.1
NI 4472 DSA and NI6601 counter/timer
Collecting two displacement signls via 4472 analog channels, and one-pulse/rev is connected to 6601.
 
Thanks a lot.
Vipul.
0 Kudos
Message 1 of 6
(4,548 Views)
Hello Vipul,

It sounds like your application may be similar to the LabVIEW example Even Angle Reference Signal Processing (Digital Tacho, DAQmx).vi.  Have you taken a look at this example?  I would recommend that you start here.  This will at least give you an idea of how to program the DAQmx analog input and counter tasks and also use the OAT functions.  There are also a number of other examples that incorporate various functionality. 

I hope this information helps!

Best regards,
0 Kudos
Message 2 of 6
(4,535 Views)

Hi Jarrod:

Well, as I have said in my posting that it is very similar to your examples, except that my cards are on PCI slots. It changes all the synchronization and rest of the process. So I was wondering whether I could find examples written for digital tacho, but for PCI slot.

Thanks.

Vipul.

0 Kudos
Message 3 of 6
(4,532 Views)
Hello Vipul,

You are correct that the example program is written specifically for a PXI-based system.  This is because the method it uses to synchronize the analog input and event counting tasks is to route the Sample Clock Timebase from the DSA board to the counter board over a PXI Star line.  This ensures synchronous samples.  Then, the AI Start Trigger is routed from the DSA board to the counter board and used as the Arm Start Trigger for the counter.  This ensures a simultaneous start. 

In many cases synchronization is essentially the same whether you are using PXI or PCI.  A RTSI cable between two PCI cards serves the same purpose as the PXI Trigger lines on the backplane of your PXI chassis.  However, this example would have to be modified slightly to use with PCI-based hardware.  The reason for this is that the Sample Clock Timebase cannot be routed to a RTSI line.  Instead of exporting the Sample Clock Timebase, we would have to use a slightly different synchronization method.

What we can do is export the AI Sample Clock signal to a RTSI line, and then use that RTSI line as the source for our counter gate input.  Because the AI Sample Clock signal does not start until the analog input task is started, we do not have to use a trigger to enforce a simultaneous start for our two tasks.  While I could not find an example program that directly demonstrates how to program this exact application, I can point you to one that is similar.

The following example shows how to synchronize analog input on a DSA device with pulse train generation on a counter board.  Even though this is not directly what you are looking for, it demonstrates how to use the AI Sample Clock method to synchronize the tasks.  Using this approach, you could then modify the LabVIEW shipping example to do the same thing. 

Synchronizing a DSA Device with a Pulse Generation

I hope this helps!

Best regards,
0 Kudos
Message 4 of 6
(4,520 Views)
Hello,

I recently started a similar thread on the Dynamic Signal Acquisition board here.  I was referred to your messages.  I'm trying to sample analog voltage from accelerometers simultaneously with an angular encoder signal.  It seems very similar to your application Vipul, except I want to sample both signals at a fixed rate.  However, I'm not having much luck.  I'm sampling the accelerometers from a PXI-4472 in the master slot: Dev 2, and the encoder is sampled with a PXI-6602 in slot 5.

I worked with the Synchronizing a DSA Device with a Pulse Generation link that Jarrod provided and modified it to collect encoder readings rather than generate a pulse train.  However, I'm not confident that it is working correctly.  I have posted some sample code on my website:

http://rclsgi.eng.ohio-state.edu/~ericson.15/PLANETARY/LabView%20Code/PXI-4472%20and%206602%20Sync%2...

There are three VIs.

The second program, Synchronize DSA (4472) with Encoder (6602) Samples.vi was built from modifying the sample code Jarrod identified.  The metric I used to see if samples were being acquired simultaneously was to set the "Samples per Channel" for the encoder to "-1" and see if I get the same value as I predetermined for the accelerometers (DSA device).  I get close to the correct number of samples on the encoder each while loop iteration, but not exactly.  (I don't know if this is a valid metric to confirm simultaneous sampling.)

In the third program, Troubleshoot Synchronize DSA (4472) with Encoder (6602) Samples.vi, I tried to determine when samples were starting and stopping.  I also divided out the error path thinking that I didn't want the counter path waiting for the DSA error signal inside the while loop.  Playing with this program seemed to indicate things were not triggering and sampling at the same time.  I also noticed that the time between the stamp at the beginning of my DSA waveform to the time stamp at the end of the while loop iteration was LESS than the sampling ffrequency divided by the number of samples.  How can this be?

So the first program, DSA PXI-4472 Sample Only.vi only contains data acquisition from the DSA device.  Sure enough, I sample at 25,000 Hz for 1000 samples.  This should take 0.04 sec (or more I suppose).  But it seems like this operation is taking place in les than that: 0.0312 in the case of the saved defult value.

Now I'm even more confused.  Not only am I not sure that my sampling is synchronized (timing and triggering), but it seems as though I'm sampling faster than I perscribe.  Any advice?

Note: I also read the page "Can I Synchronize a DSA Device with Other NI Hardware?" found here. It seems like this is exactly what I want to do.  Number 4 "NI PXI-4472 with the NI 6602/6608" says:
"As with the DAQ-STC counter described above, you can feed the PXI star line to a National Instruments TIO counter as a source. An external digital tachometer signal can then be sent to the gate of the same counter."
I don't understand really what that means, how to do it, or maybe if I'm already doing it in my code.

If you can help, thanks a lot!
Tristan Ericson

Ohio State University Mechanical Engineering
Dynamics and Vibrations
201 West 19th Ave Suite N350
Columbus, OH 43210-1142

Office: 614-292-9029
Lab: 614-247-8077
Fax: 614-292-3163

"No one is useless in this world who lightens the burden of another." - Charles Dickens
0 Kudos
Message 5 of 6
(4,288 Views)

Hi Tristan,

I saw your original post on the DSA thread.  I am reviewing the issues you are experiencing.  I would like to test this out in hardware to see if I experience the same issues.  I will contact you with my results.

Regards,

Ima
Applications Engineer
National Instruments
LabVIEW Introduction Course - Six Hours
Getting Started with NI-DAQmx
0 Kudos
Message 6 of 6
(4,247 Views)