Hi everybody,
I'm trying to set up a real-time rotary decoder for use as a pulse shifter via labview.
Basically that means I have two input channels (ttl-pulses, ~20us high) from a rotary engine. One channel contains a pulse at every °CA (cranc angle) up to 12kHz (increment). The other channel contains a pulse every 720 °CA (the bottom dead centre of the charge cycle, BDC_cc). With that information a pulse is to be generated on one output channel (also ttl high) , that triggers my measurement setup. This pulse is to be shifted in a programmable relation towards the BDC_cc input, aiming for a sceduled measurement table.
I got it running by continuously reading the BDC_cc channel until a rising edge is detected, then counting the increment edges up to the designated trigger point and then generating a pulse on the output channel. The problem is that the output trigger is about 70-120us late. In short that is too much; a maximum error of ~20us is acceptable. Digital channels seem to work fastest, so I scrapped counter-based acquisition.
I'm quite new to LabView, so I'm sorry if the answer is obvious...
My acquisition setup consists of:
PCI-MIO-16E-1
BNC-2120
LabView 12.0
Max 5.3.1f0
Widows XP
This setup seems to exclude some of the options Labview offers, such as externally sampled digital acquisition or externally triggered counter-based acquisition. Manual interpretation of analog input channels is way to slow.
I've attached my currently working version.
Any input woud be appreciated...