Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Henryp on August 28, 2017, 06:14:04 PM

Title: Using the Modbus protocol how do I read if a DM is in run mode?
Post by: Henryp on August 28, 2017, 06:14:04 PM
I have a rung of code looking to see if DST10 is equal to 3 which turns on a Modbus output coil. However when I place the DM in program mode the Modbus coil remains on. I assume it is because the ladder is no longer running. So how do I read if a DM is in run mode?

Title: Re: Using the Modbus protocol how do I read if a DM is in run mode?
Post by: BobO on August 28, 2017, 06:40:00 PM
You can use the $LastScan block to execute code as the PLC is going to program mode.
Title: Re: Using the Modbus protocol how do I read if a DM is in run mode?
Post by: Controls Guy on August 28, 2017, 07:27:37 PM
You can also look at a clock bit and see if it keeps toggling.