Download RMU2 Linux Logic Controller User Manual

Transcript
RMU2 User Manual
DIO 0-11
D-SUB 37pin
Digital
Output
Drivers (2)
Digital Input
Opto(3)
33MHz
PCI
Bus
PCI Controller
Digital
Output
Drivers (2)
Digital Input
Opto(3)
DIO 12-23
D-SUB 37pin
5.1 Device APIs
5.1.1 Overview
The API utilizes the standard POSIX interface to provide the user access to the devices
functionality. As a POSIX compliant API, the DIO driver supports the standard operations:
open(), close(), read(), write() and ioctl(). The use of open(), close(), read() and write()
doesn’t rely on any explicit definitions, it relies only on the standard POSIX definition
standard. In order to use the ioctl(), an explicit protocol definition needs to be declared; it’s
done in the form of include file, which describes and defines the type of commands
available.
The DIO are accessed via the VFS character device node. Its major should be 240.
The DIO supports two interfaces: ASCII and Binary. Both have the same basic
functionalities. The later includes some enhancements, such as get the previous output IOs
states when setting a new ones and getting a timestamp indication with the read response.
More on these enhancements are shown below.
The RMU supports up to four DIO cards. The cards are accessed via the special files:
•
•
•
/dev/mksdio[0-3] (non-blocking ASCII reads would be used to poll the IO)
/dev/mksbio[0-3] (blocking ASCII reads is interrupt change of state based)
/dev/mksbiob[0-3] (blocking and non-blocking binary reads is interrupt change of
state based)
Two basic methods can by used to get input information from the DIO card, polling and
31 of 58
© MKS Instruments CIT Products 2005, All rights reserved