Compare commits

..

No commits in common. "4273fcd70b9b52e49f7607fe2291d192354df04d" and "bb4a20650704c61c75de2bd9a48c36c0b1b27b9b" have entirely different histories.

3 changed files with 9 additions and 15 deletions

View File

@ -153,7 +153,7 @@ private:
telegram::EcatTelegram& telegram = ecat_buffer_.get_ecat().get_telegram(); telegram::EcatTelegram& telegram = ecat_buffer_.get_ecat().get_telegram();
ecat_buffer::FMMUGlobalProperties& fmmu_global_properties = ecat_buffer_.get_fmmu_global_properties(); ecat_buffer::FMMUGlobalProperties& fmmu_global_properties = ecat_buffer_.get_fmmu_global_properties();
address::Logical logical = fmmu_global_properties.logical_start_address + offset; address::Logical logical = fmmu_global_properties.logical_start_address + offset;
const datagram::TEcatWkc expected_wkc = pdo_fmmu_slaves_.size(); const datagram::TEcatWkc expected_wkc = 1;
TDatagram datagram{ {{logical}}, expected_wkc, data... }; TDatagram datagram{ {{logical}}, expected_wkc, data... };
return telegram.transfer(datagram); return telegram.transfer(datagram);
@ -166,7 +166,7 @@ private:
telegram::EcatTelegram& telegram = ecat_buffer_.get_ecat().get_telegram(); telegram::EcatTelegram& telegram = ecat_buffer_.get_ecat().get_telegram();
ecat_buffer::FMMUGlobalProperties& fmmu_global_properties = ecat_buffer_.get_fmmu_global_properties(); ecat_buffer::FMMUGlobalProperties& fmmu_global_properties = ecat_buffer_.get_fmmu_global_properties();
address::Logical logical = fmmu_global_properties.logical_start_address + fmmu_global_properties.logical_full_length_write + offset; address::Logical logical = fmmu_global_properties.logical_start_address + fmmu_global_properties.logical_full_length_write + offset;
const datagram::TEcatWkc expected_wkc = pdo_fmmu_slaves_.size(); const datagram::TEcatWkc expected_wkc = 1;
TDatagram datagram{ {{logical}}, expected_wkc, data... }; TDatagram datagram{ {{logical}}, expected_wkc, data... };
return telegram.transfer(datagram); return telegram.transfer(datagram);

View File

@ -119,7 +119,7 @@ bool EcatTelegram::transfer() {
status_.attempts_exceeded_errors++; status_.attempts_exceeded_errors++;
status_.result = EcatTelegramResult::FATAL_ERROR; status_.result = EcatTelegramResult::FATAL_ERROR;
DebugP_log((char*)"%s: %d\r\n", status_.get_description().string, status_.attempts_exceeded_errors); DebugP_log((char*)"%s\r\n", status_.get_description().string);
break; break;
} }
@ -131,8 +131,6 @@ bool EcatTelegram::transfer() {
status_.transfer_errors++; status_.transfer_errors++;
status_.result = EcatTelegramResult::WARNING_TRANSFER_ERROR; status_.result = EcatTelegramResult::WARNING_TRANSFER_ERROR;
//DebugP_log((char*)"%s: %d\r\n", status_.get_description().string, status_.transfer_errors);
continue; continue;
} }
@ -140,8 +138,6 @@ bool EcatTelegram::transfer() {
status_.transfer_errors++; status_.transfer_errors++;
status_.result = EcatTelegramResult::WARNING_TIMEOUT_ERROR; status_.result = EcatTelegramResult::WARNING_TIMEOUT_ERROR;
//DebugP_log((char*)"%s: %d\r\n", status_.get_description().string, status_.transfer_errors);
continue; continue;
} }
@ -151,8 +147,6 @@ bool EcatTelegram::transfer() {
status_.expected_wkc_errors++; status_.expected_wkc_errors++;
status_.result = EcatTelegramResult::WARNING_WKC_ERROR; status_.result = EcatTelegramResult::WARNING_WKC_ERROR;
//DebugP_log((char*)"%s: %d\r\n", status_.get_description().string, status_.expected_wkc_errors);
continue; continue;
} }

View File

@ -31,9 +31,9 @@ struct EcatDescription {
}; };
struct EcatTelegramStatus { struct EcatTelegramStatus {
uint16_t transfer_errors{0x0000}; uint16_t transfer_errors;
uint16_t expected_wkc_errors{0x0000}; uint16_t expected_wkc_errors;
uint16_t attempts_exceeded_errors{0x0000}; uint16_t attempts_exceeded_errors;
EcatTelegramResult result = EcatTelegramResult::BUSY; EcatTelegramResult result = EcatTelegramResult::BUSY;
const EcatDescription& get_description() { const EcatDescription& get_description() {
@ -74,8 +74,8 @@ public:
bool transfer(queue::Queue<datagram::IEcatDatagram>& next); bool transfer(queue::Queue<datagram::IEcatDatagram>& next);
private: private:
static constexpr uint32_t connection_timeout_ticks_ = 50; static constexpr uint32_t connection_timeout_ticks_ = 2;
static constexpr uint32_t max_transfer_attempts_ = 2; static constexpr uint32_t max_transfer_attempts_ = 3;
Eth& eth_; Eth& eth_;
EthTxFlowIface& tx_flow_; EthTxFlowIface& tx_flow_;
@ -87,7 +87,7 @@ private:
queue::Queue<datagram::IEcatDatagram> datagram_queue_; queue::Queue<datagram::IEcatDatagram> datagram_queue_;
//datagram::IEcatDatagram *datagram_queue_{nullptr}; //datagram::IEcatDatagram *datagram_queue_{nullptr};
EcatTelegramStatus status_{0x0000, 0x0000, 0x0000, EcatTelegramResult::BUSY}; EcatTelegramStatus status_;
bool transfer(); bool transfer();