06-03-2008 05:09 AM
06-05-2008 03:09 AM - edited 06-05-2008 03:12 AM
Hello Steffan,
According to the following Knowledge Base you have cannot use the default settings wehn trying to externaly control the direction of the counter:
http://digital.ni.com/public.nsf/allkb/1A8818274130FA388625722E00760CC9?OpenDocument
Since these changes cannot be done in the DAQ assistant you have to use the DAQmx API to resolve this. I have attached a small example that does a simple event count on the source pin of counter 0 (which is also the A input of the counter). With a property node I have set the Counter Direction input terminal to PFI 1 (which is the B input). Now when the PFI 1 is low you will count up, when it is high you will count down.
hope this helps,
Regards,
RikP - National Instruments Applications Engineering
06-05-2008 05:55 AM
02-14-2013 04:24 AM
Hi!
I have a similar problem, perhaps with a somewhat different solution.
I am using the NI myDAQ and I need to keep track of a rotating disc, using a counter. The direction of the spin is also important so I would like to use the externally controlled direction counter.
I tried the example attached here, thinking that my problems would be solved.
Unfortionately, this was not the case.
My symptoms using the above example are: The only allowed counter direction is up.
If I change direction to down or external; no difference.
If I stop the GUI and restart it when "Externally" or "Count Down" are chosen Error -200077 is presented
(Possible reason(s):
Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: CI.CountEdges.Dir Requested Value: Count Down You Can Select: Count Up
Channel Name: myDAQ1/ctr0
Task Name: _unnamedTask<10>)
Any help to this matter will be much appreciated.
02-19-2013 03:44 AM
Hello sumosimon,
It is unfortunately not possible to specify the count direction externaly on the NI myDAQ. So, you will not be able to run this example.