Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Controls Guy on September 22, 2023, 02:34:05 PM

Title: Reading installed I/O from program
Post by: Controls Guy on September 22, 2023, 02:34:05 PM
I have a program that has Modbus remote I/O configured and can be used with either native (local) I/O or the Modbus distributed I/O with no program mod or configuration.    I solve the logic to Y32-Ynnn and use that as the source for the Modbus slave devices.    Whichever is hooked up gets the the data and the program doesn't care.   Now I want to do something if and only if I'm using Modbus slaves but I'd like not to have anything to have to configure in the program so I don't forget to do it while commissioning (Old timer's disease).   Is there a way for the program to read what I/O is installed locally, so if not I can do the thing?
Title: Re: Reading installed I/O from program
Post by: franji1 on September 22, 2023, 03:38:07 PM
HWINFO can read a base/slot's module ID.  I/O counts too.  Coming soon, I/O addresses.
Title: Re: Reading installed I/O from program
Post by: Controls Guy on September 22, 2023, 04:04:20 PM
Awesome, thx!    I was also thinking of looking for no change in .XferCount on the relevant MTCP I/O node, but only enabling the watchdog for that on having .XferCount be >50 or something.   At native sites, .XferCount should be 0, so it would disable the watchdog.