08-30-2006 10:25 AM
08-31-2006 02:19 PM
08-31-2006 08:24 PM
09-01-2006
10:59 AM
- last edited on
11-25-2025
05:46 PM
by
Content Cleaner
Dinesh,
Thanks for pointing out the hardware timing on the DIO of the 6154. You are correct this board does have hardware timed digital lines. Most of our S Series boards do not and I must have missed that when I looked over the specs. Using the 6154 to do the digital input you should be able to synchronize all of these different tasks. There are several ways to synchronize a data acquisition between tasks. You can share the sample clock by specifying the same sample clock for each task. For example you can set the DI task to use the AI Sampel Clock from the the AI. However, this means that the digital task will operate at the same rate as the Analog. If you would like the digital task to operate at a different rate but still start at the same time you can use the AI Start Trigger from the analog task to trigger the DI acquisition. I would take a look at the Multi-Function-Synch AI-Read Dig Chan.vi example. It shows how to share the sample clock between the Analog Input and Digital input.
The same method could be used with the counter. However, the counter only has a 2 sample FIFO on the 6154 or 6143 and cannot be buffered at very high speeds. It can count pulses at a very high speed but it can not transfer the data from the onboard register to computer memory (this is done at each pulse of the sample clock).
I would also recommend taking a look at the following Developer Zone document:
https://www.ni.com/en/support/documentation/supplemental/21/m-series-synchronization-with-labview-an...
The document is focused toward M-Series boards but many of the concepts are exactly the same for the S-Series boards.
Hopefully I have been helpful in getting you started with your application. Let me know how it goes.
Regards,
Neil S.
02-20-2007 08:57 AM
02-26-2007
10:01 AM
- last edited on
11-25-2025
05:47 PM
by
Content Cleaner
UBAP,
Thanks for posting to the NI Forums. Typically both the PWM and edge counting tasks will use implicit timing. There are examples of both applications and to get the two to work together would be a matter of copying the contents of one example into the other. An example of continuous edge counting is shipped with the DAQmx driver. This example can be located by going to Help >> Find Examples, clicking the Browse tab, and navigating to Hardware Input and Output >> DAQmx >> Counter Measurements >> Count Digital Events. There is also an example of a PWM generator available on our website:
http://zone.ni.com/devzone/cda/epd/p/id/4812#0requirements
I would highly recommend taking a look at these two examples and incorporating them into your final program. In addition I noticed that in two of the figures above you used the ai/SampleClock but I don't see an Analog Input task in your code. Are there parts of your code that you do not show? Let me know if you have any additional questions.
Regards,
Neil S.
Applications Engineer
National Instruments
03-02-2007 08:04 AM
03-02-2007 08:53 AM - edited 03-02-2007 08:53 AM
Message Edited by UBAP on 03-02-2007 08:54 AM
03-05-2007 11:58 AM
03-05-2007 02:17 PM