Valdiate bit index of ethercat entries
This commit is contained in:
@@ -290,6 +290,10 @@ void ecmcSS1SafetyGroup::connectToDataSources() {
|
||||
throw std::runtime_error( "Safety: EtherCAT entry for rampdown I/O NULL.");
|
||||
}
|
||||
|
||||
if(bitRampDown_ >= ecEntryRampDown_->getBits()) {
|
||||
throw std::runtime_error( "Safety: Bit out of range for rampdown ethercat entry.");
|
||||
}
|
||||
|
||||
// standstill
|
||||
slave = ecMaster_->findSlave(slaveIdStandStill_);
|
||||
if(!slave) {
|
||||
@@ -301,6 +305,9 @@ void ecmcSS1SafetyGroup::connectToDataSources() {
|
||||
throw std::runtime_error( "Safety: EtherCAT entry for standstill I/O NULL.");
|
||||
};
|
||||
|
||||
if(bitStandStill_ >= ecEntryStandstill_->getBits()) {
|
||||
throw std::runtime_error( "Safety: Bit out of range for standstill ethercat entry.");
|
||||
}
|
||||
|
||||
// Limit velo
|
||||
if( limitMaxVeloEnable_ ) {
|
||||
@@ -313,6 +320,10 @@ void ecmcSS1SafetyGroup::connectToDataSources() {
|
||||
if(!ecEntryLimitVelo_) {
|
||||
throw std::runtime_error( "Safety: EtherCAT entry for limit velo I/O NULL.");
|
||||
};
|
||||
|
||||
if(bitLimitVelo_ >= ecEntryLimitVelo_->getBits()) {
|
||||
throw std::runtime_error( "Safety: Bit out of range for limit velo ethercat entry.");
|
||||
}
|
||||
}
|
||||
dataSourcesLinked_ = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user