From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Encoder interfaced with NI-9401

Solved!
Go to solution

I have purchased an encoder which has open collector and 3.3 Kohm pull-up resistor (TTL) as its logic output.

The encoder comes with four leads: +5V power, GND, Channel A and Channel B. Both Channel A and Channel B are logic output.

 

Channel A and Channel B are connected to the DIO of NI-9401 which is mounted on cRIO.

A standard VI for encoder counting is used and compiled under the FPGA environment.

 

During the measurement, I observed that there are significant loss count in both encoder direction.

I do not think that there is any problem with the VI as I have used it quite a few times on encoders with RS422 logic output.

 

Is there any problem with my current encoder in terms of its electrical interface with NI-9401?

 

Thanks.

 

 

 

0 Kudos
Message 1 of 11
(10,317 Views)

Hello kok_leong,

 

What sort of pulse rates are your encoders generating?  The 9401 is one of the faster digital modules (100ns) but perhaps your signal is changing too fast for it to detect every transition.

 

If you can share your code that would also be helpful.

 

Thanks,

 

Sebastian

0 Kudos
Message 2 of 11
(10,309 Views)

Hi Sebastian.

 

The pulse rate is pretty slow. Around 600ms which I measured from the raw signals.

Encoder counting VI: 

 

Encoder counting VI.JPG

 

 

Thanks,

Kok Leong

Message 3 of 11
(10,287 Views)

Try chaning pull-up resistor.

It's most likely the case where pull-up is either too high or low, and give inappropriate coltage level.

0 Kudos
Message 4 of 11
(10,271 Views)
Solution
Accepted by topic author kok_leong

I do not think that there is a problem with the pull-up resistor. Even if the digital i/o ports have their own pull-up resistors (usually in the range of 4.7kOhm - should be specified in the manual), the current to be handled by the output transistor of the encoder circuitry is about 2mA. - Check your setup for proper GND connection. You should connect GND of the encoder power supply directly to the DGND terminal of the pc board.

0 Kudos
Message 5 of 11
(10,262 Views)

Hi all. Thanks for the inputs.

 

Currently I am using NI 9411 to replace with NI 9401.

 

NI 9411 is better in the sense that it has external power supply channels and the grounding issue is taken care of.

 

Thanks again, bye.

 

Best regards,

Kok Leong

 

0 Kudos
Message 6 of 11
(10,188 Views)

 

Hi,

 

Could you recommend a differential encoder to work with UMI-7774?

 

Thanks

0 Kudos
Message 7 of 11
(9,382 Views)

We are using encoders with differential outputs from Baumer of Germany, and also some from former HP.

 

We mainly use them with a differential receiver circuit but they work OK with the UMI, too. I think virtually any encoder with differential outputs will do the job. Most of them use the well-known three-channel differential line driver Am26LS31 (or 26C31, the c-mos version).

0 Kudos
Message 8 of 11
(9,372 Views)

I'm new to labview fpga.

 

 

0 Kudos
Message 9 of 11
(7,797 Views)

I'm new to labview fpga.

I used the code (attached). with cRIO-9076,NI-9401

 

Observation:1) ON FPGA VI: Position count value is not incrementing,the values shown are either 0,-1 or 1

                      2) ON HOST VI: As velocity & acceleration calculations are depending on count in fixed velocity interval ,that are also showing random values

Que:

     1. what are  floating point to fixed point conversion issues in LV-2102?

     2.what should be the value of velocity fixed interval ?

     3. how can use this velocity data in dc motor pid speed control with NI-9401 without using NI-9505 dc brushed drive?

     4. Is SCTL necessary? 

 Also: i need information regarding 1.how to create .exe ?

                                                            2.how to make crio standalone ?

 

fpga.png

0 Kudos
Message 10 of 11
(7,792 Views)