Quantcast
Channel: Digital I/O topics
Viewing all articles
Browse latest Browse all 2176

ConfigureChangeDetection with NI PXIe-6535

$
0
0

We have a NI PXIe-6535 module. We want to monitor all 32 DIO lines as inputs in a single Task() using the ConfigureChangeDetection technique to receive a callback whenever a value changes.  We started by modifying the NI C# sample application called:

 

"NI-DAQ\Examples\DotNET4.5\Digital\Read Values\ReadDigChan_ChangeDetection_Events"

 

The modified start button click handler is in the next reply.(10,000 char post limit). The only real change we made was the hard coding of the device and edge parameters. We did this simply for this post.

 

It works for some amount of time and the callback stops firing. The amount of time varies between a few seconds and up to 30 seconds. Each callback simply echoes out how many elements are in the boolean array using Trace.WriteLine(). We do not attempt to update the UI as it is set up for 8 bits not all 32.

 

I created another post about not being able to use multiple tasks per device. It's unanswered so far:

 

http://forums.ni.com/t5/Measurement-Studio-for-NET/How-to-create-a-mutliple-tasks-to-read-Digital-channels/m-p/3019449#M15944

 

 

Bottom line is we need a way to monitor all 32 bits from a single task or multiple tasks. Right now we are only doing Digital inputs. Eventually we will need a mix of inputs monitored continously while writing to outputs.

 

Is this not supported? Are tasks not supposed to be long lived? Should we create a task every time we need to do something? The confusing part is that the test Panels for the NI PXIe-6535 support this exact thing. Why can't we do it from a C# application?

 

 


Viewing all articles
Browse latest Browse all 2176

Trending Articles