User`s guide

PCIS-DASK Application Hints ? 31
4.4.1 One-Shot Digital output programming Scheme
This section described the function flow typical of non-buffered single-point digital output operation. While performing
one-shot DO operation, the cards whose I/O port can be set as input or out put port (PCI-7248, PCI7249 and PCI-7296)
need to include port configuration function at the beginning of your application.
[Example Code Fragment]
card = Register_Card(PCI_7248, card_number);
//port configured
DIO_PortConfig(card ,Channel_P1A, OUTPUT_PORT);
DIO_PortConfig(card, Channel_P1B, OUTPUT_PORT);
DIO_PortConfig(card, Channel_P1CL, OUTPUT_PORT);
DIO_PortConfig(card, Channel_P1CH, OUTPUT_PORT);
//DO operation
DO_WritePort(card, Channel_P1A, outA_value);
Release_Card(card);
4.4.2 Synchronous Continuous Digital output programming Scheme
This section described the function flow typical of synchronous digital output operation. While performing continuous DO
operation, the DO configuration function has to be called at the beginning of your application. In addition, for
synchronous DO operation, the SyncMode argument in continuous DO functions for synchronous mode has to be set
as SYNCH_OP.
DO_xxxx_Config
(
xxxx means the card type,
e.g. DO_7200_Config
)
DO_ContWritePort
With SyncMode=SYNCH_OP
[Example Code Fragment]
card = Register_Card(PCI_7200, card_number);
DO_7200_Config(card, TRIG_INT_PACER, OREQ_DISABLE, OTRIG_LOW);
DO_AsyncDblBufferMode (card, 0); //non-double-buffered mode
DO_ContWritePort(card, 0, DoBuf, count, 1, (F64)sample_rate, SYNCH_OP);
DIO_PortConfig
(only needed by PCI-
7248,
PCI
-
7249 and PCI
-
7296
Output data to Line?
Yes No
DO_WriteLine DO_WritePort
Another outputting ?
Yes
No
Port configured as
output port