I use measure buffered position (ni-TIO).vi to measure the position of 4X encoder with the source being connected to the gate specification. why there are positive and negetive values I get from the buffered data even the ratation is in the same direction?
Well, you should not get positive and negative values even when the rotation is in the same direction. You may want to double-check your signal connections. In this example, the counter increments or decrements its value based upon the values of the source and aux line. A signal on the selected gate transfers that value to memory upon every pulse that comes into its gate.
The documentation taht accompanies this example VI states to connect the encoder A signal to the source pin of the selected counter. Connect the encoder B signal to the aux line pin of the selected counter. If you are using Z indexing, then connect the encoder Z signal to the gate pin of the selected counter. Connect the data latching signal to the selected gate input of the counter.
Does this sound right? You should not be connecting the source to the gate as you specified in your post.
I did connect A, B and Z as what you said. And I used the source signal to be the data latching signal can connected the source not only to A but also to gata 2 which is PFI-30 for latching. Is there any other reason I can not get the right counting signal?
I am confused as to your wiring since you state the source of the counter is connected to the gate of another counter. Could you please list out all of your connections. Something like the following:
Encoder A -> Counter 0 Source Encoder B -> Counter 0 AUX Encoder Z -> Counter 0 Gate
This will help me fully understand how your signals are connected. By the way, which NI board are you using?
With the X4 encoder(1250/revolution), PCI6601 and Measure Buffered Position(NI-TIO).vi, I use the A also for data latching signal. so A- counter 0 source B- counter 0 aux Z- counter 0 gate A- counter 2 gate Then, I think I should get the counting like 0,4,8,12... Is it right?
Okay. This sounds fine. Except you can go ahead and disconnect the connection from A to CTR2 Gate.
Now, open the Measure Buffered Position (NI-TIO) example, configure the encoder type as X4 and, optionally, the Z channel indexing parameters. Your counter should be "0". Is this what you have previously done?
And now when you look in your buffer you see some negative data and some positive data?
hi, I connected A,B,Z and the gate specification as what we talked above. When I run the VI, there is error-10920 occurred at Counter Read Buffer, which said one or more data points may have been lost during buffered GPCTR operations due to speed limitations of your system. What dose this mean? Does the problem come from the configuration of 'number read' or 'backlog' in the 'measure buffered position.vi'? And would you please tell me how to solve it?