SSI interface
SSI_Mode
ADwin
130
ADwin-Gold II
, Manual February 2013
SSI_Mode
SSI_Mode
sets the modes of all SSI decoders, either "single shot" (read out
once) or "continuous" (read out continuously).
Syntax
#Include
ADwinGoldII.inc / GoldIITiCo.inc
SSI_Mode
(
pattern
)
Parameters
Notes
If you select the mode "continuous", reading the encoder is started im-
mediately.
SSI_Start
is not necessary for this.
Using the "continuous" mode, some encoder types occasionally return
the wrong counter value 0 (zero) instead of the corrct counter value. This
error does not occur with the "single shot" mode.
See also
,
,
Valid for
Gold II-CNT
Example
Rem Please select the appropriate include for ADbasic /
TiCoBasic
#Include
ADwinGoldII.inc / GoldIITiCo.inc
Rem Decoder 1 runs with 2.5 MHz, Decoder 2 with 1.0 MHz
Init:
SSI_Set_Clock
(
1
,
10
)
'clock rate for decoder 1
SSI_Set_Clock
(
2
,
25
)
'clock rate for decoder 2
SSI_Mode
(
11b
)
'Set continuous-mode (for
'encoders 1+
2
)
SSI_Set_Bits
(
1
,
10
)
'10 encoder bits for encoder 1
SSI_Set_Bits
(
2
,
25
)
'25 encoder bits for encoder 2
Event:
Par_1
=
SSI_Read
(
1
)
'Read out position value
'
(
encoder 1
)
Par_2
=
SSI_Read
(
2
)
'Read out position value
'(encoder 2)
T11 TiCo
pattern
Operation mode of the SSI decoders, indicated as
bit pattern. A bit is assigned to each of the decod-
ers (see table).
Bit = 0: "Single shot" mode, the encoder is read
out once.
Bit = 1: "Continuous" mode, the encoder is read
out continuously.
LONG
Bit no.
31:2
3
2
1
0
SSI decoder
–
4
3
2
1