I have the LabVIEW Basics self paced learning kit and am working through the examples etc.
Exercise 7.6 Simple Event Counting seems straight forward enough and using the Signal Accessory I can get the quadrature encoder to be counted using the DAQ assistant. Turning the knob on the encoder in either direction then increases the displayed "count". A further part of the exercise has the properties of the DAQ chaged in order to have the count direction externally controlled. This, apparently without any further changes, enable the encoder to increase counting clockwise and decrease anti-clockwise. However it does not work in my application - it simply goes down much in the same way as if I had chosen "count down".
I am using the pci 6229 m series card and notice that on the Signal Accessory mention is made to E series devices. Does the LabVIEW basics course documentation hold for m series cards? Am I doing some really silly? Does my card nee checking?
If the answer is yes than why does the example always count down regardless of the direction I turn the encoder when the Basics course documentation says it will count down one way and up the other? Has the documentation missed something fundamental out? Or have I?
I believe the documentation is missing something. On E Series devices, the hardware-controlled up/down pin is DIO6 for counter 0. The MIO demo box has one of the quadrature encoder lines connected to this input internally (there is no external connection for this). On M Series devices, the hardware-controlled up/down can be selected as any PFI line which, although it means the M Series devices have more functionality than E Series devices, unfortunately means it won't work exact the same was as described in that example for E Series devices. I haven't tried it yet, but you should be able to select the source of your count direction terminal (using the channel property node->Counter Input->Count Edges->Count Direction->Terminal) and then wire to one of the other inputs in the Demo Box.
Many thanks for your reply and for verifying that there is a problem with the documentation. Your description as to how to get round the problem was understandable but unfortunately the DAQ assistant does not seem up to it (see below).
There are two problems I have found with all this.
1) As discussed the documentation AND signal accessory device both refer to E series cards. The example is not brilliant even for E series cards because it relies on internal connections which present the solution as somewhat ready-made. This is particularly a problem when using DAQ assistant (see problem 2)
2) The example I was working through on the Basics course used the DAQ assistant. When setting up the counting in the "Edge Count Setup" the count direction can be set to "externally controlled", however there is nowhere to tell it WHERE this external control is. This seems plainly wrong.
Given that I cannot specify where the external control is from the DAQ assistant do I need, to get this example working, to ditch the DAQ assistant approach altogether? If so the current example is worthless! In this case what would I need to do it from scratch?
Using the "Count Digital Events - Pause.vi" I have worked out that the DAQmx create channel.vi can be adapted to include CI.CountEdges.DirTerm (being the terminal where direction is given)in the DAQmx channel property node. This will mean I'll have to create my own DAQmx create channel.vi in order to put in the terminal name. Is this the right way to go about it? Is the DAQ assistant of no use with this example and the M series pci 6229 card?