Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Controls Guy on August 08, 2022, 04:34:12 PM

Title: Modbus I/O Scanner Configuration
Post by: Controls Guy 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?
Title: Re: Modbus I/O Scanner Configuration
Post by: franji1 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.
Title: Re: Modbus I/O Scanner Configuration
Post by: Controls Guy 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?
Title: Re: Modbus I/O Scanner Configuration
Post by: franji1 on August 08, 2022, 05:11:43 PM
Duped it - we can look at it.
Title: Re: Modbus I/O Scanner Configuration
Post by: Controls Guy 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?