CAN KEYPAD MODULE
CPM 100
PAGE
46
■
Data structure:
CR1500 InOutStruct
■
Purpose:
Current I/O data
are read or written.
The data structure
is assigned to the
function input "IO_DATA"
via the ADR operator.
■
Structure components (function keys)
Name
Data
Key
Bit status in ...
type
push button operation
toggle operation Byte Bit
Key1_Direct
BOOL
1
TRUE if pressed
TRUE if switched
0
0
Key1_Delay
BOOL
TRUE when delay time has elapsed TRUE if switched
1
Key2_Direct
BOOL
2
TRUE if pressed
TRUE if switched
2
Key2_Delay
BOOL
TRUE when delay time has elapsed TRUE if switched
3
Key3_Direct
BOOL
3
TRUE if pressed
TRUE if switched
4
Key3_Delay
BOOL
TRUE when delay time has elapsed TRUE if switched
5
Key4_Direct
BOOL
4
TRUE if pressed
TRUE if switched
6
Key4_Delay
BOOL
TRUE when delay time has elapsed TRUE if switched
7
Key5_Direct
BOOL
5
TRUE if pressed
TRUE if switched
1
0
Key5_Delay
BOOL
TRUE when delay time has elapsed TRUE if switched
1
Key6_Direct
BOOL
6
TRUE if pressed
TRUE if switched
2
Key6_Delay
BOOL
TRUE when delay time has elapsed TRUE if switched
3
Key7_Direct
BOOL
7
TRUE if pressed
TRUE if switched
4
Key7_Delay
BOOL
TRUE when delay time has elapsed TRUE if switched
5
Key8_Direct
BOOL
8
TRUE if pressed
TRUE if switched
6
Key8_Delay
BOOL
TRUE when delay time has elapsed TRUE if switched
7
Key9_Direct
BOOL
9
TRUE if pressed
TRUE if switched
2
0
Key9_Delay
BOOL
TRUE when delay time has elapsed TRUE if switched
1
Key10_Direct
BOOL
10
TRUE if pressed
TRUE if switched
2
Key10_Delay
BOOL
TRUE when delay time has elapsed TRUE if switched
3
Key11_Direct
BOOL
11
TRUE if pressed
TRUE if switched
4
Key11_Delay
BOOL
TRUE when delay time has elapsed TRUE if switched
5
Key12_Direct
BOOL
12
TRUE if pressed
TRUE if switched
6
Key12_Delay
BOOL
TRUE when delay time has elapsed TRUE if switched
7
TYPE CR1500 InOutStruct
STRUCT
Key1_Direct: BOOL;
(BinIn)
Key1_Delay: BOOL;
(BinIn)
Key12_Delay: BOOL;
(BinIn)
KeyLeft1_Direct: BOOL;
(BinIn)
KeyLeft1_Delay: BOOL;
(BinIn)
KeyRight1_Direct: BOOL; (BinIn)
KeyRight1_Delay: BOOL; (BinIn)
KeyRight2_Delay: BOOL; (BinIn)
Led1_1: BOOL;
(BinOut, LowBit)
Led1_2: BOOL;
(BinOut, HighBit)
Led12_2: BOOL;
(BinOut, HighBit)
LedBar1_Value: BYTE;
(AnalogOut)
LedBar2_Value: BYTE;
(AnalogOut)
END_STRUCT
END_TYPE