ThingWorx Edge ADO Service > Configuring the ADO Service > How to Configure Duty Cycle Modulation
  
How to Configure Duty Cycle Modulation
Duty Cycle Modulation is the ability for an ADO service to regulate time connected to the ThingWorx platform. Periodically, the service checks to see if it is above or below its threshold for connections (a percentage), and connects to or disconnects from the platform accordingly. Duty Cycle Modulation is useful when conservation of power and resources is important.
* 
When a disconnect is initiated, pending requests are not terminated. The ADO service waits for pending requests to finish. If any pending requests remain active after 40 seconds, the disconnect is executed forcibly.
If the ADO service should only be connected to the ThingWorx platform occasionally, you can set up duty cycle modulation to control the time that it stays connected. There are two parameters that you can set in the DutyCycleSettings element:
1. Period specifies the time that the duty cycle modulated connection is on. Type a number of milliseconds for this parameter. The default value of 0 means that the connection always stays alive. It is recommended that you set this value to be greater than 10 seconds (10000 milliseconds).
2. DutyCycle specifies the percentage of time in the duty cycle period to maintain a connection to the platform. The default value is 100 percent, which means that the connection is always alive..
For example, a DutyCycle of 40 percent and a Period of 400 seconds results in the ADO service being connected to the platform for the first 160 seconds of each 400 second duty cycle (0.4 * 400 = 160).
These parameters are also described in the table for duty cycle configuration, in the topic, Reference for Configuration Parameters.
Forcing a Connection
If the ADO service will be offline for significant periods of time, you may want to take advantage of the support for forcing a connection to be established for the following operations:
Invoking a service — controlled by the ForceConnectOnInvokeService.
Reading a value of a property from the ThingWorx platform — controlled by the ForceConnectOnReadProperty parameter.
Writing a value to a property that exists on the platform — controlled by the ForceConnectOnWriteProperty parameter.
To force a connection for any or all of these operations, set one or more of the following parameters to true in the ConnectionSettings element:
"ForceConnectOnReadProperty": false,
"ForceConnectOnWriteProperty": false,
"ForceConnectOnInvokeService": false,
These three parameters are also described in the table called Connection Settings, in the topic, Reference for Configuration Parameters.
What’s Next?
Before you start the service, configure the ADO service to run as a Windows service, as explained in the next section, .