Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

PFI digital trigger on a cDAQ 9188

Solved!
Go to solution

I am using a Campell data logger to send a 5mV pulse to my daq to trigger logging of some accelerometers. I would also like the code to cease aquisition when another pulse is sent, currently the code has a predefined sampling time how would I change this.

 

Many thanks

0 Kudos
Message 1 of 10
(3,856 Views)

I just wanted to add how would I set it so that the logging would stop when another digital pulse is sent?

0 Kudos
Message 2 of 10
(3,852 Views)

Hi echelon101,

 

Are you able to trigger your device successfully to start acquisition from the 5mV signal?

Assuming that you can then there are a couple of examples that you can use to implement this.  The first is here (DAQmx Stop Trigger) which shows you that you can use a "Reference Trigger" to stop acquisition.  The VI continuously acquiring samples until the trigger occurs.

The second is here (Start Trigger and Stop After n Pulses for Continuous Analog Input with DAQmx) which shows using both a "Start" and "Reference" trigger in the same task.  You can use the same source and edge for both triggers which should perform the resired action for you.

 

Please let me know how you get on.

 

Best regards,

Ali Bailey

National Instruments

Best regards,
Ali Bailey
National Instruments

----------------------------------

Don't forget to Kudos useful posts!
0 Kudos
Message 3 of 10
(3,840 Views)

Ali, I have emailed support and someone is looking into it.

 

The issues are that:

- I want to visualise the continuously stream data

- I want to be able to carry on sampling forever if the stop signal is not received.

 

I was given this as a comparison

NI-DAQmx: Continuous Analog Input with Both Start and Reference (Stop)
Triggers
http://zone.ni.com/devzone/cda/epd/p/id/908
0 Kudos
Message 4 of 10
(3,837 Views)

Hi echelon101,

 

Who are you speaking to in support?

From that example I can see that that implements exactly what I was thinking.  There are a couple of small differences but it is the same in essence.

Are those issues that you mention issues with the example or with your current code?

With the example you could change the display to a chart to show the historical data too and it will continuously run, I just tested it.

 

Best regards,

Ali Bailey

National Instruments

Best regards,
Ali Bailey
National Instruments

----------------------------------

Don't forget to Kudos useful posts!
0 Kudos
Message 5 of 10
(3,834 Views)

James Sullivan, he is  "having a play with some of our DAQ hardware to explore the different options there are for achieving what you are after. I will let you know once I have explored them and we can see which we think will be most appropriate." Which is fair enough.

 

 

I'll look in to it tomorrow then update.

0 Kudos
Message 6 of 10
(3,828 Views)

Have you had any success at all?

 

Thanks,

 

Ali Bailey

National Instruments

Best regards,
Ali Bailey
National Instruments

----------------------------------

Don't forget to Kudos useful posts!
0 Kudos
Message 7 of 10
(3,814 Views)

I have not had a chance to get on the Daq since I am now at my construction site. James is still help though.

0 Kudos
Message 8 of 10
(3,806 Views)

This was the vi created which worked

0 Kudos
Message 9 of 10
(3,778 Views)
Solution
Accepted by topic author echelon101

I am glad it worked.  Did you not get on with the other examples?

There is a slight difference between the initial ones and this one. The one you have just posted checks for the stop trigger in software rather than in hardware so you will be limited to checking the digital line at the same time as you take more analog samples.  If that works for you though then that is fine.

One thing I would recommend is a stop button so you can stop the loop if you need to without having to abort the program.  It will make sure that you clear resources etc.

 

Best regards,
Ali Bailey
National Instruments

----------------------------------

Don't forget to Kudos useful posts!
0 Kudos
Message 10 of 10
(3,775 Views)