![National Instruments AT-MIO E Series Скачать руководство пользователя страница 71](http://html1.mh-extra.com/html/national-instruments/at-mio-e-series/at-mio-e-series_programmers-manual_3381557071.webp)
Chapter 4
Programming
4-6
©
National Instruments Corporation
3.
Output the digital patterns.
for (i=0;i<=255;i++)
{
DIO_Output_Register = i;
}
Example 2
This example shows how to perform digital I/O.
Configure digital lines 0, 2, 4, and 6 as outputs and the remaining lines as
inputs. Wrap back the ouput lines to the input lines. Write patterns 0b0000
and 0b1111 to the output lines. Read back the input pins to verify the data.
Also check some intermediate patterns as well.
1.
Set up the Plug and Play resources. Use the function
Setup_PNP_Board
provided on the Companion Disk.
2.
Configure lines 0, 2, 4, and 6 as outputs and 1, 3, 5, and 7 as inputs.
DIO_Control_Register = 0x55;
3.
Write the digital pattern.
DIO_Output_Register = 0x00;
4.
Read the digital pattern.
Pattern = DIO_Parallel_Input Register;
5.
Repeat Steps 3 and 4 for subsequent patterns.
Analog Input
See Chapter 2 in the DAQ-STC Technical Reference Manual for
information on programming analog input and the relevant registers. This
section also describes the programming sequences for the various functions
and organizes these functions for a particular operation. Individual bitfield
descriptions are also given.
Programming the AT E Series boards for analog input can be divided into
writing to and reading from two main register groups: discrete board
registers, and DAQ-STC registers. The following functions configure the
board by calling the
Board_Read
and
Board_Write
functions:
Setup_PNP_Board;
Configure_Board;
Содержание AT-MIO E Series
Страница 131: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 2 National Instruments Corporation...
Страница 132: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 3 AT MIO E Series RLPM...
Страница 133: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 4 National Instruments Corporation...
Страница 134: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 5 AT MIO E Series RLPM...
Страница 135: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 6 National Instruments Corporation...
Страница 136: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 7 AT MIO E Series RLPM...
Страница 137: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 8 National Instruments Corporation...
Страница 138: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 9 AT MIO E Series RLPM...
Страница 139: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 10 National Instruments Corporation...
Страница 140: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 11 AT MIO E Series RLPM...
Страница 141: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 12 National Instruments Corporation...
Страница 142: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 13 AT MIO E Series RLPM...
Страница 143: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 14 National Instruments Corporation...
Страница 144: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 15 AT MIO E Series RLPM...
Страница 145: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 16 National Instruments Corporation...
Страница 146: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 17 AT MIO E Series RLPM...