Could use some help debugging what's going on here. I've tried changing some advanced settings as described here.
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 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.