LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change detection event to read DI and AI

Hello,

 

I am having issues using the DAQmx change detection.

 

I am trying to measure 40 temperatures that are hardware multiplexed to 5 AI. The multiplexer board has about a 2Hz clock that increments a 4-bit ripple counter. The counter output is fed to the 5 multiplexers as the select line. So 000, it outputs temps for 1, 9, 17, and so on. 001 is 2, 10, etc. It counts from 0 to 7 and resets. My program is set up to trigger the rising and falling edge of P0.0 and fire an event that reads P0.0:2 and AI0:4. 

 

The problem I am having is that bit 2 of my digital line is showing to be changing between a rising and falling edge of bit 0. This is causing my count to show something like, 0, 1, 2, 3, 0, 5, 6, 7, 4, 1, 2,... I am using the number to sort the temperature into a size 40 array according to the position of the temp reading. So when it reads 0 and should be 4, it is putting the temperature for position 4 into position 0. I have found a way around this, but I still have an issue if it happens to start right on the spot that it is misread. It will shift all of my temperatures to the wrong position. When I run the program, I can get the error to happen about once for every 10 times I run the program.

 

I have set up an acquisition of just the 3 bits sampling at 25 Hz. The digital graph shows to be exactly as I would expect it, counting from 0 to 7 and resetting like normal. Has anyone seen this type of issue before? I have attached screenshots of the graphs I get when using the Change Detection event and when sampling normally along with the vi using change detection.

 

I am using a PXIe-6365 in a PXIe-1071 chassis and LV17.

 

Thanks,

David

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

 Hello,

As you mentioned

I have set up an acquisition of just the 3 bits sampling at 25 Hz. The digital graph shows to be exactly as I would expect it, counting from 0 to 7 and resetting like normal.

Assuming while measuring you have disconnected your selection signal from Mux board, it seems like noise problem in your connection of digital selection line to board, where it not able to maintain 1s and 0s level due to noise.(I am not sure please check once any noise induced in digital line by Mux Board such as conman ground problem etc)

Expand.Evolve.Influence
0 Kudos
Message 2 of 3
(2,348 Views)

I'm not sure I understand what you mean. The mux board is a custom board that only receives 12V power. The board generates about a 2 Hz clock which increments a counter. The 3 digital lines of the counter output is sent to 5 multiplexers and I am reading the same counter output to determine which channel of the multiplexers I have voltages for. I have shown that I can read the 3 digital lines with no issues. The issue comes when I am using edge detection to trigger a read. 

0 Kudos
Message 3 of 3
(2,340 Views)