Event setting
① DI edge detection setting [di_event_edge.vi]

 

Select to perform edge detection of digital input

 

 


IN/OUT Terminal layout

 


Input terminal

EdgeBit

Initial value: 0

[Essential]
Specify the bit number for edge detection

 

EdgeType

Initial value: 0 (Invalid)

[Essential]
Specify the direction of edge detection

0: Invalid (Do not perform edge detection)
1: Rising edge
2: Falling edge
3: Both sides

Specify 0 to disable edge detection once set.

 


Output terminal

Edge out

Returns the edge detection setting status

0: When the setting could not be performed or edge detection was stopped if EdgeType was 0
1: When interrupt is set
2: When trigger is set

If 0 is specified for EdgeType or edge detection cannot be set, 0 is returned
If edge detection can be set, 1 or 2 is returned

Difference between interrupt and trigger

Digital input devices have interrupts and triggers as functions that detect changes in the digital input signal, and different functions are available depending on the device.

Basically, interrupts are faster and more reliable, but triggers are better in terms of functionality, such as being able to be set in both directions.

In DAQ-LV-WIN, when edge detection is set, the interrupt or trigger function is used with the following priority.

 1. Use interrupts if interrupts are available
 2. Use trigger if trigger is available
 3. If neither is available, no setting is made and 0 is returned in EdgeStatus

When using the trigger function, note that signal changes that occur in a short time (approximately 10 msec or less are guidelines) may be missed.