SSI interface
SSI_Set_Bits
ADwin
132
ADwin-Gold II
, Manual February 2013
SSI_Set_Bits
SSI_Set_Bits
sets for an SSI counter the amount of bits which generate a
complete encoder value.
The number of bits should be equal to the resolution of the encoder.
Syntax
#Include
ADwinGoldII.inc / GoldIITiCo.inc
SSI_Set_Bits
(
dcdr_no
,
bit_no
)
Parameters
Notes
The resolution (amount of bits) of the SSI encoder should be similar to
the amount of bits which are transferred.
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 (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
dcdr_no
Number (1…4) of the SSI decoder whose resolu-
tion is to be set.
LONG
bit_no
Amount of bits (1…32) of the bits which are to be
read for the encoder (corresponds to the encoder
resolution).
LONG