Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: RBPLC on March 09, 2022, 02:40:51 PM

Title: MSREGWR Run Every Scan
Post by: RBPLC on March 09, 2022, 02:40:51 PM
What's the feasibility of adding the option to allow MSREGWR to run every scan instead of edge triggered only?
Title: Re: MSREGWR Run Every Scan
Post by: franji1 on March 09, 2022, 02:52:33 PM
What's the feasibility of adding the option to allow MSREGWR to run every scan instead of edge triggered only?
MRX/MWX already has all the flexibility you "need".  But the whole purpose of the Modbus I/O Scanner was to take care of doing all of that "polling" from a single configuration (vs. a bunch of MRX/MWX logic), then doing exceptions using MSREGRD/MSREGWR.

If you truly need it to be polled every scan, make it part of the Modbus I/O Scanner.  That's what it's for.
Title: Re: MSREGWR Run Every Scan
Post by: RBPLC on March 09, 2022, 03:44:17 PM
Let me pose a use case and you guys tell me a better way to deal with the issue.

I can see the Modbus Scanner being extremely useful. One issue I'm seeing is in attempting to use the scanner with a slave device that sometimes you would like to be able to locally control in a non-slave mode. If the writes are set up in the scanner, any local edits made to the device are immediately overwritten by the scanner utility. I agree, using the MSREGWR or the MWX is not ideal (as the scanner is meant to "just handle") the comms. What I'm looking for is a way to start and/or stop and/or one-shot the write portion when desired. 
Title: Re: MSREGWR Run Every Scan
Post by: franji1 on March 09, 2022, 04:20:11 PM
Look at the specific Modbus Scanner Structure Heap Item and look at the .EnableWrites bit.

I think that's what you want.
Title: Re: MSREGWR Run Every Scan
Post by: RBPLC on March 10, 2022, 08:07:01 AM
.EnableWrites is what I was looking for. Obviously I forgot to check the scanner heap.
Title: Re: MSREGWR Run Every Scan
Post by: franji1 on March 10, 2022, 09:10:25 AM
Attached is a screen shot of all the fields in a Modbus Scanner Device.  They also show up in the Modbus Scanner Monitor tool (under the Debug menu).  The Help topic DMD0493 Modbus I/O Scanner Configuration talks about those fields.
Title: Re: MSREGWR Run Every Scan
Post by: Controls Guy on March 10, 2022, 05:23:22 PM
I like that the status display is editable -- enabling and disabling reads and writes, shortcut to edit the device, etc.   Useful for debugging the comms.