ADwin-Gold II
, Manual February 2013
135
SSI interface
SSI_Status
ADwin
SSI_Status
SSI_Status
returns the current read-status on the speicified module for a
specified decoder.
Syntax
#Include
ADwinGoldII.inc / GoldIITiCo.inc
ret_val
=
SSI_Status
(
dcdr_no
)
Parameters
Notes
Use the status query only in the SSI mode "single shot". In the mode
"continuous" querying the status is not useful.
See also
,
,
Valid for
Gold II-CNT
Example
Rem Please select the appropriate include for ADbasic /
TiCoBasic
#Include
ADwinGoldII.inc / GoldIITiCo.inc
Rem Both decoders run with 100 kHz
Init:
SSI_Set_Clock
(
1
,
250
)
'clock rate for decoder 1
SSI_Set_Clock
(
2
,
250
)
'clock rate for decoder 2
SSI_Mode
(
0
)
'Set single shot-mode (all
'counters)
SSI_Set_Bits
(
1
,
23
)
'23 encoder bits for encoder 1
SSI_Set_Bits
(
2
,
23
)
'23 encoder bits for encoder 2
Event:
SSI_Start
(
11b
)
'Read position value of encoders
'1 & 2
Do
'For encoder 1:
Until
(
SSI_Status
(
1
)
=
0
)
'If position value is completely
'read, then …
Par_1
=
SSI_Read
(
1
)
'Read out and display position
'value
Do
'For encoder 2:
Until
(
SSI_Status
(
2
)
=
0
)
'If position value is completely
'read, then …
Par_3
=
SSI_Read
(
2
)
'Read out and display position
'value
T11 TiCo
dcdr_no
Number (1…4) of the SSI decoder whose status is
to be queried.
LONG
ret_val
Read-status of the decoder:
0: Decoder is ready, that is a complete value was
has been read.
1: Decoder is reading an encoder value.
LONG