Tunnel – Output Configuration parameters: “OUTPUT_”

¿Buscas alguna otra cosa?

All models of MTX modems have outputs, be it digital or via relays. By using OUTPUT_ parameters you will be able to control them easily. For example, you will be able to switch a relay following a programmed schedule, in function of the value of an analog input, in function of the reading of a record from a modbus device etc.

Also, OUTPUT_ parameters allow you, indirectly, to program some alarms via SMS. For example, you will be able to request an SMS message to be sent when the value of an analog input or the value of a MODBUS record is higher or lower than a certain value.

These configuration parameters OUTPUT_ are available from version MTX-Tunnel v7.21.

OUTPUT_mode1, OUTPUT_mode2, OUTPUT_mode3, OUTPUT_mode4

Description: MTX-Tunnel allows you to set up to four outputs for an MTX device. Not all MTX modems have the same number of outputs.

Possible values:

  • manual, on, off, time, analog, modbus, call, astronomical, socket
  • Default value: manual

Additional notes:

  • Description of all possible values:
    • manual: is the behaviour that the outputs from MTX devices had until version MTX-Tunnel v7.20. Using the “manual” mode you can change the status of a digital output/relay via an SMS, via webserver or Telnet.
    • on: specifying an output to “on” mode, this will be permanently activated (for example, a permanently switched relay).
    • off: specifying an output to “off” mode, this will be permanently de-activated (for example, a permanently no switched relay).
    • time: specifying an output to “time” mode, you will be able to specify an activation/ de-activation schedule for a digital output/relay.
    • analog: specifying an output to “analog” mode, you will be able to specify a maximum and a minimum value for an analog input from which a digital output/relay must be activated. Also, among other uses, you will be able to send an alarm SMS message when the value read is higher or lower than a specific analog value.
    • modbus: specifying an output to “modbus” mode, you will be able to specify the maximum and minimum values of the record from a modbus device from which a digital output/relay must be activated. Also, among other uses, you will be able to send an alarm SMS message when the value read is higher or lower than a specific modbus record.
    • call: specifying an output to “call” mode, you will be able to activate for 2 seconds a certain digital output/relay when there is a digital call from a phone number (very useful for scenarios like automatic door opening, creating resets to external devices…).
    • astronomical: specifying an output to “astronomical” mode, you will be able to activate/deactivate a specific digital output/relay depending on the Sun. The MTX-Tunnel, given the GPS position with the parameters MTX_latitude and MTX_longitude, can calculate for any point on the Earth and for every day, the sunrise and sunset times. It is possible to activate an MTX output at sunrise/sunset and even assign a configurable differential for these times.
    • socket: specifying an output to “socket” mode, you will be able to activate/de-activate a specific digital output/relay depending on socket status (connected / disconnected). Timer: This allows the command AT^MTXTUNNEL=SETOUTPUTTIMER to be used. This command allows a relay to be changed for a few seconds by a single AT command, be it sent via SMS, Telnet, etc.
    • Bitcoin: this allows a digital output or relay to be activated according to whether a transfer is made into an account using Bitcoin.

OUTPUT_config1, OUTPUT_config2, OUTPUT_config3, OUTPUT_config4

Description: By entering these parameters you can configure the behaviour of up to 4 outputs of an MTX modem. It is a complex parameter.

The structure of an OUTPUT_configX parameter depends on the mode specified in OUTPUT_modeX; that is, the configuration of OUTPUT_configX will be different if you are configuring an output that depends on the status of an analog value (OUTPUT_modeX: analog) or one depending on a modbus record (OUTPUT_modeX: modbus), etc.

