Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

lost values?

Hi,
using a PCI-6518 with C# (.net 2.0) we have a problem with possible lost values. We use DigitalChangeDetection and read when signaled the data with ReadSingleSampleMultiLine( ). But if we have some signal changes shortly one after another so we get only the last state an the last but one is possible lost.

 Is there an other way or solution to prevent the lost?
0 Kudos
Message 1 of 6
(3,619 Views)
duplicate post...

Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 2 of 6
(3,614 Views)
Sorry, what is duplicate? The link is to a post of the same author but ... with other content.
0 Kudos
Message 3 of 6
(3,606 Views)


dki55 wrote:
Hi,
using a PCI-6518 with C# (.net 2.0) we have a problem with possible lost values. We use DigitalChangeDetection and read when signaled the data with ReadSingleSampleMultiLine( ). But if we have some signal changes shortly one after another so we get only the last state an the last but one is possible lost.

 Is there an other way or solution to prevent the lost?



Hi dki55,
 
change detection on static DIO boads is limited by two factors: the speed of the hardware circuits of the board and the time your PC needs for handling the interrupt which is created upon a detected line change. Can you please specify your definition of "shortly"? Also, have you set a digital filter delay?
 
I have found a Knowledge Base entry which deals with a similar question:
 
There is a possibility to diagnose the change detection, which is roughly mentioned in the card's user manual:
 
 

The DIO device sends a change detection when any one of the changes
occurs, but it does not report which line changed or if the line was rising or
falling. After a change, you can read the input lines to determine the current
line states. The maximum rate of change detection is determined by the
software response time, which varies from system to system.

An overflow bit indicates that an additional rising or falling edge has been
detected before the software could process the previous change.

This overflow bit is a DAQmx Read property: Status:Advanced:ChangeDetection:Overflowed.

Be advised that the bit will only be set if the digital line changes you monitor are only to fast for the interrupt routines of your PC, not if the pulse frequency is higher than the hardware's abilities (cut-off frequency through the resistances and capacitors in the digital circuitry)..
 
Best regards,
Sebastian
0 Kudos
Message 4 of 6
(3,593 Views)
Thanks again Sebastian.
You wrote about a "DAQmx Read property: Status:Advanced:ChangeDetectionOverflowed" property. We are writing programs with C# under DAQmx. In this I found only a
Task.Timing.ChangeDetectionOverflowed  property. Do we speak about the same property?? I tryed to get the property after the Read and got an exception (content: the task is in a wrong state to get this property). Since I use continous reading with ChangeDetection I should not change Task state.
0 Kudos
Message 5 of 6
(3,556 Views)

@dki55 wrote:
Thanks again Sebastian.
You wrote about a "DAQmx Read property: Status:Advanced:ChangeDetectionOverflowed" property. We are writing programs with C# under DAQmx. In this I found only a
Task.Timing.ChangeDetectionOverflowed  property. Do we speak about the same property?? I tryed to get the property after the Read and got an exception (content: the task is in a wrong state to get this property). Since I use continous reading with ChangeDetection I should not change Task state.





Hi dki55,

I am sorry to have caused confusion here, I simply translated the propery name from the LabVIEW help. After checking the NIDAQmx.h file, let me please clarify the needed functions and properties:

The name of the DAQmx Read Attribute you need is
DAQmx_Read_ChangeDetect_HasOverflowed

and can be read through calling the function
DAQmxGetReadAttribute (see line 1990 of the header file for prototype)

I believe it should also be possible to directly use the function
DAQmxGetReadChangeDetectHasOverflowed (see line 4208)


Best regards,
Sebastian
0 Kudos
Message 6 of 6
(3,553 Views)