8 Digital Input Module 
Cdios 6153 

Command / Reply / Event messages V1.0

 

Cdios controller commands


 

Command code 08h: Read inputs

This commands reads the 8 inputs or the latched inputs.

 

Command

Module ID

3

4

5

6

7

8

08h

0 - 15

Selector

0

0

0

0

0

Parameter

Value

 Description

Selector

0

Read 8 inputs directly

1

Read latched inputs, latched by the latest SYNC command

Normal reply is:

 

Reply

Module ID

3

4

5

6

7

8

08h

0 - 15

Selector

Data

0

0

0

0

Parameter

Bit

 Description

Selector
x
Copy of value of the command

Data

0

bit 0 contains the state of input 1, 0 is inactive, 1 is active

until

bit ....

7

bit 7 contains the state of input 8, 0 is inactive, 1 is active


 Possible error message:

 

Error

Module ID

3

4

5

6

7

8

88h

0 - 15

0

0

Error Status

0

0

0

Parameter

Bit

 Description

Error status

0

1 =  Selector parameter out of range

 


Command code 09h: Set event on input change mask

This commands defines the inputs to scan for 'change of state'.

 

Command

Module ID

3

4

5

6

7

8

09h

0 - 15

0

Mask

0

0

0

0

Parameter

Bit

Default

 Description

Mask

0

0

when 1 it enables scanning input 1 for change

until

 

when ...

7

0

when 1 it enables scanning input 8 for change

At power on or reset, the internal masks are cleared.

Confirmation reply message (suppressed when 'Confirm' is 0):

 

Reply

Module ID

3

4

5

6

7

8

09h

0 - 15

0

0

0

0

0

0
 


Command code 0Ah: Set Debounce time

This commands configures the input debouncing counters.

 

Command

Module ID

Selector

4

5

6

7

8

0Ah

0 - 15

0

Debounce 1

Debounce 2

Debounce 3

Debounce 4

0

1

Debounce 5

Debounce 6

Debounce 7

Debounce 8

0
 

Parameter

Value

Default

 Description

Debounce1
-
Debounce8

0-255

0

range is 0 - 255 milliseconds (0 is no debouncing)

Confirmation reply message (suppressed when 'Confirm' is 0):

 

Reply

Module ID

3

4

5

6

7

8

0Ah

0 - 15

0

0

0

0

0

0

Possible error message:

 

Error

Module ID

3

4

5

6

7

8

8Ah

0 - 15

0

0

Error Status

0

0

0

Parameter

Bit

 Description

Error status

0

1 =  Selector parameter out of range

 


Events

A 'change of State' event can be configured with the 'Set event on input change mask' command.
If an enabled input changes state, a read input event message is sent:

 

Event

Module ID

3

4

5

6

7

8

48h

0 - 15

0

Data

0

0

0

0

Parameter

Bit

 Description

Data

0

bit 0 contains the state of input 1, 0 is inactive, 1 is active

until

bit ....

7

bit 7 contains the state of input 8, 0 is inactive, 1 is active

All data is stored in one byte, so the application has to find out itself which input actually changed.

Input change events react directly on the actual inputs, not on latched inputs.


Home  

Last Modified: 26 November 2002