Jump to content

Complex Analog triggering


Phil Duncan

Recommended Posts

Hi all,

I have a tricky DAQmx problem, at least I think it's tricky (it is getting rather late). I need to acquire analog (voltage) data from 16 channels. The start trigger for the acquisition needs to be either an analog rising edge or falling edge on ANY of the 16 channels.

I am currently using a simulated M series PCI 6250 to try this out but I can't seem to set up the triggering. It seems that a DAQmx task can only have one single trigger. I could try to set up 16 tasks, each with their own trigger then try to acquire data on all tasks if any task triggers but this seems ludicrous.

Has anyone dealt with this issue before?

Oh and to really complicate things, the acquisition duration is around 30ms, so around 20kS/s/channel minimum and the input voltage range is 0V-14V (I know the 6250 is only +/- 10V I am just using it for prototyping a concept). So if anyone can recommend suitable DAQ hardware I am willing to listen, the only option I have found that allows >10V is an SCXI 1104.

Cheers & Beers

:thumbup: :beer:

Link to comment

QUOTE (Phil Duncan @ Oct 23 2008, 11:37 AM)

The start trigger for the acquisition needs to be either an analog rising edge or falling edge on ANY of the 16 channels.

There probably is a way to do it on the card, but I'd be looking at a hardware-based circular buffer and handle the triggering in software. It's some work, but it'll do the trick. If you're not tied to the hardware that you've got, I'd do this in FPGA (or, a combination of FPGA for the triggering and the DAQ card that you've got for the acquisition).

Link to comment

QUOTE (Phil Duncan @ Oct 23 2008, 08:37 AM)

Oh and to really complicate things, the acquisition duration is around 30ms, so around 20kS/s/channel minimum and the input voltage range is 0V-14V (I know the 6250 is only +/- 10V I am just using it for prototyping a concept).

You could use a voltage divider to step down 0-14V to 0-10V.

N.

Link to comment

QUOTE (crelf @ Oct 23 2008, 10:55 AM)

There probably is a way to do it on the card, but I'd be looking at a hardware-based circular buffer and handle the triggering in software. It's some work, but it'll do the trick. If you're not tied to the hardware that you've got, I'd do this in FPGA (or, a combination of FPGA for the triggering and the DAQ card that you've got for the acquisition).

I agree. The Reconfigurable I/O (RIO) R series cards are designed for exactly this type of application. It just happens that they have an FPGA on the card and you use LV FPGA to define the behaviour of your reconfigurable I/O device.

The analog input range is still +/- 10V on the card. You also have the option to add C series signal conditioning modules on the front end of an R series card. The 9221 C series module provides 8 channels of +/- 60V at 12-bit resolution.

Link to comment

QUOTE (LV_FPGA_SE @ Oct 23 2008, 01:21 PM)

I agree. The Reconfigurable I/O (RIO) R series cards are designed for exactly this type of application. It just happens that they have an FPGA on the card and you use LV FPGA to define the behaviour of your reconfigurable I/O device.

Right - you could even have the R series card be like a trigger handler, and control any number of parallel DAQ cards with it (either through the star trigger/RTSI if you're using PXI or RTSI cables) or as direct wiring from the R series card to the PFI trigger lines of the slave cards.

Link to comment

QUOTE (Phil Duncan @ Oct 23 2008, 08:37 AM)

The start trigger for the acquisition needs to be either an analog rising edge or falling edge on ANY of the 16 channels.

I am currently using a simulated M series PCI 6250 to try this out but I can't seem to set up the triggering. It seems that a DAQmx task can only have one single trigger. I could try to set up 16 tasks, each with their own trigger then try to acquire data on all tasks if any task triggers but this seems ludicrous.

Setting up 16 different tasks will not work, as there is only one circuit for the analog trigger. As others have said, you can acquire continuously and perform the "triggering" in software. Our product (a gunshot detection system) has been doing this with NI-DAQ since 1995 and it works fine. You should have no problem with 20kS/s.

I would recommend that you learn about the property nodes of DAQmx Read. The Read system is very flexible and powerful, and rather than writing a circular buffer, allows you to use the built-in circular buffer that is DAQmx. You keep reading all of your channels to detect the trigger condition, and when you have found it, call DAQmx Read with the desired range of samples, and you will get all the data in one coherent chunk. You can also do things like having maybe a 30ms window to look for trigger conditions, but grab that window size every 1msec, so that you don't have to worry about extra code to handle events which straddle the boundary of two successive reads.

Link to comment

QUOTE

I would recommend that you learn about the property nodes of DAQmx Read. The Read system is very flexible and powerful, and rather than writing a circular buffer, allows you to use the built-in circular buffer that is DAQmx. You keep reading all of your channels to detect the trigger condition, and when you have found it, call DAQmx Read with the desired range of samples, and you will get all the data in one coherent chunk. You can also do things like having maybe a 30ms window to look for trigger conditions, but grab that window size every 1msec, so that you don't have to worry about extra code to handle events which straddle the boundary of two successive reads.

Thanks folks for your advice, very useful as always. I have not locked into a hardware solution yet but I think that I will try the DAQmx read properties to continuously acquire and maintain 16 circular buffers and trigger in software. It won't be pretty but I think it is the best approach. Thanks once again for the great advice.

Cheers & Beers

:thumbup: :beer:

Link to comment

QUOTE (Phil Duncan @ Oct 23 2008, 07:34 PM)

Awesome - definately go for the R series FPGA card then.

QUOTE (Phil Duncan @ Oct 23 2008, 07:34 PM)

but I think that I will try the DAQmx read properties to continuously acquire and maintain 16 circular buffers and trigger in software. It won't be pretty but I think it is the best approach.

Yeah - shouldn't be too difficulat to set up, and will give you an idea of what you can get away with.

PS: will be in Melbourne in a couple of days for a week and then the Gold Coast for a week - looking forward to some good weather, great beer and a whole lotta eye candy...

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.