Possible values:

  • Default values.: none

 

  •  If the value specified in OUTPUT_modeX is “manual”, “on”, “off” or “call” this OUTPUT_configX parameter is useless, as it does not make sense. Its use is compulsory if values like “time”, “analog” or “modbus” are specified in OUTPUT_modeX
  • If the value specified in OUTPUT_modeX is “time”, the parameter OUTPUT_configX must have the following structure:
    HH;MM;HH;MM
    This indicates the time (hour and minutes) of the digital output/relay activation and deactivation. For example, if you want to activate output 3 at 20.30 pm and deactivate it at 07.15 am, the value of the parameter in the set up file “config.txt” should be: OUTPUT_config3: 20;30;07;15
  • If the value specified in OUTPUT_modeX is “analog”, the parameter OUTPUT_configX must have the following structure:
    ID;ValueMax;ValueMin;ATCommandMax;ATCommandMin
    Where:
    ID: 0… 1 (can have the values 0 or 1, 0 if you want to read the dac0 value or 1 if you want to read the dac1)
    ValueMax: 0… 2400 (is the maximum value of the digital analog converter (dac) from which the digital output/relay must be activated)
    ValueMin: 0… 2400 (is the minimum value of the digital analog converter (dac) from which the digital output/relay must be deactivated)
    ATCommandMax: AT command to be executed (MTX-Tunnel allows you to execute an optional AT command when the dac value is equal to or higher than the indicated in ValueMax)
    ATCommandMin: AT command to be executed (MTX-Tunnel allows you to execute an optional AT command when the dac value is equal to or lower than the indicated in ValueMin)
    For example, if you want to activate the output3 relay when the value read by the digital analog converter “0” is higher than 2000 and deactivate it when it is lower than 1800, and you do not want to execute an AT command, the value to specify in the parameter would be:
    OUTPUT_config3: 0,2000;1800;;
  • If the value specified in OUTPUT_modeX is “modbus”, the parameter OUTPUT_configX must have the following structure:
    dir;command;record;valueMax;valueMin;ATCommandMax;ATCommandMin
    Where:
    dir: 1… 254 (indicates the modbus address of the device to be read)
    command: 3, 4 (allows you to specify if the modbus command is 3 or 4)
    record: 1…65535 (allows you to specify the number of modbus record to be read)
    ValueMax: 0… 65535 (is the maximum value of the modbus record from which the digital output/relay must be activated)
    ValueMin: 0… 65535 (is the minimum value of the modbus record from which the digital output/relay must be deactivated)
    ATCommandMax: AT command to execute (MTX-Tunnel allows you to execute an optional AT command when the value of the modbus records is equal to or higher than the value indicated in ValueMax)
    ATCommandMin: AT command to execute (MTX-Tunnel allows you to execute an optional AT command when the value of the modbus records is equal to or lower than the value indicated in ValueMin)
    For example, if you intend for the output 3 relay on MTX-IND to be activated when the value of record number100 of the modbus address 7 (whose modbus read command is 3) is equal to or higher than 2000 and to deactivate it when it is equal to or lower than 1800, and to also send an SMS alarm message ( “alarma mtx”) when the value is equal to or lower than 1800, then the value to specify in the parameter would be:
    OUTPUT_config3: 100;7;3;100;2000;1800;;AT^MTXTUNNEL=SMS,666123456,alarma mtx
  • If the specified value in OUTPUT_modeX is “call”, the parameter OUTPUT_configX must not be included in the set up file.
  • If the specified value in OUTPUT_modeX is “astronomical”, the parameterOUTPUT_configX must have the following structure:
    minutesSunset, minutesSunrise
    Where:
    minutesSunrise: -120… 120 (allows you to indicate a time offset so the output/relay is deactivated X minutes before or after the sunrise)
    minutesSunset: -120… 120 (allows you to indicate a time offset so the output/relay is activated X minutes before or after the sunset.
  • If the value specified in OUTPUT_modeX is “bitcoin”, the OUTPUT_configX parameter must have the following structure:
    pagoMinimo, tiempoPagoMinimo, tiempoProporcionalPago, tiempoMaximo
    Where:
    pagoMinimo: 0.001… 1.000 (Allows to indicate the minimum payment in Bitcoins to activate the relay)
    tiempoPagoMinimo: 1… 86400 (It indicates the time (in seconds) that a digital output / relay must remain activated when the minimum payment is received)
    tiempoProporcionalPago: 0 (no), 1 (yes) (Allows to indicate if we allow the time to be proportional to the payment. That is, if, for example, a payment of twice the minimum payment is made, the activation time is also double)
    tiempoMáximo: 1… 86400 (Allows to indicate the maximum time that the digital output/relay can be activated regardless of the payment received)

Additional notes:

  • It is a complex parameter, we recommend you check the examples in Annex 8 to understand it better
  • Please note that you can add the possibility of executing AT commands, as well as activating/ deactivating a digital output or relay. This will allow you, for example, to send an SMS text message to change the record of a modbus device, etc. when reading a certain analog value or modbus record
  • The outputs update period is 15 seconds. That is, every 15 seconds the MTX-Tunnel checks the time, reads the a/d converters, reads the modbus records and activates/deactivates the corresponding outputs
  • Remember that the MTX-Tunnel is using UTC. That means that when specifying a schedule for the digital outputs/relays, you must specify the corresponding UTC time