LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connect Encoder to NI9375 to get angular measurement.

Hi All

 

I am trying to hook a Incremental encoder up to a Ni9375 in a cDAQ-9178 chassis. The encoder I am trying to attach it to is attached below. As the Ni9375 is a digital in out card I was wondering if it was possible to achieve a angle from it or do I have to have a digital in out card with a counter such as the NI 9361?
https://docs-emea.rs-online.com/webdocs/0159/0900766b80159b49.pdf

currently the encoder is wired as below

Channel A=Di0

Channel B=DI1

Channel N=Di2

I am trying to obtain an angular measurement that I can sync to 3 analogue voltage inputs but reading the encoder is my current issue.

 

Kind regards

Watez

0 Kudos
Message 1 of 3
(2,701 Views)

Hello watez,

 

Thank you for linking the manual and describing what you are trying to achieve! I assume you are using a 24V supply for both devices, or you found another way to make the encoder's output levels compatible with the 9375's inputs. I also assume your encoder is made for attaching to sinking inputs and sourcing outputs.

 

About the counters you are right. Without, it's almost impossible to read the encoder's signal correct. Maybe you thought about reading the encoder's signal using a high-speed acquisition task and then analyzing the signal. That might work, however you'll have to do a lot of development and you can never be sure that you did not miss an edge of your signal.

 

You do not necessarily need a module with a counter itself - your cDAQ-9178 chassis has four counters built-in (see section "General-Purpose Counters/Timers "in its manual). However, it has only two PFI connectors available (the BNC connectors), but you need three to fully connect your encoder. Except you are fine counting only one direction or ignoring the N/Z pulse. If you have any module available that has configurable PFI lines, you can route the cDAQ's counters to that module's inputs. Unfortunately, the 9375 does not have PFI lines, so you cannot use this one.

 

In case you are going to use the chassis' BNC I/O, please check the voltage requirements firs (haven't done so).


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
0 Kudos
Message 2 of 3
(2,667 Views)

Hi Ikaiser

Thank you for your advice!

While I managed to get the 9375 to read the encoder inputs I have since found as you said without the counter it is virtually impossible to get a angular reading. This combined with the slower measuring rate of the 9375 has somewhat made it redundant in my experiment.

 

What I have evolved to is as you described but using the PFI lines as a start and reference trigger for my process.

My "new" plan is to Use the N pulse at 1 per rev to start the logging process using PFI0 and align this with top dead centre on my apparatus so that it has a common triggering point between tests.

Then I would use one of the encoder outputs (A), as direction is irelevent, to sync the data logging by using it as a reference trigger connected to PFI1. This would give me a resolution of 1 read per degree which is more than enough for my task.

I believe for the BNC I/0 it is a -20-+25 range as shown in page 69 of this document so I should be ok.

http://gozips.uakron.edu/~dorfi/manuals/372838a.pdf

I will be trying this tomorrow and will report back my findings or issue.

 

Watez

Message 3 of 3
(2,654 Views)