Quantcast
Channel: All LabVIEW posts
Viewing all articles
Browse latest Browse all 203016

Change detection event to read DI and AI

$
0
0

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


Viewing all articles
Browse latest Browse all 203016

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>