cancel
Showing results for 
Search instead for 
Did you mean: 

Beginner question

SOLVED
Jango
Member
Solved!

Beginner question

I am using an Incremental Encoder on NI 9411 on DI2b(A), DI4b(Z), DI5b(B) as a differential pin configuration.
Do I need to create a Virtual channel to access the physical inputs? If yes, then Should I consider using Digital Input or Counter Input?
And what would be my Physical channel for the same?
I wish to use the encoder to obtain Crank Angle from the encoder for Pressure V/S Crank Angle degree on my setup.

 

18 REPLIES 18
Highlighted
Izzzzz
NI Employee (retired)

Re: Beginner question

Message contains a hyperlink

Hello Rachit1234, 

 

Are you using a differential encoder, i.e. do you have twp wires for the A, B, and Z lines coming from you sensor? I ask because your wiring scheme seems a little odd. I would recommend (if you do have a differential encoder) to connect A to (DI 0b, DI 0a), B to (DI 2b, DI 2a), and Z to (DI 1b, DI 1a), or a single ended encoder connect A to DI 0a, B to DI 2a, and Z to DI 1a. Then I would set up a Angular Position Task  and reference counter 0 on board your cDAQ chassis.  Please let me know if you have follow up questions regarding this issue.

 

Best Regards,

 

Izzy O.

Applications Engineer

National Instruments

www.ni.com/support

Jango
Member

Re: Beginner question

Well, I can do that. I am using an encoder which I connected differentially, though its an open collector. I read it somewhere the differential type config is quite useful. Also, I could use the the config that you mentioned, but wish to know is there any reason for that? Since, the terminal config which I used did work. 

Izzzzz
NI Employee (retired)

Re: Beginner question

Message contains a hyperlink Message contains an image

The configuration I mentioned is the default pin assignment for Counter 0 onboard your cDAQ chassis seen below.

Capture34.PNG

 

 

 Your configuration would still work but they are not the default pin assignments for any counter reading an encoder (A, B, Z terminals) and you would have to utilize some property nodes to reroute the signal to their appropriate destinations. 

 

Best Regards,

 

Izzy O.

Applications Engineer

National Instruments

www.ni.com/support

 

Jango
Member

Re: Beginner question

Perfect, I did connect according to your mentioned config, and it worked. Now I am trying to trigger a Pressure sensor connected on the AI NI 9215. Will I be able to trigger it? Or should it be connected to an output module?

Izzzzz
NI Employee (retired)

Re: Beginner question

Hello rachit1234,

Glad to hear the suggested configuration worked. Your ability to trigger will depend on your hardware setup and your trigger. What type of trigger are you using digital, or analog? How does the trigger need to act start, reference, pause? What is the source of the trigger? What type of cDAQ chassis are you using with the 9215? Please post back with the answers to these questions so a recommendation can be made.

Best Regards,

Izzy O.
Applications Engineer
National Instruments
ni.com/support
Jango
Member

Re: Beginner question

So I am trying to trigger the pressure sensor after recieving the A Pulse of the Encoder. Thre trigger needs to start and wait for about 100ms and then stop.
I have connected the Encoder to as said before to NI 9411, and The pressure sensor is connected to NI 9215-0.
CDAQ 9178

Jango
Member

Re: Beginner question

Message contains an attachment

I figured the connections..
Attached is the VI,in which I am not able to trigger the case structure loop. Since the data is not in proper format.
The VI is broken, since the data (Digital Waveform graph) I am not able to convert into the the reqd format for the comparision.

Izzzzz
NI Employee (retired)

Re: Beginner question

Message contains an image

Hello Rachit1234,

 

I took a look at your VI and was not quite sure what you were trying to implement and why you were utilizing digital task for your pressure transducer and encoder. Please take a look at the snippet of code below which demonstrates how to trigger your analog pressure task based on the first Pulse to the encoder source (A terminal). You will also need to set up a counter task for your incremental encoder.

 

C4.png

 

Also, could you clarify this statement you made on you May 16the post “The trigger needs to start and wait for about 100ms and then stop”. The trigger will only start the pressure task from acquiring data once as displayed above so more clarification on the feature you are seeking would be helpful.

 

Regards,

 

Izzy O.

Applications Engineer

National Instruments

ni.com/support 

Jango
Member

Re: Beginner question

Error: ADC conversion attempted beofer the prior conversion was complete.. 
I used Z for the Counter input.