LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Timestamp from Multiple Devices

I am using LV 8.0 with the Compact DAQ Chassis and NI 6221 (for the encoder input – because the C DAQ system currently does not have any modules for quadrature counter input). I have modules NI 9205 and 9237. I will be doing multiple measurements at the same time (but not simultaneously). The test will last roughly 30 seconds, and in that time frame I will be receiving signals from:

1) Encoder (for angular position and RPM) (NI 6221 ctr input)
2) Load Cells, Torque Sensor, (NI 9237)
3) Multiple pressure transducers (NI 9205)

I would like all these modules to operate concurrently, but not be slowed down by other modules (Continuous buffered acquisition?). What would be the best way to record and save the data to file with some kind of timestamp, so that I know at x degrees (using the NI 6221) the force on the load cell was y (using NI 9237)?

I have tried using the express data acquisition VI but it doesn’t allow me to use two different cards. And if I have two different express VI’s, all my data is saved in two different files, but I have no idea which data point in one file corresponds to which data point in another file in time.

Example: I look at the encoder file, and see that at 0.5 seconds the angle was 30 degrees. If I knew the time at which each data point was taken, I could do some easy interpolation of the force file to figure out what the force should have been at time 0.5…

Relative Time                          Force

0.42                                              27
0.50                                              ???
0.61                                        30

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

Hi Johnny,

Since you do not need your measurements to be simultaneous, you can use two DAQ Assistants - one for each device.  You can then use merge signals as shown in the below picture and save them to file using Write to Measurement File Express VI.  The header of the file that is created will tell you the intial timestamp and delta t for each data set, so you will know the timing information. 

I think this is the simplest solution to what you are trying to do.  Let us know if there is something about it that doesn't work out for you.

Regards,
Laura

Message Edited by Laura F. on 08-01-2006 03:43 PM

0 Kudos
Message 2 of 6
(3,329 Views)
Hi Johnny,

I'm curious - what kind of quadrature encoder are you using?  Would your measurement be possible with an NI 9401 in slot 5 or 6 of your CompactDAQ chassis (which exposes some counter functionality)?

It is possible to physically synchronize the CompactDAQ system and the NI 6221 if you need to, though the solution above is much simpler if that provides enough information for your measurements.

Regards,

Kyle
National Instruments
0 Kudos
Message 3 of 6
(3,321 Views)
Thanks Laura and Kyle for your help. I will try the merge signals approach, as this seems to be quite easy. If that does not work, I will have to ask how I would physically syncronize the two cards. As far as the NI 9401 goes, I did purchase it exactly for this reason (the encoder counter input). But foolishly, once it arrived, I tried hooking it up, and looking at the user manual (which I should have done before I purchased it) I found that this does not have a counter input. I called NI, and they confirmed this up until a month ago. Maybe things have changed now, is there a counter upgrade for this module or is there a module for the CDAQ system that supports my AB & Z index encoder??
0 Kudos
Message 4 of 6
(3,316 Views)

Hi Johnny,

Kyle brings up a great point - you can use the 9401 in slot 5 or 6 of your cDAQ chassis to gain access to the counters.  The counters have the same functionality of those on your M Series device, and do support quadrature encoder tasks.  I simulated your hardware and created a task and attached a picture.

Regards,
Laura

0 Kudos
Message 5 of 6
(3,313 Views)
Johnny,

The key is that the counters are on the chassis.  The cDAQ-9172 user guide (http://www.ni.com/pdf/manuals/371747b.pdf) discusses their functionality, which is the same as the M Series.  The PFI lines that allow you to route signals (from your quadrature encoder, for example) into the counters, are accessible in slots 5 and 6.  To synchronize the two devices, you would route a timing signal between the devices using those same PFI lines in slots 5 and 6 on the CompactDAQ chassis, and the PFI lines on the 6221.

Regards,
Kyle
National Instruments
0 Kudos
Message 6 of 6
(3,306 Views)