Skip to content
Snippets Groups Projects
Commit f4987217 authored by kochalas's avatar kochalas Committed by al.schwinn
Browse files

[SIL-357] Modify the communication library to support the changes to the

diagnostic tool
parent 7460e237
No related branches found
No related tags found
No related merge requests found
...@@ -379,8 +379,6 @@ int MBConnection::writeBits(PLC *thePLC, long address, unsigned long offset, uns ...@@ -379,8 +379,6 @@ int MBConnection::writeBits(PLC *thePLC, long address, unsigned long offset, uns
// connection is established then send data // connection is established then send data
writeLock(); writeLock();
std::cout << "Address: " << address << "\n";
// addr is a byte address, therefore we don't need to convert to a word address // addr is a byte address, therefore we don't need to convert to a word address
// However, we need to calculate the coil address from the register address // However, we need to calculate the coil address from the register address
long addr = (address - thePLC->getDOBaseAddress()) + offset; long addr = (address - thePLC->getDOBaseAddress()) + offset;
...@@ -391,8 +389,7 @@ int MBConnection::writeBits(PLC *thePLC, long address, unsigned long offset, uns ...@@ -391,8 +389,7 @@ int MBConnection::writeBits(PLC *thePLC, long address, unsigned long offset, uns
// DATA topic makes sense with SEND one // DATA topic makes sense with SEND one
if (SEND & Log::topics_) if (SEND & Log::topics_)
LOG(DATA) << "Write data, address: %MB" << addr / 8 << ", byte-size: " << size << "PLC DO base offset: " << thePLC->getDOBaseAddress(); LOG(DATA) << "Write data, address: %MB" << addr / 8 << ", byte-size: " << size;
err = writeCoils(writeCtx_, (unsigned short)addr, (unsigned short)size, pBuffer); err = writeCoils(writeCtx_, (unsigned short)addr, (unsigned short)size, pBuffer);
checkError(thePLC, err, false); // close the connection, will try again checkError(thePLC, err, false); // close the connection, will try again
// at the next access // at the next access
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment