News:

  • October 13, 2025, 11:26:57 AM

Login with username, password and session length

Author Topic: Modbus I/O Scanner Configuration  (Read 1859 times)

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Modbus I/O Scanner Configuration
« on: August 08, 2022, 04:34:12 PM »
I set up some Modbus/TCP remote I/O with the I/O scanner, and want to map 96 outputs starting from Y32 to the remote I/O.   If I'm configured for raw copy, DMD won't let me enter Y32:SD or SW or UW as the data source.   In single register mode I can, but then I only get Y32-Y47 sent to the remote.    DMD says that the data source isn't signed/unsigned WORD/DWORD, which all those casts definitely are, so I don't know why the scanner config won't accept them.

Obviously I can break it up into multiple writes, write to an acceptable buffer first, or just use an MWX (which does work), but seems like it would be a lot cleaner if I can just pipe the Y's directly to the scanner.   Is there a way?
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3761
    • Host Engineering
Re: Modbus I/O Scanner Configuration
« Reply #1 on: August 08, 2022, 04:46:38 PM »
If it's multi-coil read/write FC, just enter Y32.  That's a bit FC, not a register FC, so the # of bits does not have to be byte/word/dword aligned, nor be multiples of 8/16/32 (unless the remote device has limitations on this, which some do).  It should handle 96 bits.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Re: Modbus I/O Scanner Configuration
« Reply #2 on: August 08, 2022, 04:49:19 PM »
If it's multi-coil read/write FC, just enter Y32.  That's a bit FC, not a register FC, so the # of bits does not have to be byte/word/dword aligned, nor be multiples of 8/16/32 (unless the remote device has limitations on this, which some do).  It should handle 96 bits.

Yeah, but it's not a coil write.   The starting register for the outputs is 412289.

Update:  OK, there's a 0xxxx register range that hits the same outputs, and if you use that and just use Y32 as the source, all is good!  Thanks!

Is there a reason casts of Yxx can't be the source for register writes?
« Last Edit: August 08, 2022, 05:02:33 PM by Controls Guy »
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3761
    • Host Engineering
Re: Modbus I/O Scanner Configuration
« Reply #3 on: August 08, 2022, 05:11:43 PM »
Duped it - we can look at it.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Re: Modbus I/O Scanner Configuration
« Reply #4 on: August 31, 2022, 05:08:10 PM »
I have a standard application involving two BRX, one MWXing and MRXing to the other.    Is there any advantage (other than reads continuing) to convert that to MBS scanner comms?
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.