08-04-2021 06:23 AM
Hello,
I am designing an experiment that will gather load cell force data (one analog input) and linear stage encoder position data (one digital input to be counted) at the same time, and the aim is to write this to a file such that I have force & position sync'd with respect to time during the experiment.
I have identified the hardware set-up shown in the attached image as a potential option, where the whole experiment is computer-based control through Labview. The aim is for the NI USB 6211 Multifunction I/O to acquire both analog and digital data and send this to Labview through USB https://www.ni.com/pdf/manuals/375195d.pdf .
My specific questions are:
- Can the USB 6211 acquire both analog and digital data simultaneously? I am mislead by the fact that the 6211 does not support 'simultaneous sampling' - but this seems to be only for analog inputs due to number of ADC's? Other models such as the USB 6346 offer this 'simultaneous sampling' https://www.ni.com/pdf/manuals/377316d.pdf . Would this lack of 'simultaneous sampling' feature limit our data acquisition in this application?
- Would we therefore need this kind of multiplex sampling approach to switch between the analog and digital inputs during sampling, and if so how quickly can this be done? We only need a very low acquisition rate of both analog and digital data in the 100Hz region.
- Would the data be synchronised with respect to time in the USB 6211 hardware before it reaches the laptop? Would hardware sync be preferable to software sync?
I am also aware that there are cDAQ modules specifically for encoder counting and load cell strain bridge completion, but the multi I/O option, if at all possible, seems more affordable.
I apologise in advance for any arrogance in my approach, and any advice would be appreciated.
Thanks, Lewis
Solved! Go to Solution.
08-04-2021 11:26 AM
Specific answers:
- yes, a USB-6211 can acquire analog and encoder data simultaneously. You will not need "simultaneous sampling" for your app, especially considering that you have only 1 analog channel to acquire.
- no, you won't need to "switch back and forth" between analog and encoder acquisition. You'll have separate tasks for each that will run simultaneously and the DAQmx driver will manage most of the dirty work of delivering the data to your PC. You'll simply retrieve the data with calls to DAQmx Read.
- yes, the data can be sync'ed in hardware and that'll *definitely* be better than relying on software-based timing or sync methods.
There's been a lot of discussions on this site about sync'ing data acq tasks and I've been in several of them. Here's one that includes a code snippet illustrating key points about syncing a counter input task with an analog input task. There are other examples around too if you include "sync" or "synchronization" in your search.
-Kevin P
08-10-2021 06:40 AM
Thanks for your reply Kevin.
Since posting I have read another forum post about acquiring load cell data through a USB 6218 multifunction I/O - https://forums.ni.com/t5/Multifunction-DAQ/NI-USB-6218-and-Load-Cell/m-p/3969297?profile.language=en...
An NI employee replied saying 'you will want to use different hardware' to take load cell measurements. Is that a case of other hardware (cDAQ modules) being more accurate/better or is that a case of the multifunction I/Os being unsuitable for load cell measurement? For my application I assumed as long as the load cell amplifier voltage output is compatible with the USB 6211 analog input (and can sample quickly enough) I could send the load cell data into Labview via the multifunction I/O - but the above linked forum post has me doubting whether this is all I need to consider when reading a load cell through a multi I/O.
Maybe you can clarify this for me (or I can reply to that forum post directly if you cannot answer)?
Regards,
Lewis
08-10-2021 07:04 AM
The thread you linked seemed to be talking about a bare load cell with no conditioner / amplifier. That's why the NI employee recommended the use of a special-purpose bridge module that generates a precise excitation and uses a more capable 24-bit A/D converter for the tiny voltage difference at the bridge outputs.
Since you have an external amplifier for your load cell, you'll almost certainly be fine with your regular 16-bit 6218, just as you were figuring initially.
-Kevin P