3.4.2. I/O
# | Brief Description | Name | Arguments (in C Syntax) |
|
|
|
|
|
| Full Description |
8 | Read the inputs of a | ReadInputs | (long CardHandle, |
| Reads 5 or 6 chip's logical inputs, the two flags of its | |||||
| chip, the EventFlags of |
| short* Inputs, |
| EncoderEvents, and, in case of Chip #1, the Voltage Failure. | |||||
| its two encoders, and |
| short*EncoderEventFlags) |
| Inputs: | |||||
| the Voltage Failure. |
|
|
|
|
|
|
|
|
|
|
|
|
| For Chip #1: Bit #n corresponds to logical input #n+1 (n = 0,...,4). | ||||||
|
|
|
|
|
|
|
|
| Bit #5 corresponds to Voltage Failure (1 means that | |
|
|
|
|
|
|
|
|
| Voltage Failure = true). | |
|
|
|
|
| For Chip #2: Bit #n corresponds to logical input #n+6. (n = 0,...,5). | |||||
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
| EncoderEventFlags: Bit #0 corresponds to Encoder1 (A or C). | |||||
|
|
|
|
|
|
|
|
|
| Bit #1 corresponds to Encoder2 (B or D). |
|
|
|
|
| Notes: | |||||
|
|
|
|
|
|
|
| |||
|
|
|
|
| 1. Chip #1 has 5 logical inputs (marked | |||||
|
|
|
|
| Chip #2 has 6 logical inputs (marked | |||||
|
|
|
|
| 2. When an encoder event occurs, its software signal is held until | |||||
|
|
|
|
| ReadInputs is called. Afterwards, the software signal is cleared, | |||||
|
|
|
|
| unless the signal still lasts. This mechanism ensures that | |||||
|
|
|
|
| ReadInputs will hold the last encoder event (in | |||||
|
|
|
|
| EncoderEventFlags) even though the event is already over. | |||||
9 | Write to chip's outputs. | WriteOutputs | (long CardHandle, |
| Meaningful only when the active chip is Chip1, in which case its | |||||
|
|
| short Outputs) |
| three general outputs (marked 1,2,3) are written. | |||||
|
|
|
|
| Outputs: Bit #n corresponds to general output #n+1 (n=0,1,2). | |||||
|
|
|
|
| Notes: |
| ||||
|
|
|
|
| 1. Due | to hardware limitations, the current status of Outputs should | ||||
|
|
|
|
| be kept in order to be passed as argument in the functions | |||||
|
|
|
|
| ResetPositionCounter and RequestPositionCounter (named there | |||||
|
|
|
|
| OutputsMirror, refer to section 3.5.5, functions | |||||
|
|
|
|
| 2. Chip2 has no general outputs. | |||||
Note: The description of the common arguments is in section 3.6 |
|
|
|
|
|
|
|
16