User`s guide
46
•
PCIS-DASK Application Hints
5.3.1 One-Shot Digital input programming Scheme
This section described the function flow typical of non-buffered single-point
digital input readings. While performing one-shot DI operation, the devices
whose I/O port can be set as input or out put port (PCI-7248 and PCI7296)
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, INPUT_PORT);
DIO_PortConfig(card, Channel_P1B, INPUT_PORT);
DIO_PortConfig(card, Channel_P1CL, INPUT_PORT);
DIO_PortConfig(card, Channel_P1CH, INPUT_PORT);
//DI operation
DI_ReadPort(card, Channel_P1A, &inputA);
…
Release_Card(card);
DIO_PortConfig
(Only needed by PCI-
7248, PCI-7249 and PCI-
7296 cards)
Input data form Line?
YesNo
DI_ReadLineDI_ReadPort
Another reading ?
Yes
No
Port configured as
input port