Today is...
Sunday, December 16, 2018
Welcome to the Modbus Community, about
the world's leading automation protocol.
Difficulties Getting KL2404 To Work
Beckhoff KL2404 is not responding to Write Multiple Coils

Greetings everyone,

I have a BK9100 with a KL1404 and a KL2404 modules. I am using modbus to communicate with them.

I use Read Discrete Inputs to get input from the KL1404, and that works every time.

When I try Write Single Coil and Write Multiple Coils, I have only ever gotten the KL2404 to do anything exactly twice. The two times I have gotten it to work, I use Write Multiple Coils passing 8 bits to address zero. I have repeated this hundreds of times, trying every possible combination I can think of, but I cannot (usually) get anything to happen.

Why it worked twice is beyond me. Is this common? Does anyone know the exact modbus output that should work on a KL2404?

Is it possible that the device is damaged? It is brand new.

thank you
Jim

I assume you mean Beckhoff modules? have you tried using modscan or another emulator to read or write directly to the module?

Thanks for the tip. I downloaded ModScan64, connected, and then could set a coil once. The output LED would glow for about 1 second and then go out.

After the first time I get ** MODBUS Exception Response from Slave Device **

I could repeat the process by unplugging the power supply and plugging it in again...works every time, but I still can only set 1 coil once.

It is interesting that I can close ModScan and reopen it, and it will remember the coil status values...presumably the device remembers the coil status values, but the device won't stay on and after the first will generate the error.

Is there some other command I need to send to the Beckhoff, in between setting coils?

thank you