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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using rotary encoder position to trigger an analog pulse

Solved!
Go to solution
Hello, I am pretty new to the Labview software, but my lab needs me to find a way to adjust our engine's fuel injection timing based on a rotary encoder's position. I am using a Nikon RX1000-22-1 Rotary encoder, and a NI 6040E DAQboard connected to a SCB 68 E series breadboard. I am having a lot of difficult making the encoder's position trigger the analog pulse generation. Thanks in advance for any information.
-------------------------------------------
PXIe-1071
PXIe-8115 Embedded Controller
PXIe-6363 X Series Multifunction DAQ
PXI-7854R FPGA
0 Kudos
Message 1 of 7
(4,102 Views)

Hello Tokodaisei

 

Thanks for using National Instruments Discussion forum.


Please provide a little more information about what you are actually doing.

 

1) How do you operate Nikon RX1000-22-1 Rotary encoder.i.e. moving it manually or it moves with some motor.
2) how do you produce analog pulse.(using DAQmx analog output? do you want to start it at the specific position of encouder.)

   For that you need to first recognize the specific position of encouder and then generate a pulse at that instant,which then,

   triggers the analog output.

3) Can you attach your code over here.

 

 

 

0 Kudos
Message 2 of 7
(4,079 Views)

1.) The rotary encoder will move with the engine, so it will basically represent the crank angle. 

2.) I am using DAQmx anaglog ouput to produce the signal and I need the pulse to be triggered at a certain angle which can be easily set by the user.  The encoder has a signal that pulses 1000 times per revolution(signal A or B) and a different signal that pulses once every revolution(signal Z).  We would be using that pulse to indicate TDC for the crank angle, and then use the more frequent pulses to determine injection delay.

 

3.) The filename and some of the notes are in Japanese, so I'll do my best to describe the important parts.  分周カウンターの信号 means "signal for division counter"  and 分周のためのカウンター means "counter for division"

 

The imputs on the left, in the wire diagram, in descending order are Duty, duty delay time in microseconds, injection duration in microseconds, voltage, and below those four is パルス数(blah blah), this is the user defined number of pulses to wait before the analog output signal is generated.

-------------------------------------------
PXIe-1071
PXIe-8115 Embedded Controller
PXIe-6363 X Series Multifunction DAQ
PXI-7854R FPGA
0 Kudos
Message 3 of 7
(4,065 Views)
Solution
Accepted by topic author Tokodaisei

Thanks for replying back.

I have seen your program code though エンジエクト生成信号.vi is missing.

I think you want analog output to be triggered at specific position of encoder genereting 1000 pulses/rev.
here, (present pulse *360)/1000 should give you the present angel of Crank shaft,where you need to gerenete a pulse signal
at particular position.This pulse signal should trigger Analog output VO.

You can use measure angular position of encoder and then connect A phase signal of encoder as a trigger source for
Analog Output.

you may find this link quite help.

 

Angular Position Measurement with a Quadrature Encoder:
https://decibel.ni.com/content/docs/DOC-17346

 

I took the liberty to gerenete a program which connects pulse source (A phase signal) to analog output when particular position of encoder is
reached.I have attached this program for your reference.

 

 

0 Kudos
Message 4 of 7
(4,059 Views)
0 Kudos
Message 5 of 7
(4,058 Views)

Thank you for the help.  I left the one file out because its function was operating properly for me already.  The suggestions you mentioned helped a lot.

-------------------------------------------
PXIe-1071
PXIe-8115 Embedded Controller
PXIe-6363 X Series Multifunction DAQ
PXI-7854R FPGA
0 Kudos
Message 6 of 7
(4,043 Views)

I am pleased it helped you.

Always feel free to use National Instruments Discussion Forum.

 

regards,

 

0 Kudos
Message 7 of 7
(4,041 Views)