Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital Input and Counter now working together

I'm working on a project that requires me to take in the inputs from an optical encoder and control the outputs of the DAQ that I am using (NI ELVIS). From what I can tell the NI ELVIS is incappable of using a quadature encoder input so I've simply used a edge counter to detect the rising edge for me. This code works fairly well for the purpose of this project, could use improvement, and functions fine on it's own. I tried to combine this LabVIEW code with my primary code first as a subvi, but it continued to get stuck in a loop and wouldn't exit. So I decided to directly put the code into the primary program, but it messes up the functionality of my whole program. There are no error messages and when looking at the code run step by step it seems to be doing everything correctly, but I'm unalbe to detect what is happening on the analog input.

 

I've attached the code and any assistance would be greatly appreciated.

 

Justin

0 Kudos
Message 1 of 2
(5,590 Views)

Hi Crashdx,

 

Instead of using DAQ Assistant, why don't you try using the DAQ VIs for acquiring data. You can find examples of Analog Input at Example Finder>>Hardware Input and Output>>DAQmx>>Analog Input.

 

Best,

 

Carmen C.

0 Kudos
Message 2 of 2
(5,567 Views)