Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions resources/sources/Baremetal/Baremetal.ino
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,9 @@ void modbusTask()
//Read changes from clients
mbtask();

//Write changes back to OpenPLC Buffers
for (int i = 0; i < MAX_DIGITAL_OUTPUT; i++)
{
if (bool_output[i/8][i%8] != NULL)
{
*bool_output[i/8][i%8] = get_discrete(i, COILS);
}
}
// Do not mirror coil values back into mapped digital outputs.
// For located outputs (e.g. %QX0.0), debugger forcing updates the PLC variable
// directly. Copying COILS back here overwrites that value on every cycle.
for (int i = 0; i < MAX_ANALOG_OUTPUT; i++)
{
if (int_output[i] != NULL)
Expand Down