
SM-Applications Modules & Motion Processors User Guide
103
Issue Number: 4
S
Info
rm
In
Inst
al
G
Pa
ra
DP
L
Pr
Communica
F
CT
S
In
Sy
nc
D
Mi
Q
Ind
ex
9.6.2
Example Slave code
The following code shows how the slave(s) would read the reference data generated by
the Virtual Master.
Initial
{
#81.06=26 //CTSync Slave
#81.12=2 //Pos task at 500us
REINIT
//Set up Virtual Master Ramp Reference.
Ramp% = 0
//Configure Slave output channel 1 to menu 18, parameter 11.
CTSYNCSetupOutputChannel(1,18,11)
//Enable the configured output channel.
CTSYNCEnableOutputChannel(1)
}
POS0
{
//Perform Slave function first, so timing is identical between master and slave:
(Slaveref1%,Slaveref2%,Auxref%, Status%) = CTSYNCGetSlaveReferences()
// Check the data was received in good order.
if Status% = USR_VALUE_OK then
//Output to the drive at the start of next motion period.
CTSYNCWriteOutputChannel(1,Slaveref1%)
endif
}
Summary of Contents for Digitax ST Indexer
Page 131: ......
Page 132: ...0471 0062 04...