Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Daq 6008 & 6211 Counting

Solved!
Go to solution

Hi all.

 

I'm working with an application that is counting pulses from a renco hollow shaft encoder to measure the distance traveled on a single axis platform actuated by a ballscrew and controlled by a stepper motor. The encoder is mounted to the opposite end of the motor directly to the ballscrew.

 

This said encoder has 100 pulses per revolution and at the moment im using only 1 channel on its output to do the counting. I'm using the single counter channel on a DAQ 6008 to do the actual counting.

 

Here's my problem.

 

When i run the motor at a moderate speed and measure the pulse count from one full travel on the axis I get 8200 pulses. If i reverse the motor now and bring it back at the same speed, the return full travel will give the same 8200 pulses which is exactly what I want. However, if i run the motor at extremely slow speeds the same 8200 pulses will equate to only 3 quarters of the travel on the same axis.

 

My assumption is that at the higher speeds the DAQ 6008 is missing a large number of counts. Am I correct in this assumption?.  I will soon have access to a DAQ 6211. Will this provide a more reliable counting device??.

 

Thanks in advance guys. I would really appreciate some input.

0 Kudos
Message 1 of 12
(7,621 Views)

Hi Banjo_B,

 

The max input frequency of that counter channel is 5MHz, so I doubt you are maxing out the input in that respect. However, it may be that you wiring and/or sensor is presenting a distorted input at that speed, or that the on period of the signal is too low. The specs say 100ns min for low and high time. The spec sheet is included in the manual here: http://www.ni.com/pdf/manuals/371303m.pdf

 

The 6211 has a maximum input frequency of 20MHz I believe, so this may give a better result, but you should be okay with the 6008. I would suggest viewing the waveform at different speeds on an oscilloscope.

 

Hope this helps.

 

 

0 Kudos
Message 2 of 12
(7,607 Views)
Solution
Accepted by topic author Banjo_B

It's just as likely (if not more so) that you are picking up extra counts at the slower speed--you can confirm pretty easily by calculating how many pulses should be issued when moving the platform the desired distance.

 

The signal coming directly from a quadrature encoder can be quite noisy.  The 6008 is only capable of simple edge counting, so any noise on a rising edge could lead to the edge being counted multiple times.

 

 

The 6211 supports a specific Linear Encoder channel type, which configures the counter to use both A and B signals from the encoder.  In this mode, the counter requires alternating edges of A and B to continue incrementing, meaning a noisy transition will still only be picked up as one edge.  

 

In case you don't have access to both A and B signals (or if the encoder is especially noisy for some reason and produces false edges in the middle of a high/low time), the 6211 also supports PFI filters (pdf link to user manual).

 

 

Best Regards,

John Passiak
0 Kudos
Message 3 of 12
(7,597 Views)

Thanks for the replies guys.

 

i wasnt aware that the 6008 had a 5Mhz clock so my assumption was definately incorrect.

 

Ive since got my hands on the 6211 and tried out the  linear encoder counting option. This seems to be doing exactly what I want even at low speeds. Im using channels A & B so it gives me even more positional control.

 

I really appreciate both of your input.

 

Kind Regards,

 

Paul.

0 Kudos
Message 4 of 12
(7,591 Views)

Hello again.

 

I've been so happy with the linear encoder option on the daq  6211 I decided to add another encoder elsewhere in the system to a different axis. 

 

My problem now is that I cant get both encoders to work at the same time on the daq 6211 while sharing the 5v and gnd on board supply. Im guessing that the power requirement for both encoders is exceeding that of the 5v on board supply.

 

I then tried to give each of them a separate 5v supply. One with the 6211 and the other from a daq 6008 5v supply. The one connected to the daq 6211 works perfect but the one recieving the daq 6008 5v supply gives spurious results making it seem as if theres a ton of noise 

distorting the signal. Ive even tried powering both the encoders with a separate usb device that has a 5v supply but both of the encoders give spurious resullts.

 

If i try each encoder individually powered by the daq 6211, they work perfectly.Would a separate 5v dedicated supply work for me here or do the encoders need to have the supply directly from the device thats counting, i.e. the daq 6211.

 

I'm really lost this time and I would really appreciate if anyone has any input on this matter. 

 

Thank you in advance.

 

 

0 Kudos
Message 5 of 12
(7,576 Views)

Banjo_B,

 

USB hosts will provide up to 500 mA at 5 V to the device. Depending on how much current the device itself uses, the remainder may be available fo external devices.

 

The USB-6008 specification says it can supply up to 200 mA to external components.  The 6221 specification says that it can provide 1 A at 5 V to external devices.  It derives its power from sources other than the USB connection.  How much current do your encoders require?

 

Do you have all the grounds connected properly?

 

Lynn

0 Kudos
Message 6 of 12
(7,570 Views)

I see you also posted in the Multifunction DAQ Board.  When you post the same question in more than one place, it is courteous to include a link to the other thread so that everyone responding can be aware of all the information about your problem.

 

Lynn

0 Kudos
Message 7 of 12
(7,566 Views)
Apologies for not linking this post. I'll do that right now.
With regards to a power supply. If I use say a dedicated 5v 1 amp supply to both encoders. Will the signal lines going to the 6211 push too much current to it and damage it or would the encoders draw as much current as they need and send normal ttl pulses to the DAQ.
My electrical knowledge is obviously not the greatest and I find it my biggest hurdle to overcome.
Here's a link to the encoder:
http://www.renco.com/fileadmin/files/Productinfo/RHS15Datasheet.pdf
0 Kudos
Message 8 of 12
(7,560 Views)

Banjo_B,

 

A 1 ampere power supply should be fine. Depending on which output interface your encoder has you will need either 75 mA or 135 mA per encoder.

 

The signal lines for  the 6008 will draw about 1 mA when low and essentially no ccurrent when high. I did not look up the 6211 input specs but they are probably no higher than for the 6008 and may be lower.

 

Make sure that the grounds on all the supllies and all the devices are connected together.  Do NOT connect the various 5 V lines together.  Theyare not exactly the same voltage and connecting them could cause damage.

 

The power supply for the 6211 should be able to supply the encoders.

 

I suspect that something is not connected correctly.

 

Lynn

0 Kudos
Message 9 of 12
(7,549 Views)

Attached is a picture of the basic wiring from the 2 encoders to the DAQ 6211. Apologies to the crudeness, I just have access to microsoft paint at the moment.

 

Also attached is the simple VI im using to read in both the encoders. 

 

Is there an error in the wiring?.

Download All
0 Kudos
Message 10 of 12
(7,545 Views)