News:

  • October 14, 2025, 06:28:29 AM

Login with username, password and session length

Author Topic: Modbus Scanner help  (Read 5015 times)

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: Modbus Scanner help
« Reply #15 on: May 12, 2022, 03:52:01 PM »
DOH!  :o

It has already been fixed by someone else. I tested with bugged code, then checked out to fix, which updated with fixed code, making me wonder why it wasn't working...but it was.

So...Prompt has been added, and support for read-only locations for write operations was already there.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Bolt

  • Hero Member
  • *****
  • Posts: 591
Re: Modbus Scanner help
« Reply #16 on: May 13, 2022, 09:29:21 AM »
Well that was a speedy remedy.  Meanwhile, I'm still waiting for a process shutdown to upload my new Modbus Scanner config to the PLC.

Bolt

  • Hero Member
  • *****
  • Posts: 591
Re: Modbus Scanner help
« Reply #17 on: May 13, 2022, 11:43:04 AM »
I'm getting an error message here, can you help me figure out what I'm doing wrong?

I've added a whole bunch of Convert modbus address to local UDT address, many of the Bit type.  Now that I've gotten down to TankChiller.Pump, it will not accept it, saying Local Address + Field Count exceeds local data.  As you can see, I can write to .Call just fine, not limited to the modbus offset.  However, once I try to write to .Pump, it's a no go.  I've tried to do it in a new Scanner device to eliminate the Field count and things like that and it's the same result.

Bolt

  • Hero Member
  • *****
  • Posts: 591
Re: Modbus Scanner help
« Reply #18 on: May 13, 2022, 11:50:56 AM »
Well I simply re-assigned the Bits' UDT memory to dw13:0 and greater, and then it accepted the conversions.  Still strange to me, but it works.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: Modbus Scanner help
« Reply #19 on: May 13, 2022, 11:55:49 AM »
I'm getting an error message here, can you help me figure out what I'm doing wrong?

I've added a whole bunch of Convert modbus address to local UDT address, many of the Bit type.  Now that I've gotten down to TankChiller.Pump, it will not accept it, saying Local Address + Field Count exceeds local data.  As you can see, I can write to .Call just fine, not limited to the modbus offset.  However, once I try to write to .Pump, it's a no go.  I've tried to do it in a new Scanner device to eliminate the Field count and things like that and it's the same result.

I think the error might be the editor getting confused, but do you mean to assign a 16 bit value to a 1 bit value?
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Bolt

  • Hero Member
  • *****
  • Posts: 591
Re: Modbus Scanner help
« Reply #20 on: May 13, 2022, 01:02:35 PM »
Yes, that's correct.  I'm reading all the data from the device as registers.  However, some of the registers are actually boolean, so I'm converting them to a 1 bit UDT item to be more usable in ladder logic, etc.  I used to do this on the fly via a cast (such as V598:0), but I can't cast a structure member, so I'm converting them to bits here in the scanner config, which is cleaner in the end, but quite tedious to setup initially on dozens of bits.

I have it uploaded to the PLC now, so your scanner does successfully convert it all to bits and whatnot.  It also works well in reverse, converting a bit/coil to a write to a register.

I think I'll like this scanner.  It is a lot of work to set up initially, but so is writing it all in ladder code initially.  It's also a pain that any changes have to go through a PLC run mode transition, but that's kinda inherent to the beast here.  Thanks for another cool tool.

Bolt

  • Hero Member
  • *****
  • Posts: 591
Re: Modbus Scanner help
« Reply #21 on: May 19, 2022, 01:01:39 PM »
I've got a little bit more UI feedback for you:

1. It would be nice to be able to do more than 32 Fields per Comm (they go quick when conversions are used for each register), but that may be technical limitation on your end, and it's not hard for me to work around, just cumbersome initially
2. When I click 'Add Field' in a Scanner that has a long list of Comms and Fields, it adds it as it should (after the cursor/selection) but it scrolls the list to the top, causing me to be working "blindly" while editing the Field parameters.  The same kinda applies when 'Remove Field' is used
3. Possibly auto increment the offset/decrement the word count (by total of previous count) when adding Fields after each other?
4. Allow Fields to be moved up and down within the list
5. I'm not a fan of it defaulting to C0/N0 every time I add a Field, I would prefer it to be blank (TANGENT ALERT -> the same applies when using a ladder instruction like MEMCLEAR, it defaults to D0 for count, I'd prefer it to be 1, less chance for overlooking that way, as when I don't put a value in there, I probably mean once only. Conversely, MEMCOPY defaults to count (of 10), not D0 value like MEMCLEAR does)
6. If I edit an existing Scanner, and it prompts for me to update the device profile, somewhere along the way it seems to have lost track of the old profile.  This I have not tried too hard to re-create, and isn't a huge deal to me.  I also don't follow the auto incrementing revision numbering logic it tries to do for me

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: Modbus Scanner help
« Reply #22 on: May 27, 2022, 04:34:04 PM »
I've got a little bit more UI feedback for you:

1. It would be nice to be able to do more than 32 Fields per Comm (they go quick when conversions are used for each register), but that may be technical limitation on your end, and it's not hard for me to work around, just cumbersome initially
2. When I click 'Add Field' in a Scanner that has a long list of Comms and Fields, it adds it as it should (after the cursor/selection) but it scrolls the list to the top, causing me to be working "blindly" while editing the Field parameters.  The same kinda applies when 'Remove Field' is used
3. Possibly auto increment the offset/decrement the word count (by total of previous count) when adding Fields after each other?
4. Allow Fields to be moved up and down within the list
5. I'm not a fan of it defaulting to C0/N0 every time I add a Field, I would prefer it to be blank (TANGENT ALERT -> the same applies when using a ladder instruction like MEMCLEAR, it defaults to D0 for count, I'd prefer it to be 1, less chance for overlooking that way, as when I don't put a value in there, I probably mean once only. Conversely, MEMCOPY defaults to count (of 10), not D0 value like MEMCLEAR does)
6. If I edit an existing Scanner, and it prompts for me to update the device profile, somewhere along the way it seems to have lost track of the old profile.  This I have not tried too hard to re-create, and isn't a huge deal to me.  I also don't follow the auto incrementing revision numbering logic it tries to do for me

Fixed the field being off screen. It really should have worked the way coded, but Windows UI coding frequently has it's own opinions.

Added Move Up and Move Down buttons. They work on both Comms and Fields.

Not all you wanted, but some improvements.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Bolt

  • Hero Member
  • *****
  • Posts: 591
Re: Modbus Scanner help
« Reply #23 on: May 27, 2022, 05:12:01 PM »
Awesome, thanks!