Page 48
M4220170607EN
UI Robot Technology Co. Ltd.
UIM2842
8.6 Sensor Input Control Register S12CON
S12CON
(
Sensor 1/2 Control
)
defines the binding relationship between S1 and S2
sensor events and actions, as well as the activation of corresponding RTCNs.
It is a 16bits
register inside the controller, and can be configured using the instruction SCF. When
writing to it user needs to affix a 4bits suffix-code to point to this register. For details of SCF,
please refer to chapter 11.
The suffix-code for S12CON is 0000 (binary). S12CON structure is as follows:
Bit
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Defination
S2RACT
S2FACT
S1RACT
S1FACT
Bit 15-12
S2RACT<3:0>
S2 Rising-edge Action
Bit 11-8
S2FACT<3:0>
S2 Falling-edge Action
Bit 7-4
S1RACT<3:0>
S1 Rising-edge Action
Bit 3-0
S1FACT<3:0>
S1 Falling-edge Action
The binding relationship between S1 and S2 sensor events and actions is as follow:
ACT Code
(
binary
)
Action
RTCN or Not
0000
N/A
No RTCN (Ignore MCFG<S2IE><S1IE>)
0001
N/A
Depends on MCFG<S2IE><S1IE>
0010
Start and Run Reversely
Depends on MCFG<S2IE><S1IE>
0011
Decelerate until Stop
Depends on MCFG<S2IE><S1IE>
0100
Emergency Stop
Depends on MCFG<S2IE><S1IE>
0101
Reverse Displacement Control
Depends on MCFG<S2IE><S1IE>
0110
Reset position
Depends on MCFG<S2IE><S1IE>
0111
Reset po Dispalcement Control Depends on MCFG<S2IE><S1IE>
1000
Execute preset interrupt program*
Depends on MCFG<S2IE><S1IE>
1001
Direction-change displacement control
Depends on MCFG<S2IE><S1IE>
1010
Start and Run Forwardly
Depends on MCFG<S2IE><S1IE>
1011
Reset po Decelerate until Stop
Depends on MCFG<S2IE><S1IE>
1100
Reset position + Emergency Stop
Depends on MCFG<S2IE><S1IE>
1101
Forward Displacement Control
Depends on MCFG<S2IE><S1IE>
1110
Change direction and run
Depends on MCFG<S2IE><S1IE>
1111
OFF
Depends on MCFG<S2IE><S1IE>
Note: *The version of controller firmware is required 1302.
8.7 Sensor Input Control Register S34CON
S34CON
(
Sensor3 / Port4 Control
)
defines the binding relationship between S3 sensor
events and actions, as well as the activation of corresponding RTCNs. It is a 16bits register
inside the controller, and can be configured using the instruction SCF. When writing to it
user needs to affix a 4bits suffix-code to point to this register. For details of SCF, please
refer to chapter 11.
In addition, S34CON is also used to configure the TTL output port and the events that drive
the output level. In this chapter, only the S3 related configuration is described.
The suffix-code for S34CON is 0001 (binary). S34CON structure is as follows:
Bit
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Defination
STALL
P4LVL
P4EVENT
S3RACT
S3FACT