# Modbus device does not support function 01

**URL:** <https://forum.inductiveautomation.com/t/modbus-device-does-not-support-function-01/96651>\
**Category:** Ignition\
**Created:** [October 1, 2024, 9:48am UTC](https://forum.inductiveautomation.com/t/modbus-device-does-not-support-function-01/96651 "2024-10-01T09:48:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Remco\_Geervliet](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Remco\_Geervliet](https://forum.inductiveautomation.com/u/Remco_Geervliet)\
**Post date:** [October 1, 2024, 9:48am UTC](https://forum.inductiveautomation.com/t/modbus-device-does-not-support-function-01/96651/1 "2024-10-01T09:48:16Z")

</div>

Could use some help debugging what's going on here. I've tried changing some advanced settings as described [here.](https://forum.inductiveautomation.com/t/modbus-exceptioncode-0x01-illegalfunction/14039/22)

It's all airgapped so screenshots are difficult. Posting from my phone so excuse my sausage-finger-typo's.

I'm trying to write coils. The PLC-programmer has tested their modbus accessibility with the following string;  
`01 05 00 00 FF 00`  
This should enable coil one.  
When I use a PLC-tag with `[device]1.C0` I expect the same string (or at least one with some resemblance) to be sent. Instead the logger shows I'm sending the following commandstring;  
`01 5A 00 00 00 06 01 01 00 00 00 01`  
Changing the source of the tag to `1.C1` the commandstring changes to;  
`01 5A 00 00 00 06 01 01 00 01 00 01`

This has helped me understand _some_ of what's going on, but what I don't understand is why the part of the commandstring that appears to be the read-request (from 06 onwards) doesn't start with 05. [According to the documentation](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/opc-ua/opc-ua-drivers/modbus/connecting-to-modbus-device) I'm sending requests to read a register instead of a coil?

As mentioned I've tried to change some of the settings to try and get it to access single coils, but no success so far. Any pointers in the right direction would be appreciated.

After some more tinkering:  
`01 01 00 01 00 01` is actually the command-part. `01` for device 1, `01` for read coil, `00 01` is the coil address, and I'm assuming `00 01` is some sort of delimiter as it hasn't changed so far.

I'm starting to question my sanity, everything seems to be correct - yet the response is something's incorrect?

Final edit!

I've changed the title as well. Turns out the Omron PLC in question **does not support modbus function 01**. This means Ignition can't read the coil and gives the "bad" status. It is possible to write (using a modbus-tester), but afaik if Ignition deems the tag to be "bad" it won't write? Or at least will keep spamming the log with failed read-requests.

Is there an accepted work-around? Currently I'm thinking of moving the writable bits back to the HR, but the PLC also doesn't support overwriting single bits in the HR. This means we'd have to (re-)calculate the whole int for every read/write operation. This is obviously not ideal, but currently looks to be the only functional solution.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 1, 2024, 12:22pm UTC](https://forum.inductiveautomation.com/t/modbus-device-does-not-support-function-01/96651/2 "2024-10-01T12:22:18Z")

</div>

Try writing with `system.opc.writeValue()` instead of setting up a tag. OPC tags must be readable. Write-only addresses must bypass the tag system to write directly through OPC.

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [October 1, 2024, 2:09pm UTC](https://forum.inductiveautomation.com/t/modbus-device-does-not-support-function-01/96651/3 "2024-10-01T14:09:07Z")

</div>

I haven't had to use this, but do you know if one were to set up an OPC tag with a tag group set to not poll (0ms for the rate), could you write to it and get it to function as a write-only tag? (I may try this later if I get time)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 1, 2024, 2:11pm UTC](https://forum.inductiveautomation.com/t/modbus-device-does-not-support-function-01/96651/4 "2024-10-01T14:11:35Z")

</div>

Don't know, but I'd not do that anyway. It gives one the impression that the value it holds has meaning.
