How to Generate a Pulse on an IO Line When a Sensor of a Device Triggers?

  • Published In: FAQ
  • Created Date: 2016-07-06
  • Hits: 1297

NetPing devices have built-in IO lines (input-output lines). They can be used both in the «input» mode, and the «output» mode or a «logic output» for controlling external devices. Examples of using IO lines in the mode «output»/«logic output» are as follows:

  • remote rebooting of servers, which is an imitation of pushing a «Reset» button;
  • remote controlling of an alarm, lighting, a ventilator;
  • controlling electric lock, and electric gate at a remote site;
  • controlling the elements of a «smart home»: watering plants, opening / closing blinds, water pump, boiler, electric heaters, etc.;
  • remote controlling of an energy device (diesel generator, gasoline generator)

A proper electric harmonization of IO lines is required while connecting external actuating devices.

IO lines do not have a galvanic isolation with a device! When using relays, which commute 220 V networks, there is a need to remember about electric safety! All works must be done by specialists, who have a corresponding qualification and a permit to work with a given voltage.

In this example, a configuration of generating a short-term pulse on an IO1 line when a specified temperature threshold on a sensor, connected to a NetPing device, is exceeded, will be examined.

Requirements

To implement the example, there is a need to use:

Configuring a NetPing Device

The first step of configuring a system is to connect contacts from IO1 and IO2 lines of a NetPing device. It is necessary for correct operation of logic rules described below. With the use of these rules, a short-term pulse will be generated on an IO1 line when certain events take place.

Connection contacts IO1 and IO2 lines NetPing device

Afterwards, there is a need to connect a temperature sensor to a NetPing device. The information about connecting and configuring a temperature sensor can be browsed in a technical documentation on the page of a device description on the official website.

On the page «DISCRETE INPUT-OUTPUT» of a device web interface configure IO1 and IO2 lines according to the specified settings shown on the screenshot:

Setting IO lines in the web-interface NetPing device

where:

Filter out short noise pulses – is a field for installing time, during which an IO line, configured as «input», must stay stable to register this status. Therefore, this parameter allows filtering out short noise pulses or bouncing of mechanical contacts. On the screenshot, a parameter «Filter out short noise pulses» is set as 10000 ms. It is a delay, which will be used in the example for setting the duration of a pulse on an IO line.

On the page «LOGIC» of a device web interface configure logic rules, which will generate a pulse to an IO1 line of a NetPing device within 10 seconds when a specified temperature threshold on a temperature sensor is exceeded:

Configuring logical rules NetPing device

The first rule of the module «LOGIC» switches a logic level of an IO1 line to the status «logic 1» when a temperature threshold specified in the module «Thermo(Hygro)stat» on the first channel (TSTAT 1) is exceeded.

The second rule of the module «LOGIC» switches a logic level of an IO1 line to the status «logic 0», but with a fixed delay (10 seconds), specified in the settings of an IO2 line on the page «DISCRETE INPUT-OUTPUT» of a device web interface.

After saving logic rules by the button «Apply changes» it is left to configure the module «Thermo(Hygro)stat» on the page «LOGIC» of a web interface by selecting a necessary temperature sensor and indicating a threshold, exceeding which the first rule of the module «LOGIC» will trigger:

Setting the thermostat in NetPing device

Result

As a result of indicated settings, a NetPing device will generate a short-term pulse on an IO1 line within 10 seconds when a specified temperature threshold is exceeded:

NetPing device log


comments powered by Disqus