MPI 04.00 Reference >> mpiMotor

MPIMotorFeedbackSsiConfig

Definition

typedef struct MPIMotorFeedbackSsiConfig {
MPIMotorSsiInput input;
long bitCount;
long baudRate; /* units = hertz */
MPI_BOOL brokenWireEnable;
} MPIMotorFeedbackSsiConfig;

 

Required Header: stdmpi.h

Change History: Modified in 04.00 (formerly MPIMotorEncoderSsiConfig). Added in 04.00.

Description

MPIMotorFeedbackSsiConfig contains configurations for SSI (Synchronous-Serial Interface) feedback devices. Use this structure to configure the SSI when the MPIMotorFeedbackType is configured for MPIMotorEncoderTypeSSI. Be sure to verify that the SynqNet node FPGA supports SSI feedback devices. See the Node FPGA Images: Features Table.

input Source pin for the serial input from the SSI feedback device.
bitCount Resolution in bits for the SSI feedback device. The valid range is 1 to 32 bits.
baudRate Serial communication rate in bits per second. The valid range is 10000 to 500000.
brokenWireEnable Enable (TRUE) or disable (FALSE) broken wire detection.

Sample Code

Configure the motor’s primary feedback for an SSI device by using general purpose bit #0 to drive the clock output at 500 kHz. The serial input is decoded via the encoder input channel A.

returnValue = 
mpiMotorConfigGet(motor, 
                  NULL, 
                  &motorConfig);
                  motorConfig.Encoder[0].type = MPIMotorEncoderTypeSSI;
                  motorConfig.Encoder[0].ssiConfig.baudRate = 500000; /* 500 KHZ */
                  motorConfig.Encoder[0].ssiConfig.bitCount = 32;
                  motorConfig.Encoder[0].ssiConfig.input = MPIMotorSsiInputENC_A;
                  motorConfig.Encoder[0].ssiConfig.brokenWireEnable = TRUE; &motorConfig);

See Also

MPIMotorSsiInput | MPIMotorFeedbackType | mpiMotorConfigSet | mpiMotorConfigGet