Download Data Acquisition Programmer`s SDK

Transcript
Programmer’s SDK Manual
5
0
1
Hex value
2
0
1
0
0
5
5
5
5
5
5
5
7
7
7
7
7
7
7
D
D
D
D
D
D
D
F
F
F
F
F
F
F
1
0
3
6
7
A
B
E
F
3
6
7
A
B
E
F
3
6
7
A
B
E
F
3
6
7
A
B
E
F
mask (bit_and)
Hex values
that would
also pass
through the
above mask
As the above illustrates, selecting an appropriate bit_and value is important. In our example,
the hexadecimal value for bit_and would be FF. The next step is to determine bit_xor.
Since you are interested in counting every occurrence of 52, bit_xor is set to 52.
5
1
1
1
5
Hex value
2
1
1
1
1
1
2
mask (bit_and)
bit_xor
The di_ct_event function call for this example would be:
di_ct_event(0xFF,0x52)
The minimum pulse width for this function is 500 nS. The maximum frequency is 500 kHz
• Return Value
DI_NO_ERR
DI_OPENED_ERR
DI_COMM_ERR
No error
Device not opened
Communication error
Function Reference
54