Table of Contents

Advertisement

Quick Links

User manual
myDatalogMUC xG/4G
Cover
Valid from:
Firmware version: 03v002
l
Modem Version: 05v000
l
Server version: 49v011
l
Hardware version: 3.0
l
301102 | Rev.01

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the myDatalogMUC xG/4G and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Microtronics myDatalogMUC xG/4G

  • Page 1 User manual myDatalogMUC xG/4G Cover Valid from: Firmware version: 03v002 Modem Version: 05v000 Server version: 49v011 Hardware version: 3.0 301102 | Rev.01...
  • Page 3 Chapter 1 Table of contents Chapter 1 Table of contents Cover Chapter 1 Table of contents Chapter 2 Declaration of conformity 2.1 myDatalogMUC 2G/4G EU Chapter 3 Technical data Chapter 4 General specifications 4.1 Translation 4.2 Copyright 4.3 General descriptive names 4.4 Safety instructions 4.4.1 Use of the hazard warnings 4.4.2 General safety instructions...
  • Page 4 5.1.4 Decay module 5.1.5 Hold module 5.1.6 Alarm/trigger module 5.1.7 Control module 5.1.8 Record module 5.1.9 Setpoint module 5.1.10 Scale module (outputs) 5.2 Functionality of the internal data memory 5.3 Procedure in case of connection aborts 5.4 Aloha transmission mode 5.5 Automatic selection of the GSM network 5.6 Device Logic processing 5.6.1 Device Logic parsing...
  • Page 5 Chapter 1 Table of contents 7.4.3.3 0 to 10V mode 7.4.3.4 Standard digital modes (PWM, frequency, digital, day counter, impulse counter) 7.4.4 Technical details about the PT100/1000 interface 7.4.5 Technical details about the modbus interfaces (Com1, Com3) 7.4.5.1 Modbus-Slave Modus 7.4.6 Technical details about the RS232 interface (Com2) 7.4.6.1 Error codes of the RS232 interface 7.4.7 Technical details about the USB interface...
  • Page 6 9.2.1.4 Interfaces 9.2.1.4.1 Basis 9.2.1.4.1.1 Com1 and Com3 (modbus master, RS485, Device Logic parsing inactive) 9.2.1.4.1.2 Com1 and Com3 (modbus slave, RS485, Device Logic parsing inactive) 9.2.1.4.1.3 Com1 and Com3 (RS485, Device Logic parsing active) 9.2.1.4.1.4 Com2 (serial, RS232) 9.2.1.4.2 Config 9.2.1.4.2.1 Com1 and Com3 9.2.1.4.2.2 Com2 9.2.1.5 Sequences for COM2...
  • Page 7 Chapter 1 Table of contents 9.2.1.9.2.3 Com2 (serial, RS232) 9.2.1.9.2.4 Device Logic 9.2.1.9.3 Scale 9.2.1.9.3.1 Com1 and Com3 (modbus, RS485) 9.2.1.9.3.2 Com2 (serial, RS232) 9.2.1.9.3.3 Device Logic 9.2.1.10 Interface output channels 33-64 9.2.1.11 Calculated channels 9.2.1.11.1 Basis 9.2.1.11.2 Calculation 9.2.1.11.3 Alarms 9.2.1.12 Output channels 9.2.1.12.1 Basis 9.2.1.13 Internal channels...
  • Page 8 10.4.1 Creating the site Chapter 11 Pawn script 11.1 General 11.1.1 Direct input of a pawn Device Logic 11.1.2 Uploading a binary file 11.2 Compiler options 11.3 Device API 11.3.1 Constants 11.3.2 System 11.3.3 Date & Time 11.3.4 Encoding 11.3.5 Measurement channels 11.3.5.1 Constants 11.3.5.2 Functions 11.3.6 Serial interfaces...
  • Page 9 Chapter 1 Table of contents 11.6.1.1 Format 11.6.1.2 Optional semicolons 11.6.1.3 Comments 11.6.1.4 Identifier 11.6.1.5 Reserved keywords 11.6.1.6 Numerical constants 11.6.1.6.1 Numerical integer constants 11.6.1.6.2 Numerical floating-point constants 11.6.2 Variables 11.6.2.1 Declaration 11.6.2.2 Local declaration 11.6.2.3 Global declaration 11.6.2.4 Static local declaration 11.6.2.5 Static global declaration 11.6.2.6 Floating point values 11.6.3 Constant variables...
  • Page 10 11.6.6.1 Statement label 11.6.6.2 Composite statements 11.6.6.3 Expression statement 11.6.6.4 Empty statement 11.6.6.5 Assert expression 11.6.6.6 Break 11.6.6.7 Continue 11.6.6.8 Do statement while (expression) 11.6.6.9 Exit expression 11.6.6.10 For (expression 1; expression 2; expression 3) statement 11.6.6.11 Goto label 11.6.6.12 If (expression) statement 1 else statement 2 11.6.6.13 Return expression 11.6.6.14 switch (expression) {case list} 11.6.6.15 While (expression) statement...
  • Page 11 Chapter 1 Table of contents Chapter 15 Troubleshooting and repair 15.1 General problems 15.2 Log entries and error codes 15.2.1 Modem error 15.3 Evaluating the device log 15.3.1 Evaluating the device log on the myDatanet server 15.3.2 Evaluating the device log using DeviceConfig Chapter 16 Spare parts and accessories 16.1 Antennas 16.2 Power supply...
  • Page 13: Chapter 2 Declaration Of Conformity

    Chapter 2 Declaration of conformity Chapter 2 Declaration of conformity 2.1 myDatalogMUC 2G/4G EU Rev. 01...
  • Page 15: Chapter 3 Technical Data

    Chapter 3 Technical data Chapter 3 Technical data Voltage supply 12...30VDC (+/-10%) Additional information is provided in "Technical details regarding the energy supply" on page 65. Power consumption typ. 1W (without sensors) max. 3W (without sensors) Integrated LiPo rechargeable battery with 300mAh to issue a message in the event of a power rechargeable buffer supply failure.
  • Page 16 Universal inputs 8 x analogue or digital Modes: 0...20mA: Resolution 6,3µA, max. 23,7mA, load 96Ω 4...20mA: Resolution 6,3µA, max. 23,7mA, load 96Ω 0...2V: Resolution 610µV, max. 2,5V, load 10k086 0...10V: Resolution 7,97mV, max. 32V, load 4k7 PWM: 1...99%, max. 100Hz, min. pulse length 1ms, max. 32V, load 4k7 Frequency: 1...1000Hz, max.
  • Page 17 Chapter 3 Technical data Serial interface 1 x RS232 for the connection of a digital sensor Baud rate: 300-115200 Stop bits: 1, 2 Parity: N, E, O Data bits: 7, 8 Modes: ASCII Number of processable interface channels Inputs: modbus channels + serial channels = 64 Outputs: modbus channels + serial channels = 64 Additional information is provided in "Technical details about the RS232 interface (Com2)"...
  • Page 18 Data transmission 2G/4G Europe (myDatalogMUC 2G/4G EU ) 2G GPRS 900MHz / 1800MHz LTE CAT1 B3, B7, B20 3G/4G US (myDatalogMUC 3G/4G US ) UMTS B2, B5 LTE CAT1 B2, B4, B5, B12 The myDatalogMUC xG/4G is equipped with an integrated SIM chip. Monthly data volume 2,0MB at 2 min.
  • Page 19: Chapter 4 General Specifications

    Chapter 4 General specifications Chapter 4 General specifications The information in this manual has been compiled with great care and to the best of our knowledge. The manufacturer, however, assumes no liability for any incorrect specifications that may be provided in this manual.
  • Page 20: Use Of The Hazard Warnings

    4.4.1 Use of the hazard warnings DANGER: Indicates a potential or threatening hazardous situation that will result in death or serious injuries if not avoided. WARNING: Indicates a potential or threatening hazardous situation that can result in death or serious injuries if not avoided.
  • Page 21 Chapter 4 General specifications Important note: No liability shall be assumed at any time and under no circumstances for connections via a GSM/GPRS modem for which wireless signals and networks are utilized. The GSM/GPRS modem must be switched on and operated in an area where sufficient signal strength is present.
  • Page 22: Block Diagram

    4.5 Overview Overview myDatalogMUC xG/4G 1 Connector for the primary cellular antenna 6 Sub-D connector of the serial interface (Com2) (MAIN) 2 Upper connection strip 7 Connector for the secondary cellular antenna (AUX) 3 Button to initiate Aloha transmission mode 8 Lower connection strip 4 Signalling LEDs 9 Micro-B USB (only for debugging) 5 Button to initiate self-testing...
  • Page 23 Chapter 4 General specifications Block diagram of the myDatalogMUC xG/4G Rev. 01...
  • Page 24: Intended Use

    A Managed Service contract with Microtronics Engineering GmbH is required for use of the mobile data transmission (see www.microtronics.com/managedservice). This includes the provisioning of the mobile communications connection via the network of the service provider included in the above-mentioned list.
  • Page 25: Device Labelling

    Only then can we process requests promptly and properly. Type plate myDatalogMUC xG/4G Note: This symbol indicates the country list profile (see www.microtronics.com/footprint) of the SIM chip installed in the device. Note: These operating instructions are part of the device and must be available to the user at all times.
  • Page 26: Storage Of The Product

    For safety and warranty reasons, all internal work on the instruments beyond from that involved in normal installation and connection, must be carried out only by qualified Microtronics  personnel or persons or companies authorised by Microtronics .
  • Page 27: Obligation Of The Operator

    Chapter 4 General specifications for damages to persons or objects resulting from the use of instruments not in accordance with the requirements. for damages to persons or objects resulting from failure to comply with safety information contained within this instruction manual. for missing or incorrect measurement values or resulting consequential damages due to improper installation.
  • Page 29: Chapter 5 Functional Principle

    Chapter 5 Functional principle Chapter 5 Functional principle In the graphic below, all of the components that are part of the myDatanet are illustrated in grey. All of the other components must be provided/created by the customer. Functional principle myDatalogMUC xG/4G with integrated managed service SIM chip (including data transmission) myDatanet server to which the data is transferred Client that accesses the interface of the myDatanet server via the web browser Customer-specific server that provides clients with their own interface.
  • Page 30 Functions and components provided by myDatanet : myDatalogMUC xG/4G The myDatalogMUC xG/4G is a stationary device for connecting sensors (UI1-8, PT100/1000, COM1- 3) and actuators (RELAY1-6, mA OUT1-2, COM1-3) to the myDatanet server (2G/3G/4G). Managed Service Managed Service is the basis for operating your devices and provides you with a wide range of services.
  • Page 31: Internal Processing Of The Measurement Values

    Chapter 5 Functional principle 5.1 Internal processing of the measurement values Diagram of the internal processing of the measurement values 1 Filter to compensate for brief signal fluctuations 7 Determination of the setpoints, Device Logic (see "Filter module" on page 32). The filter processing (see "Control module"...
  • Page 32: Filter Module

    Note: Additional explanation on universal inputs that are operated in Digital mode. Measurement channels -> Basis Mode Digital Measurement channels ->Config. Filter time 800ms Input signal Input signal at the universal input Input signal after filter Input signal taking the "filter time" into consideration Logic level The input signal at the universal input is analysed once per second.
  • Page 33: Overflow Module

    Chapter 5 Functional principle 5.1.2 Overflow module This module monitors the measurement range limits of the raw value. If a universal input was, for example, switched to "4-20 mA" mode, a raw value of 2 mA will violate the measurement range. The overflow module is only available for the 8 universal inputs in channel modes "Freq", "PWM", "4-20mA", "0-20mA", "0-2V"...
  • Page 34: Scale Module (Inputs)

    5.1.3 Scale module (inputs) This module rescales the raw value (e.g. mA) to the required measurement value (e.g. mm). The scale module is only available for the 8 universal inputs and for the interface channels (Com1 and Com3 only). The following table specifies the relevant parameters for the module: Configuration section Modus/interface Parameter Explanation...
  • Page 35: Decay Module

    Chapter 5 Functional principle 5.1.4 Decay module The decay module is designed to summarise several measurement values. The average value over a required time frame or the minimum value within a required time frame can be determined, for example. The decay module is only available for the 8 universal inputs, with the exception of "Cnt.Day"...
  • Page 36: Alarm/Trigger Module

    5.1.5 Hold module With the help of the hold module, it can be determined how to proceed in the event of invalid measurement values. It ensures the last valid measurement value is retained until a new valid measurement value is available or passes the error on after a certain number of invalid measurements.
  • Page 37: Control Module

    Chapter 5 Functional principle 5.1.7 Control module The control module completes the Device Logic processing and determines the setpoints for the outputs. When determining the setpoints for the outputs, it must be taken into account that a value calculated by means of a Device Logic overwrites the value determined via the input screen on the myDatanet server.
  • Page 38: Record Module

    5.1.8 Record module The record module records the measurement values. As the record interval and measurement cycle can be selected individually, a record is not saved at the time of every measurement. Depending on the global triggers set by the alarm/trigger module (see "Alarm flags" or "Trigger flags" in chapter "Constants" on page 157), the record interval is modified, if necessary, the transmission is initiated or a new measurement is triggered.
  • Page 39: Setpoint Module

    Chapter 5 Functional principle Configuration section Parameter Explanation Alarm settings On alarm Ü An immediate transmission is initiated. On warning On fault alarm On fault warning Configuration section Parameter Explanation Basic setting Record interval Time between measurement data recordings Measure quick divisor Record interval = record interval / factor (from triggering) Measure slow factor...
  • Page 40: Scale Module (Outputs)

    5.1.10 Scale module (outputs) This module rescales the setpoint (e.g. mm) into the desired physical size (e.g. mA) for the output. The following table specifies the relevant parameters for the module: Configuration section Modus/interface Parameter Explanation Interface output channels Com1 0% Modbus Start of the output range in the unit of the 1-64 ->...
  • Page 41: Procedure In Case Of Connection Aborts

    Chapter 5 Functional principle contains the measurement values of the last 3.576 cycles, however at most the measurement values of the last 4.470 cycles. For this reason, it is recommended to coordinate the transmission cycle and record interval in such a way that a maximum of 3.576 measurement cycles have to be recorded between two transmissions.
  • Page 42: Automatic Selection Of The Gsm Network

    The GSM network to which the device should register must be selected, as the myDatalogMUC xG/4G is equipped with a SIM chip that provides a mobile connection via a variety of international service providers (see www.microtronics.com/footprint ). This is completed automatically by the device. 5.6 Device Logic processing The PAWN Device Logic must include the following two functions: main();...
  • Page 43 Chapter 5 Functional principle 5.6.1 Device Logic parsing If Device Logic parsing was activated for one of the COM interfaces, the relevant interfaces can be accessed by means of the "Mdn_SerialEvent()", "Mdn_SerialRx()", "Mdn_SerialTx()" and "Mdn_SerialFinish()" Device Logic functions. The baud rate, stop bits, parity, data bits, frame timeout and activation of a retry are still configured via the "Interface"...
  • Page 44 Explanation of 2 If it is time to initiate a measurement, the "Mdn_SerialEvent()" callback function is called up by the system with the "MDN_SERIAL_EVENT_MEASURE" event. The internal processing of the measurement values also starts at this time (see "Internal processing of the measurement values" on page 31).
  • Page 45 Chapter 5 Functional principle Explanation of 4 (only when "Retry" is activated) In the event of a timeout, the "Mdn_SerialEvent()" callback function is called up by the system with the "MDN_SERIAL_EVENT_TIMEOUT" event. In this case, the receipt of data must be terminated by the "Mdn_SerialFinish()"...
  • Page 47: Chapter 6 Storage, Delivery And Transport

    Check the shipment immediately upon receipt to ensure it is complete and intact. Immediately report any discovered transport damages to the delivering carrier. Also notify Microtronics Engineering GmbHin writing about this without delay. Report any incompleteness of the delivery to the responsible representative or directly to the company headquarters of the manufacturer within two weeks (see "Contact information"...
  • Page 48 Support & Service Centre (see "Contact information" on page 227). The return shipment of the myDatalogMUC xG/4G must occur in the original packaging and with freight and insurance paid to Microtronics Engineering GmbH (see "Contact information" on page 227). Insufficiently cleared return shipments will otherwise not be accepted!
  • Page 49: Chapter 7 Installation

    Chapter 7 Installation Chapter 7 Installation Important note: To prevent any damage to the device, the work described in this section of the instructions must only be performed by qualified personnel. 7.1 Dimensions Dimensions: Width and height Dimensions: Depth 7.2 Installing the myDatalogMUC xG/4G Important note: Ensure installation is completed correctly.
  • Page 50 7.2.1 Top-hat rail assembly Top-hat rail assembly 1 myDatalogMUC xG/4G 2 Top-hat rail 1. Place the myDatalogMUC xG/4G on to the top edge of the top-hat rail. Turn slightly around the horizontal axis so that the myDatalogMUC xG/4G clicks into the top-hat rail (see Figure "Top-hat rail assembly"...
  • Page 51 Chapter 7 Installation 7.2.2 Assembly in a control cabinet Antennas mounted directly on the myDatalogMUC xG/4G are not suitable for assembly within a control cabinet as the GSM signal is shielded by the metal of the cabinet. In this case, the manufacturer recommends using flat antennas that are available as accessories.
  • Page 52: Safety Instructions For The Cabling

    7.3 Safety instructions for the cabling Important note: To avoid any damage, always switch off the voltage supply to the device when performing electrical connections. When connections are made to the myDatalogMUC xG/4G , the following warnings and information must be observed, in addition to the warnings and information found in the individual chapters on the installation.
  • Page 53 Chapter 7 Installation Connection of the sensors and power supply 1 Relay 1-3 9 Com 1 (RS485) 2 Relay 4-6 10 Dip switch (dip switch 2) for activating/deactivating the load or clamp resistances for Com3 (RS485) 3 Reserved for extensions 11 Com 3 (RS485) 4 Supply (V IN, GND) 12 Connector for the external temperature sensor (PT100/1000)
  • Page 54 RELAY 4-6 CC4-6 Joint root for relay 4-6 Operating contact of relay 4 (normally open) Operating contact of relay 5 (normally open) Operating contact of relay 6 (normally open) DC IN Mass V IN Supply voltage: 12...30VDC (+/-10%), max. 3W mA OUT1 Mass 0/4-20mA output signal mA OUT2 Mass 0/4-20mA output signal...
  • Page 55 Chapter 7 Installation UNIVERSAL INPUTS 1-8 UI 1 Universal input 1 UI 2 Universal input 2 UI 3 Universal input 3 UI 4 Universal input 4 UI 5 Universal input 5 UI 6 Universal input 6 UI 7 Universal input 7 UI 8 Universal input 8 1. Connect your sensors and actuators with the inputs and outputs. Ensure that no current is present! Ensure the supply cables for the myDatalogMUC xG/4G are de-energised when being connected to the supply connectors.
  • Page 56 7.4.1.1 Connection examples Connection examples 1 myDatalogMUC xG/4G 4 Isolated relay contact 2 Signal converter, isolating transducer 5 2-wire mA sensor 3 Sensor with open collector output 6 3-wire mA sensor 7.4.2 Connection of the GSM antenna Important note: To ensure the correct functionality, only use antennas that are supplied by the manufacturer.
  • Page 57: Technical Details About The Universal Inputs

    Chapter 7 Installation The following step is not mandatory. 5. Check whether the connection to the myDatanet has worked correctly (see "Testing communication with the device" on page 68). 7.4.3 Technical details about the universal inputs Note: The universal inputs are not galvanically isolated. 7.4.3.1 0/4 to 20mA mode Note: Above 23,7mA, the relevant input becomes highly resistive (safety shutdown to prevent damage to the universal input).
  • Page 58 7.4.4 Technical details about the PT100/1000 interface The interface for the external temperature sensor automatically detects whether a PT100 or PT1000 is being used. It is also possible to use three- or two-wire sensors. An additional link is required on two-wire sensors (see "PT100/PT1000 2-wire"...
  • Page 59 Chapter 7 Installation Schematic diagram of the switchable load resistances Note: Additional explanation regarding the connection of two RS485 bus participants Schematic diagram: Connection of two RS485 bus participants A problem occurs if there is no connection between the GND potentials of the sender and recipient. A common mode voltage (V ) occurs in this case.
  • Page 60 7.4.5.1 Modbus-Slave Modus The following table details the possible access functions depending on the data type of the interface channel: Modbus add. Data type Read function Write function 0x0000 Digital Read coils (FC 01) Write single coil (FC 05) Write multiple coils (FC 15) 0x003F 0x0000 Signed 16/32 bit...
  • Page 61: Technical Details About The Usb Interface

    Chapter 7 Installation Assignment of the Sub-D connector Signal Type O (low: -5,7V; high: 6,2V) I (low: <0,8V; high: >2,5V) I (low: <0,8V; high: >2,5V) O (low: -5,7V; high: 6,2V) max. 750mA The current firmware does not support the hardware handeshake. Supply voltage (reserved for extensions) If your sensor also comprises a SUB-D(f) connector, you can use the Gender changer 9-pin D-Sub male/male (206.684) provided as an accessory.
  • Page 62: Technical Details About The Outputs

    Important note: Remove the antenna before connecting the device with the USB interface of a PC. Otherwise, this can cause a potential displacement between the ground of the antenna and the ground of the PC, which could damage the USB interface of the device.
  • Page 63 Chapter 7 Installation 7.4.9 Technical details about the integrated rechargeable buffer battery The integrated rechargeable buffer battery enables a message to be issued in the event of a supply voltage failure. The alarm for the internal "voltage" measurement value (see "Internal channels" on page 126) must be configured for this purpose.
  • Page 64 V IN Supply voltage: 12...30VDC (+/-10%) Threshold for switching to normal operation: 10,5V recover Threshold for switching to supply via the rechargeable buffer battery: 9,5V Time delay for issuing the malfunction message. Is configured via the "Delay for power off alarm" delay parameter located in the "Basic settings"...
  • Page 65 Chapter 7 Installation 7.4.10 Technical details regarding the energy supply Schematic diagram of the energy supply V IN 12...30VDC (+/-10%) Power consumption typ. 1W (without sensors) max. 3W Input capacity 1000µF Fuse 1,6A T Reverse voltage protection applies to ongoing operation. A current peak is caused by the input capacity at the time of activation. The myDatalogMUC xG/4G is equipped with a relatively large input capacity (1000µF ) to ensure reliable switchover to the integrated rechargeable buffer battery in the event of a supply voltage failure.
  • Page 67: Chapter 8 Initial Start-Up

    Read this manual carefully and completely in order to ensure the proper functioning of the myDatalogMUC xG/4G . Contact Microtronics Engineering GmbH(see "Contact information" on page 227) if anything is unclear or if you encounter difficulties with regard to installation, connection or configuration.
  • Page 68: Testing Communication With The Device

    3. Configure the created site according to your requirements (see "Site configuration" on page 74). 4. Link the myDatalogMUC xG/4G with the created site (see "Site" on page 75). 5. Activate the Aloha transmission mode (see "Aloha transmission mode" on page 41) so that the site configuration is transmitted to the myDatalogMUC xG/4G .
  • Page 69 Chapter 8 Initial Start-Up Note: Supplementary explanation on evaluating the "GSM level": "GSM level" >-64dBm -64 to -73dBm -74 to -83dBm -84 to -93dBm -94 to -107dBm <= -108dBm Note: Additional explanation about evaluating the "voltage": The displayed voltage should only deviate slightly from the supply voltage applied to the device. Rev.
  • Page 71: Chapter 9 User Interfaces

    Chapter 9 User interfaces Chapter 9 User interfaces The configuration of the myDatalogMUC xG/4G is carried out via the web interface on the myDatanet server (see "User interface on the myDatanet server" on page 74), which your responsible sales partner will provide to you.
  • Page 72 Improve the position of the antenna Check whether the device is located in the coverage area of one of the service providers supported by the integrated SIM chip (www.microtronics.com/footprint) No GSM network Try again later Improve the position of the antenna No GPRS connection...
  • Page 73 Chapter 9 User interfaces 9.1.1.3 Status indication: Self-testing This status display is designed to indicate that self-testing is in progress and also shows the result of the test. Self-testing is completed automatically when the power supply (PowerOn) is established. It can also be initiated by the operator at any time by pressing the "TEST"...
  • Page 74: Site Configuration

    9.1.1.4 Status display: buffer accu active Important note: Please note that when the device is being powered by the buffer accu, not all of the hardware components will be supplied (see "Technical details about the integrated rechargeable buffer battery" on page 63). ON ACCU Description Lights up...
  • Page 75 Chapter 9 User interfaces 9.2.1.1 Site Customer Specifies to which customer the site is assigned. symbol Assign site to another customer Name Site designation (not relevant for the device or data assignment) [2-50 characters] Device S/N Serial number of the device that is linked to the site (device assignment!) Application template Name of the application template from which the site was created Tags...
  • Page 76 9.2.1.4 Interfaces 9.2.1.4.1 Basis Note: Modbus mode (master/slave) for interfaces Com1 and Com3 is selected in the "Config" tab (see "Config" on page 85). 9.2.1.4.1.1 Com1 and Com3 (modbus master, RS485, Device Logic parsing inactive) Mode Interface deactivated Modbus activates the modbus functionality of the interface Baud rate Selection of the required baud rate (1/2)
  • Page 77 Chapter 9 User interfaces Modbus Retry In the event of a communication error, the corresponding command is repeated once. The error is only indicated if this second attempt also (2/2) fails. Device Activates Device Logic parsing. This means that the interface can be accessed via the Logic "Mdn_SerialEvent()", "Mdn_SerialRx()", "Mdn_SerialTx()"...
  • Page 78 9.2.1.4.1.2 Com1 and Com3 (modbus slave, RS485, Device Logic parsing inactive) Mode Interface deactivated Modbus activates the modbus functionality of the interface Baud rate Selection of the required baud rate 1200 2400 4800 9600 19200 38400 57600 115200 Stop bits Selection of the required stop bits Parity None...
  • Page 79 Chapter 9 User interfaces Device Activates Device Logic parsing. This means that the interface can be accessed via the Logic "Mdn_SerialEvent()", "Mdn_SerialRx()", "Mdn_SerialTx()" and "Mdn_SerialFinish()" parsing PAWN Device Logic functions (see "Device Logic parsing" on page 43). This deactivates the modbus functionality of the interface. Details on configuring the "Device Logic Parsing"...
  • Page 80 Device Frame timeout 0...no timeout Logic Time during which the connected digital sensor must send the full parsing answer to a request. A communication error is detected if the time is (2/2) exceeded. Hold Hold the last valid measurement value for x measurement cycles Function deactivated Number of measurement cycles for which the measurement value is held until the error value is...
  • Page 81 Chapter 9 User interfaces Important note: Example to explain the link between the "Frame timeout", "Retry" and "Measurement cycle" Basic setting Record interval 5min. Measurement cycle 1min. Interfaces -> Basis First attempt Frame timeout 12sec. Retry Retry Active Explanation: At the time of a measurement, the measurement data sequence is sent via the "Mdn_ SerialTx()"...
  • Page 82 9.2.1.4.1.4 Com2 (serial, RS232) Mode Interface deactivated ASCII Baud rate Selection of the required baud rate 1200 2400 4800 9600 19200 38400 57600 115200 Stop bits Selection of the required stop bits Parity None Selection of the required parity Even Data bits Number of data bits to be used Frame timeout...
  • Page 83 Chapter 9 User interfaces Device Activates Device Logic parsing. This means that the interface can be accessed via the Logic "Mdn_SerialEvent()", "Mdn_SerialRx()", "Mdn_SerialTx()" and "Mdn_SerialFinish()" parsing PAWN Device Logic functions (see "Device Logic parsing" on page 43). The option to determine via the "Config"...
  • Page 84 Important note: Example to explain the link between the "Frame timeout", "Retry" and "Measurement cycle" Basic setting Record interval 5min. Measurement cycle 1min. Interfaces -> Basis First attempt Frame timeout 12sec. Retry Retry Active Explanation: At the time of the measurement, the measurement data sequence is sent (see "Sequences for COM2"...
  • Page 85 Chapter 9 User interfaces 9.2.1.4.2 Config 9.2.1.4.2.1 Com1 and Com3 Mode Interface deactivated Modbus Modbus Master Com mode RTU Data is transferred in binary format. mode ASCII Data is transferred in ASCII format. Slave Com mode RTU Data is transferred in binary format. ASCII Data is transferred in ASCII format.
  • Page 86 9.2.1.4.2.2 Com2 Mode Interface deactivated ASCII Warmup time Time from switching on the myDatalogMUC xG/4G until the init sequence is sent. Frame structure ...[CR][LF] Each frame must be terminated with both "[CR][LF]" characters..[ETX] Each frame must be terminated with the "[ETX]" character.
  • Page 87 Chapter 9 User interfaces 9.2.1.5 Sequences for COM2 Note: This configuration section is only visible if "ASCII" mode is activated for the COM2 interface in the "Interfaces" configuration section (see "Basis" on page 76). If "Device Logic parsing" mode is activated, the init sequence and measurement data sequence must be generated by the PAWN Device Logic.
  • Page 88 Mode Basic settings for the measurement channel Universal inputs Measurement channel deactivated Digital Invert Inverts the input signal (digital modes) Cnt.Day Impulse Counted measurand of a pulse in the measurement unit Defines the upper scale end of the pointer instruments Unit String that is used as a measurement unit by all of the server display elements [0-16 characters]...
  • Page 89 Chapter 9 User interfaces Universal inputs 0-20mA Start of the measurement range in the measurement unit 100% End of the measurement range in the measurement unit (analogue modes) Unit String that is used as a measurement unit by all of the server display elements [0-16 characters] Decimal Number of decimal places that are used by all of the server...
  • Page 90 9.2.1.6.2 Config Universal inputs Digital Filter time Time in [ms] during which the signal must remain constant to (digital modes) initiate a level change. Used to suppress brief faults (debouncing). Decay Temporal function in the measurement cycle Decay deactivated Minimum signal length for x seconds with a rising edge down Minimum signal length for x...
  • Page 91 Chapter 9 User interfaces Universal inputs Cnt.Day Filter time Time in [ms] during which the signal must remain constant to initiate a level change. Used to suppress brief faults (Counter modes) (debouncing). Reset at Reset time of the day counter Cnt.Intrvl.
  • Page 92 Universal inputs Freq Filter time Time in [ms] during which the signal must remain constant to initiate a level change. Used to suppress brief faults (Frequency mode (1/2) (debouncing). 1/2) Decay Temporal function in the measurement cycle Decay deactivated The minimum of the last x measurement values is recorded.
  • Page 93 Chapter 9 User interfaces Universal inputs Freq Overflow Procedure in the event of measurement range violations Ignore The measurement value is calculated beyond (Frequency mode (2/2) the range limits. 2/2) Silent cutoff The measurement value is truncated at the range limits. Out of If the measurement value is below 1Hz, range...
  • Page 94 Universal inputs Filter time Time in [ms] during which the signal must remain constant to initiate a level change. Used to suppress brief faults (PWM mode 1/2) (1/2) (debouncing). Decay Temporal function in the measurement cycle Decay deactivated The minimum of the last x measurement values is recorded.
  • Page 95 Chapter 9 User interfaces Universal inputs Overflow Procedure in the event of measurement range violations Ignore The measurement value is calculated beyond (PWM mode 2/2) (2/2) the range limits. Silent cutoff The measurement value is truncated at the range limits. Out of If the measurement value is below 1%, range...
  • Page 96 Universal inputs 0-20mA Filter time Time in [ms] during which the analogue signal is averaged for signal smoothing. Used to suppress signal noise (also (0-20mA mode 1/2) (1/2) see "Example to explain the filter time in conjunction with the Ext. warmup time" on page 126). Decay Temporal function in the measurement cycle Decay deactivated...
  • Page 97 Chapter 9 User interfaces Universal inputs 0-20mA Overflow Procedure in the event of measurement range violations Ignore The measurement value is calculated beyond (0-20mA mode 2/2) (2/2) the range limits. Silent cutoff The measurement value is truncated at the range limits. Out of If the measurement value is above range...
  • Page 98 Universal inputs 4-20 mA Filter time Time in [ms] during which the analogue signal is averaged for signal smoothing. Used to suppress signal noise (also (4-20mA mode 1/2) (1/2) see "Example to explain the filter time in conjunction with the Ext. warmup time" on page 126). Decay Temporal function in the measurement cycle Decay deactivated...
  • Page 99 Chapter 9 User interfaces Universal inputs 4-20mA Overflow Procedure in the event of measurement range violations Ignore The measurement value is calculated beyond (4-20mA mode 2/2) (2/2) the range limits. Silent cutoff The measurement value is truncated at the range limits. Out of The error value "OL"...
  • Page 100 Universal inputs 0-2V Filter time Time in [ms] during which the analogue signal is averaged for signal smoothing. Used to suppress signal noise (also (0-2V mode) see "Example to explain the filter time in conjunction with the Ext. warmup time" on page 126). Decay Temporal function in the measurement cycle Decay deactivated...
  • Page 101 Chapter 9 User interfaces Note: Additional explanation regarding the "Out of range" and "Namur borders" modes. "Out of range" or "Namur borders" mode Rev. 01...
  • Page 102 Universal inputs 0-10V Filter time Time in [ms] during which the analogue signal is averaged for signal smoothing. Used to suppress signal noise (also (0-10V mode) see "Example to explain the filter time in conjunction with the Ext. warmup time" on page 126). Decay Temporal function in the measurement cycle Decay deactivated...
  • Page 103 Chapter 9 User interfaces Note: Additional explanation regarding the "Out of range" and "Namur borders" modes. "Out of range" or "Namur borders" mode Ext. temperature Measurement channel deactivated sensor Hold Hold the last valid measurement value for x measurement cycles Function deactivated Number of measurement cycles for which the measurement value is held until the error value...
  • Page 104 9.2.1.6.4 Trigger If an universal input is operated in digital mode, there are two different types of triggers: Event trigger (MS, XM, I1-I4) In contrast to the level triggers, the relevant operation (e.g. initiate transmission) is only executed once when the trigger event occurs. With the help of the "Edge" configuration parameter, it is specified whether the rising, falling or both edges initiate the trigger event.
  • Page 105 Chapter 9 User interfaces All other Event trigger XM Initiate transmission modes Level Levels for initiating the trigger. The hysteresis from the "Alarm" tab is used to determine the level to reset the trigger. Greater or The trigger is initiated, if the measurement value equal meets or exceeds this value.
  • Page 106 9.2.1.7.1 Basis Title 1-32 Freely selectable channel title for the interface channels [0-16 characters] Interface Basis settings for the measurement channel Measurement channel deactivated Com1 Scale > Scale Defines the lower scale end of the pointer instruments Com3 (see "Scale" on page 110) Defines the upper scale end of the pointer instruments Config >...
  • Page 107 Chapter 9 User interfaces Device Defines the lower scale end of the pointer instruments Logic Defines the upper scale end of the pointer instruments Unit String that is used as a measurement unit by all of the server display elements [0-16 characters]. It has no direct influence on the values Decimal places Number of decimal places that are used by all of the server display...
  • Page 108 9.2.1.7.2.1 Com1 and Com3 (modbus master, RS485) Slave Ad. Address of the modbus slave Modbus Ad. Address of the register that should be read Format Data type Digital A digital value should be read. Function Read coils (FC 01) Read discrete inputs (FC 02) Signed A signed integer value should be read.
  • Page 109 Chapter 9 User interfaces 9.2.1.7.2.2 Com1 and Com3 (modbus slave, RS485) The following table details the possible access functions depending on the data type of the interface channel: Modbus add. Data type Read function Write function 0x0000 Digital Read coils (FC 01) Write single coil (FC 05) Write multiple coils (FC 15) 0x003F...
  • Page 110 9.2.1.7.2.3 Com2 (serial, RS232) Column The ASCII data message from the digital sensor is split into individual measurement values by the "number delimiter" (see "Interfaces" on page 76). The "column" configuration parameter specifies which of these measurement values is linked with/recorded on the interface channel. 9.2.1.7.3 Scale Note: The following parameters are not available for an interface channel that is connected to an interface for which "Device Logic parsing"...
  • Page 111 Chapter 9 User interfaces Note: Calculation of the measurement value during active scaling: Basis > min Basis > max 20mA Min modbus Max modbus 65535 Measurement value in the unit of 32767 the modbus slave Scaled measurement value 11.9998mA F F = ( (C - D)/(B - A) ) * (E - A) + D F = ( (20mA - 4mA) /(65535 - 0) ) * (32767 - 0) + 4mA =11.9998 mA...
  • Page 112 9.2.1.7.5 Trigger Note: If "Device Logic" is used as the basic setting for the measurement channel, triggers cannot be initiated automatically by the system, as the alarm/trigger module is executed before the control module in which Device Logic processing is completed (see "Internal processing of the measurement values" on page 31). However, the trigger configuration that can be entered via this tab can be accessed via the Device Logic and a trigger can be initiated via the Device Logic (see "Mdn_GetTriggerCfg()"...
  • Page 113 Chapter 9 User interfaces 9.2.1.8 Interface channels 33-64 9.2.1.8.1 Basis Title 33-64 Freely selectable channel title for the interface channels The significance of the remaining configuration parameters in this configuration section corresponds to the "Interface channels 1-32" configuration section (see "Interface channels 1-32" on page 105). 9.2.1.9 Interface output channels 1-32 Note: Some of the configuration parameters included in this configuration section also affect parameters that are not included in the tab that is currently open.
  • Page 114 9.2.1.9.1 Basis Title 1-32 Freely selectable channel title for the interface output channels [0-16 characters] Interface Basis settings for the output channel: Output channel deactivated Com1 Scale > Scale Defines the lower scale end of the pointer instruments Com3 (see "Scale" on page 118 Defines the upper scale end of the pointer instruments Config >...
  • Page 115 Chapter 9 User interfaces Device Defines the lower scale end of the pointer instruments Logic Defines the upper scale end of the pointer instruments Unit String that is used as a measurement unit by all of the server display elements [0-16 characters]. It has no direct influence on the values Decimal places Number of decimal places that are used by all of the server display...
  • Page 116 Format Data type Digital A digital value must be written. Function Write single coils (FC 05) Write multiple coils (FC 15) Signed A signed integer value should to be written. 16 16-bit integer Function Write multiple registers (FC 16) Write single register (FC 06) 32 32-bit integer.
  • Page 117 Chapter 9 User interfaces 9.2.1.9.2.2 Com1 and Com3 (modbus slave, RS485) The following table details the possible access functions depending on the data type of the interface output channel: Modbus add. Data type Read function Write function 0x0800 Digital Read discrete inputs (FC 02) 0x083F 0x0800 Signed 16/32 bit...
  • Page 118 9.2.1.9.2.3 Com2 (serial, RS232) Column The ASCII output string is split into individual measurement values by the "number delimiter" (see "Interfaces" on page 76). The "column"configuration parameter specifies where the output value is placed in the ASCII output string. 9.2.1.9.2.4 Device Logic The configuration is not available for “Device Logic”...
  • Page 119 Chapter 9 User interfaces Note: Calculation of the output value during active scaling: Basis > min Basis > max 20mA Min modbus Max modbus 65535 Basis > setpoint 12mA Scaled output value 32767 E = ( (B - A)/(C - D) ) * (F - D) + A F = ( (65535 - 0) /(20mA - 4mA) ) * (12mA - 4mA) + 0 =32767 9.2.1.9.3.2 Com2 (serial, RS232) The scaling is not available for the serial interface.
  • Page 120 9.2.1.11.1 Basis Title 1-5 Freely selectable channel title for the calculated channels [0-16 characters] Mode Possible calculation modes for the calculated channels Calculated channel deactivated Table Defines the lower scale end of the pointer instruments Defines the upper scale end of the pointer instruments Unit String that is used as a measurement unit by all of the server display elements [0-16 characters].
  • Page 121 Chapter 9 User interfaces Shift element down Shift element up 9.2.1.11.2 Calculation Calculated channel deactivated Table Source Selection of the channel from which the input data is used Opens the screen for entering the values table (the table rows are interpolated linearly, values outside of the defined table are extrapolated linearly.) Digital Source...
  • Page 122 Note: Additional explanation: Delta mode Assumption: The source channel contains the counter reading of an infinite counter in m . The calculated channel 1 should contain the flow rate in m /s and calculated channel 2 should contain the flow rate in l/h. Required configuration Parameter Value channel 1 Value channel 2...
  • Page 123 Chapter 9 User interfaces 9.2.1.12 Output channels 9.2.1.12.1 Basis Ext. warmup time Indicates the amount of time that an output channel is switched on in "Ext. warmup time" mode before the measurement mA OUT 1-2 title Freely selectable channel title for the analogue outputs (not galvanically isolated) [0-16 characters] Relay 1-6 title Freely selectable channel title for the relays [0-16 characters] (every 3 relays with a joint root) Mode...
  • Page 124 Note: Supplementary explanation regarding "Digital" mode Invert Setpoint Output on the device Off (low) On (high) On (high) Off (low) Note: Example to explain the burst interval in conjunction with the ext. warmup time (ext. warmup time < measurement cycle): Basic setting Record interval 5min.
  • Page 125 Chapter 9 User interfaces Note: Example to explain the burst interval in conjunction with the ext. warmup time (ext. warmup time > measurement cycle): Basic setting Record interval 5min. Burst interval 75 sec. Measurement cycle 15 sec. Output channels Ext warmup time 30 sec.
  • Page 126 Note: Example to explain the filter time in conjunction with the Ext. warmup time Basic setting Record interval 5min. Measurement cycle 1min. Output channels Ext. warmup time 1sec. Measurement channels - Filter time 500ms >Config. Output on the device Sensor supply Explanation: The sensor supply is always activated 1sec before expiry of the measurement cycle.
  • Page 127 Chapter 9 User interfaces 9.2.1.13.3 Trigger The following two type of triggers are differentiated: Event trigger (XM) The relevant operation (e.g. initiate transmission) is only executed once when the trigger event occurs. Level trigger (QU, SL, RO, RF, ON, I1-I4) The relevant operation (e.g.
  • Page 128 9.2.1.14 Alarm settings Acknowledgement Standard The global server setting is used to determine whether alarms must be acknowledged automatically or manually (see "myDatanet Server Manual " 805002). automatic Alarms are acknowledged automatically as soon as all of the messages have been sent. If SMS that have a tariff with a delivery confirmation function have also been sent, acknowledgement is provided after delivery confirmation.
  • Page 129 Chapter 9 User interfaces 9.2.1.15 Basic setting Connection type Interval The device connects in the transmission cycle. online The device does not disconnect the connection and continuously transmits the measurement data. However, every 7 days, the connection is temporarily interrupted in order to verify the server assignment.
  • Page 130 Note: Example to clarify the record interval, measurement cycle and burst interval in conjunction with the decay As only the universal inputs have a decay module (see "Internal processing of the measurement values" on page 31), it is only wise to use the burst interval for these measurement channels. An explanation of the sequences, if an ext.
  • Page 131: Device Configuration

    Chapter 9 User interfaces Note: Additional explanation about the effects of the measurement cycle and transmission cycle on the monthly data volume Measurement cycle/transmission cycle Data volume per month Only the 8 universal inputs are active (only minor change to the measurement signal) 2min/10min 13,0MB 2min/2h...
  • Page 132 9.2.2.2 Measurement instrument Customer Name of the customer to whom the measurement instrument is assigned Tags List of the tags that are already assigned to the measurement instrument. This assignment can be cancelled by clicking on the cross next to the title of the tag. The input screen for assigning the tags is opened by clicking on the plus symbol.
  • Page 133 Chapter 9 User interfaces Firmware update Off Firmware update is deactivated. As soon as a new version of the selected firmware type is available, this is installed immediately. Even if tag is missing Firmware is also transferred to the device if the device has not transmitted the current firmware version to the server (NOT RECOMMENDED!).
  • Page 135: Explanation Of The Symbols

    Chapter 10 myDatanet server Chapter 10 myDatanet server Note: All of the screenshots show version 49v011 of the myDatanet server using the standard colour scheme. Newer versions may include minor changes to the appearance of the server. 10.1 Overview Overview of the myDatanet server 1 Freely selectable logo 5 Opens the screen to input the global settings for the server...
  • Page 136 10.2 "Customer" area Overview of the "Customer" area 1 Area where an image file can be displayed as a "Map" and/or the OpenStreetMaps map can be displayed The sites can be manually placed on the image file used as a "map". In the OpenStreetMaps map, the sites are only displayed once GPS coordinates have been assigned to the site.
  • Page 137 Chapter 10 myDatanet server 3 List of tags that are assigned to at least one of the customers displayed in the list of customers. If the list of customers was limited by the search field or selection of a tag, this is taken into consideration when creating the list of tags.
  • Page 138 10.3 "Site" area at customer level Overview of the "Sites" area at customer level 1 Area where an image file can be displayed as a "Map" and/or the OpenStreetMaps map can be displayed The sites can be manually placed on the image file used as a "map". In the OpenStreetMaps map, the sites are only displayed once GPS coordinates have been assigned to the site.
  • Page 139: Map View

    Chapter 10 myDatanet server 4 Symbol that represents a site on the "Map" 5 Symbol via which a OpenStreetMaps map, on which the sites are displayed, can be loaded. (see "Map view" on page 139) 6 Symbol via which an image file can be loaded on to the server as a "Map" To remove the "Map"...
  • Page 140 2. Click on the "Customer" menu item of the myDatanet server to call up the list of available customers. Select an existing customer or create a new customer. Selecting the customer 1 Menu item to call up the list of customers 3 List of available customers 2 Creating a new customer 3.
  • Page 141 Chapter 10 myDatanet server 4. If necessary, change the suggested name of the site, select the desired site type or application from the drop-down list, and then click the "Add" button. Completion of the creation of the site 1 Name of the site (freely selectable) 3 "Add"...
  • Page 143 Chapter 11 Pawn script Chapter 11 Pawn script 11.1 General The following chapter describes the functionality of the pawn Device Logic. PAWN (previously SMALL) is a C-similar scripting language that is used on embedded systems. Additional and more detailed information is provided on the developer's website: http://www.compuphase.com/pawn/pawn.htm There are two ways to create a pawn Device Logic for the myDatalogMUC xG/4G : Direct entry in the "Device Logic"...
  • Page 144: Device Api

    11.3 Device API 11.3.1 Constants Return codes for general purposes ERROR = -1 11.3.2 System main(); This function is executed during a PowerOn and when the Device Logic is exchanged. It should include all initialisations that only have to executed once during program start-up. forward public Mdn_CtrlFinish();...
  • Page 145 Chapter 11 Pawn script native Mdn_GetDate(&year=0, &month=0, &day=0, timestamp=0); If no time stamp was transferred (timestamp=0), the date (year, month, day) is determined for the current system time (in local time). Alternatively, the date (year, month, day) is determined for the transferred time stamp.
  • Page 146 11.3.4 Encoding native Mdn_SetPacked(data{}, pos, &{Float,Fixed,_}:value, size=4, bool:bigendian=false); Writes the transferred value to a specified position in an array Parameter Explanation data Array that should contain the data Byte offset within the array to determine the position where the value should be written value Value that should be written in the array...
  • Page 147 Chapter 11 Pawn script native Mdn_GetPacked(const data{}, pos, &{Float,Fixed,_}:value, size=4, bool:bigendian=false); Returns the value that is located at the specified position in an array Parameter Explanation data Array that contains the data Byte offset within the array to determine the position from which the data should be read value Variable to store the data to be read...
  • Page 148: Measurement Channels

    11.3.5 Measurement channels 11.3.5.1 Constants Numbers of the channels MDN_CH_UI1 // Universal input 1 MDN_CH_UI8 // Universal input 8 MDN_CH_EXTTEMP // Ext. temperature sensor MDN_CH_GSM // Internal measurement channel "GSM level" MDN_CH_VIN // Internal measurement channel "Voltage" MDN_CH_IOUT1 // Analogue output 1 MDN_CH_IOUT2 // Analogue output 2 MDN_CH_REL1...
  • Page 149 Chapter 11 Pawn script // Information regarding the status of the communication with the respective extension module MDN_CH_MUCE1_COM_STATE MDN_CH_MUCE2_COM_STATE MDN_CH_MUCE3_COM_STATE // Number of channels MDN_NUM_IN_CHANNELS // Total number of interface channels MDN_NUM_OUT_CHANNELS // Total number of interface output channels MDN_NUM_CHANNELS // Total number of all channels (all of the in- and // outputs) Status of the measurement value/measurement channel...
  • Page 150 11.3.5.2 Functions native Mdn_GetCh(ch, &Float:value, &Mdn_ValueStatus:status = MDN_STATUS_OK); Reads out the current value and status of a channel Parameter Explanation Number of the channel (see "Numbers of the channels" in chapter "Constants" on page 148) value Value of the channel status Status of the channel (see "Status of the measurement value/measurement channel"...
  • Page 151 Chapter 11 Pawn script native Mdn_GetChScale(ch, &Float:min, &Float:max, &Float:scale); Reads the parameters of channel scaling and saves it in the transferred variables Parameter Explanation Number of the channel (see "Numbers of the channels" in chapter "Constants" on page 148) Channel type Mode Explanation Universal inputs...
  • Page 152 Parameter Explanation Channel type Mode Explanation Universal inputs Digital Not relevant Cnt.Day Cnt.Intervl. Freq End of the measurement range in the 4-20 mA measurement unit 0-20 mA 0-2 V 0-10 V Ext. temperature sensor Internal measurement channel Analogue outputs All modes End of the output range in the measurement unit Relay Interface channels...
  • Page 153 Chapter 11 Pawn script Parameter Explanation scale Channel type Mode Explanation Universal inputs Digital 1: Inverting "off" -1: Inverting "on" Cnt.Day Metered measurand of a pulse in the Cnt.Intervl. measurement unit Freq Factor by which the input signal is multiplied Not relevant 4-20 mA 0-20 mA...
  • Page 154: Serial Interfaces

    native Mdn_SetCh(ch, Float:value, Mdn_ValueStatus:status = MDN_STATUS_OK); Sets the value and status of a channel. This function can also be used to change the value of an input before it is saved. This is possible, as the script is processed once the measurement value has been acquired but before it is recorded (see "Internal processing of the measurement values"...
  • Page 155 Chapter 11 Pawn script 11.3.6.2 Callback functions forward public Mdn_SerialEvent(com, event); This function is the entry point for evaluating the serial events. This function must be provided by the user if script parsing is to be used. Parameter Explanation Number of the interface (see "Number of the interfaces" in chapter "Constants" on page 154) event Event that caused this function to be called up...
  • Page 156: Alarm & Trigger

    native Mdn_SerialFinish(com); Terminates the receipt of data via the specified interface. This function must always be called up once all of the required data has been received or the timeout event has occurred. Parameter Explanation Number of the interface (see "Number of the interfaces" in chapter "Constants" on page 154) Explanation Return value...
  • Page 157 Chapter 11 Pawn script Mdn_TriggerCfg Trigger configuration of a measurement channel // Mode Trigger mode (see "Trigger mode" in chapter "Constants" on page 157 ) // Flags Indicates which actions should be initiated when the trigger is active (see "Trigger flags" in chapter "Constants"...
  • Page 158 Trigger mode To evaluate the trigger configuration of a channel read by the Mdn_GetTriggerCfg() function MDN_TRG_MODE_NONE = 0, // Channel deactivated, no trigger //Relevant for all channel modes except for "Digital" MDN_TRG_MODE_LESS_OR_EQUAL = 1, // Initiation of the trigger, if // value <= level MDN_TRG_MODE_GREATER_OR_EQUAL = 2, // Initiation of the trigger, if // value >= level...
  • Page 159 Chapter 11 Pawn script native Mdn_SetAlarm(ch, alarm, Float:value, Float:level = 0.0); Sets the alarm status of a channel. The "MDN_FLG_UNDERFLOW" alarm flag must be set to indicate that the alarm/warning was triggered because the alarm/warning level was undercut. The "MDN_FLG_ UNDERFLOW"...
  • Page 160 native Mdn_GetTriggerCfg(ch, Config[Mdn_TriggerCfg]); Returns the trigger configuration of a channel Parameter Explanation Number of the channel (see "Constants" on page 148) Config Structure for storing the trigger configuration (see "Mdn_TriggerCfg" in chapter "Arrays with symbolic indices" on page 156) Explanation Return value OK, if successful ERROR, if no valid channel number was transferred...
  • Page 161 Chapter 11 Pawn script native min(value1, value2); Supplies the smaller of the two transferred values Parameter Explanation value1 Two values of which the smaller one is to be determined value2 Explanation Return value The smaller of the two transferred values native max(value1, value2);...
  • Page 162 native swapchars(c); Swaps the order of the bytes Parameter Explanation Value for which the bytes should be swapped over Explanation Return value Value for which the bytes in parameter "c" are swapped over (the lowest byte becomes the highest byte) The mode of operation of the following functions corresponds to that of the standard ANSI-C implementation: native Float:sin(Float:x);...
  • Page 163 Chapter 11 Pawn script native Float:floor(Float:x); Largest whole number that is not larger than x native Float:fabs(Float:x); Absolute value | x | native Float:ldexp(Float:x, n); native Float:frexp(Float:x, &n); Breaks down x into a normalised mantissa in the range [1/2, 1] that is supplied as the result, and a potency of 2 that is filed in n.
  • Page 164 native sprintf(dest[], maxlength=sizeof dest, const format[], {Float,Fixed,_}:...); Saves the transferred format string in the array dest. The mode of operation of the functions corresponds to that of the "snprintf" function of the standard ANSI-C implementation. Parameter Explanation dest Array to store the formatted result maxlength Maximum number of characters that the array dest can store format...
  • Page 165 Chapter 11 Pawn script native strcmp(const string1[], const string2[], length=cellmax); Compares character string1 and string2 Parameter Explanation string1 The two character strings that are to be compared string2 length The maximum number of characters that should be taken into consideration during the comparison - OPTIONAL Explanation Return value...
  • Page 166 native strspn(const string1[], const string2[]); Searches for the position of the first character in string1 that is notincluded in the character string of permitted characters (string2) Parameter Explanation string1 Character string that should be searched string2 Character string of permitted characters Explanation Return value Length of string1 if no permitted characters are found...
  • Page 167 Chapter 11 Pawn script native strstr(const string1[], const string2[]); Searches character string2 in character string1 Parameter Explanation string1 Character string that should be searched string2 Character string that the search should be for Explanation Return value -1, if character string2 that is being searched for is not included in string1 Array index where character string2 that is being searched for starts in string1 native strtol(const string[], base);...
  • Page 168 native tolower(c); Converts a character into lower case Parameter Explanation Character that should be converted to lower case Explanation Return value The lower case variant of the transferred character, if available, or the unchanged character code of "c" if the letter "c" does not have a lower case equivalent. native toupper(c);...
  • Page 169 Chapter 11 Pawn script 11.3.10.3 Functions native getapilevel(); Issues the implemented API level of the script engine Explanation Return value Implemented API level of the script engine native CRC16(data{}, len); Returns the calculated modbus CRC16 of the transferred data Parameter Explanation data Array that contains the data for which the CRC16 should be calculated...
  • Page 170 native Mdn_CalcTable(Float:key, &Float:value, const table[][Mdn_TablePoint], size = sizeof table); Searches for a certain value in the "key" column of the transferred reference point table and supplies the relevant value from the "value" column in the table. If the searched value is between two reference points, the returned value is interpolated linearly between the two adjacent values in the "value"...
  • Page 171 Chapter 11 Pawn script native Mdn_WriteLog(log, param); Generates an entry in the device log Parameter Explanation Log entry to be generated (valid range 0...999). Some error codes have already been predefined in chapter "Predefined log entries" on page 173. If possible, you should use these for the described error situations.
  • Page 172: Console Functions

    native getarg(arg, index=0); Supplies the value of the argument Parameter Explanation The sequence number of the argument. Use 0 for the first argument. index Index if "arg" refers to an array Explanation Return value This function supplies an argument from a variable argument list. If the argument is an array, the "index"...
  • Page 173 Chapter 11 Pawn script native printf(const format[], {Float,Fixed,_}:...); Prints the transferred format string to the standard output. The mode of operation of the functions corresponds to that of the standard ANSI-C implementation. Parameter Explanation format[] The format character string to be used Explanation Return value Number of printed characters...
  • Page 174 11.5 Device Logic error codes The PAWN script is run through at the time of every measurement once all of the measurement values have been generated. If an error occurs during this process, the script execution is stopped and deactivated. The relevant error code is also entered in the device log and a connection to the server is established.
  • Page 175 Chapter 11 Pawn script Log entry Parameter Description Code Plain text Code Plain text 3015 reserved 3016 AMX_ERR_ Out of memory MEMORY 3017 AMX_ERR_ P-code file format is invalid/not supported FORMAT 3018 AMX_ERR_ File is for a newer version of AMX VERSION 3019 AMX_ERR_ File or function not found...
  • Page 176 11.6.1.3 Comments Text between the /* and */ symbols (both symbols can be on the same or different lines) and text following // (to the end of the line) are comments. Comments must not be nested. The compiler considers comments to be blank space.
  • Page 177 Chapter 11 Pawn script 11.6.1.6.2 Numerical floating-point constants A floating-point number is a number with numbers after the decimal point. A floating-point number starts with one or several numbers, includes a decimal point and has at least one number after the decimal point, e.g. "12.0"...
  • Page 178: Array Variables

    11.6.2.5 Static global declaration A static global variable acts in the same way as a global variable with the difference that the variable is only valid in the file in which it was declared. Replace the keyword "new" with "static" to declare a global variable as static.
  • Page 179 Chapter 11 Pawn script Example: List: valid declaration new i = 1 new j /* j is 0 */ /* k has the character code of ’a’ */ new k = ’a’ new a[] = [1,4,9,16,25] /* a has 5 elements */ /* the remaining 18 elements are 0 */ new s1[20] = [’a’,’b’] /* an unpacked string */...
  • Page 180 number of higher dimensions for "f". "sizeof f" and "sizeof e" are both 2 (see "Arrays and the "sizeof" operator" on page 180). 11.6.4.5 Arrays and the "sizeof" operator The "sizeof" operator returns the number of elements of a variable. The "sizeof" result of a simple (non array) variable is always 1.
  • Page 181 Chapter 11 Pawn script 11.6.5.2 Expressions An expression consists of one or several operands with an operator. The operand can be a variable, a constant or another expression. An expression followed by a semicolon is a statement. Examples of expressions: v++ f(a1, a2) v = (ia1 * ia2) / ia3 11.6.5.3 Arithmetic...
  • Page 182 11.6.5.5 Assignment The result of an assignment expression is the value of the operand following the assignment. Operator Example Explanation v = e Assigns the value of e to the variable v v = a Assigns the array a to variable v. v must be an array of the same size and with the same dimensions as a.
  • Page 183 Chapter 11 Pawn script 11.6.5.7 Boolean A logical "false" is represented by an integer value of 0; a logical "true" is represented by a value that is not 0. Results of a comparative expression are either 0 or 1 and the "tag" is set to "bool". Operator Example Explanation The result is a logical "true", if e is logical "false".
  • Page 184 If the evaluation of an expression is not explicitly justified with brackets, it is categorised by the association rules. For example: a*b/c is equal to (a*b)/c based on the left to right association, and a=b=c is equal to a=(b=c). Operator Explanation Reading order Function call...
  • Page 185 Chapter 11 Pawn script 11.6.6.1 Statement label A label consists of an identifier followed by a ":". A label is a "Jump target" of a "goto" statement. Each statement can be marked with a label. The label must be followed by a statement, which can also be an "empty statement".
  • Page 186 11.6.6.5 Assert expression The program is aborted with a runtime error if the expression is logical "false" Note: This expression protects against "impossible" or invalid conditions. In the following example, a negative fibonacci number is invalid. The assert statement marks this error as a programming error. Assert statements should only ever highlight programmer errors and never user inputs.
  • Page 187 Chapter 11 Pawn script Example example(n) new a = 0 for(new i = 0; i < n ; i++ ) a += i if(i>10) continue a += 1 return a 11.6.6.8 Do statement while (expression) Executes a statement before the conditional part (the "while" condition) is evaluated. The statement is repeated as long as the condition is logical "true".
  • Page 188 11.6.6.10 For (expression 1; expression 2; expression 3) statement All three of the expressions are optional. Expression 1: Is only evaluated once before entering the loop. This expression can be used to initiate a variable. This expression also includes the variable declaration by means of the "new" syntax. A variable that is declared at this stage is only valid in the loop.
  • Page 189 Chapter 11 Pawn script 11.6.6.12 If (expression) statement 1 else statement 2 Executes statement 1 if the results of the expression is logical "true". The "else"clause of the "if" statement is optional. If the result of the expression is logical "false" and there is an "else" clause, the statement that is associated with the "else"...
  • Page 190 Example: example(n) new a = 0 switch (n) case 0..3: a = 0 case 4,6,8,10: a = 1 case 5,7: a = 2 case 9: a = 3 default: a = -1 return a 11.6.6.15 While (expression) statement Evaluates the expression and executes the statement if the result of the expression is logical "true". The program control returns to the expression again once the statement has been executed.
  • Page 191 Chapter 11 Pawn script sum(a, b) return a + b The arguments of a function are (declared implicitly) local variables for this function. The function call specifies the values of the arguments. Another example of a complete definition of a function is "leap year" that indicates "true"...
  • Page 192 faculty(n) assert n >= 0 new result = 1 while (n > 0) result *= n-- return result Regardless of what (positive) value the "n" variable has at the start of the "while" loop, "n" will equal zero at the end of the function. In the "faculty" function, for example, the parameter is transferred as a value ("by value"), which means that changes to the "n"...
  • Page 193 Chapter 11 Pawn script 11.6.7.2 Named parameters versus fixed parameters In the previous examples, the order of the parameters in a function call were important as each parameter was copied to the same position of the function parameter. For example, in the "weekday" function (defined below), the expression "weekday(12 ,31, 1999)"...
  • Page 194 The following function calls are all the same: increment(a) increment(a, _) increment(a, 1) Standard values for arguments that are transferred as a reference are helpful in making these parameters optional. For example, if the "divmod" function was written to return the quotient and the rest as a parameter. divmod(a, b, &quotient=0, &remainder=0) quotient = a / b remainder = a % b...
  • Page 195 Chapter 11 Pawn script 11.7 Example 11.7.1 Saw-tooth generator This example generates a saw-tooth on the output of a device. static Float:fCurrentValue; // Static declaration of the fCurrentValue variable of // the float type. This variable is not reset between // two measurement cycles This code is only executed once when - starting the device...
  • Page 196 11.7.2 Weekday designation This example determines the weekday from the current time stamp of a device. An interim value is then calculated by dividing the time difference between the cycles of the script by six. With a measurement cycle of 2 minutes this equates to a value of 20.
  • Page 197 Chapter 11 Pawn script Output signal generated by means of pawn Rev. 01...
  • Page 198 11.7.3 Calculating the flow rate with the table This example determines the flow rate of a wastewater system based on the fill level of the wastewater system. The fill level is measured at input 1 and the flow rate should be issued at output 1. static const Table[][Mdn_TablePoint] = // Static table for converting the height // to the flow rate...
  • Page 199 Chapter 11 Pawn script 11.7.4 Script parsing The following example initially issues the device class, modem version and firmware version on the standard output. " " is then issued as the init sequence on Com1. " " is issued in the INIT COM1\r\n POLL COM1\r\n measurement cycle on Com1.
  • Page 200 public Mdn_SerialRx(com, const data{}, len) // Access point for evaluating the received // characters printf("Mdn_SerialRx( %d, \"%s\", %d)\r\n", // Issue number of the COM interface, com, data, len); // received data and number of characters via // the standard output switch(com) // Check via which COM interface the data was // received...
  • Page 201 Chapter 11 Pawn script The pawn supports "array assignments" with the limitation that both of the arrays must be the same length. For example, if "a" and "b" arrays have six lines, the expression "a=b" is valid. In addition to character strings, the pawn also supports literal arrays and thus expressions such as "a = {0,1,2,3,4,5}"...
  • Page 203 Chapter 12 API Chapter 12 API Important note: The relevant licences are required on the myDatanet server to use the API (Application Programming Interface). For future information contact your responsible sales partner. 12.1 General The API is provided to export data from the myDatanet server and import data in to the myDatanet server. However, for "myDatalogMUC xG/4G "...
  • Page 204 12.2.1 Overview rapidM2M Playground 1 Input field for the user name 2 Input field for the password 3 List of the available HTTP commands. The HTTP commands are grouped according to their fields of application. 4 Depending on the selected HTTP command, the drop down lists for selecting the customer, user and site that should replace the corresponding wild cards ("$CID"...customer , "$UID"...user, "$SID"...site) in the resource path of the HTTP command are displayed.
  • Page 205: Chapter 13 Maintenance

    Chapter 13 Maintenance Chapter 13 Maintenance Important note: To prevent any damage to the device, the work described in this section of the instructions must only be performed by qualified personnel. The device must be deenergised before any maintenance, cleaning and/or repair work. 13.1 General maintenance Regularly check the myDatalogMUC xG/4G for mechanical damage.
  • Page 207: Chapter 14 Removal/Disposal

    Logo of the EU WEEE Directive This symbol indicates that the requirements of Directive 2012/19/EU regarding the scrap disposal of waste from electric and electronic equipment must be observed. Microtronics Engineering GmbHsupports and promotes recycling and environmentally friendly, separate collection/disposal of waste from electric and electronic equipment in order to protect the environment and human health.
  • Page 209: Chapter 15 Troubleshooting And Repair

    Chapter 15 Troubleshooting and repair Chapter 15 Troubleshooting and repair 15.1 General problems Problem Cause/solution Device does not Check the cable connections (see "Connecting the sensors, actuators and respond (status LED power supply" on page 52) always off). Communication Evaluate the blink code of the status LED (see "Status LED" on page 72). Load the device log from the myDatanet server and use DeviceConfig for problems the evaluation (see "Evaluating the device log"...
  • Page 210 Problem Cause/solution The interface channel Check the cable connections (see "Connecting the sensors, actuators and data is not plausible power supply" on page 52) Check that the column selection is set correctly in the interface channel (serial, RS232). configuration (see "Interface channels 1-32" on page 105). Check the configuration of the serial interface (see "Interfaces"...
  • Page 211: Log Entries And Error Codes

    Chapter 15 Troubleshooting and repair 15.2 Log entries and error codes Log entry Parameter Description Code Plain text Code Plain text 1000 POWER ON System start completed > 0 Internal system error Restart due to internal system error. There may be a hardware problem if the "POWER ON"...
  • Page 212 Log entry Parameter Description Code Plain text Code Plain text 1111 ALOHA STOP End of Aloha transmission mode Aloha transmission mode was stopped unexpectedly. The parameter specifies how many more seconds Aloha transmission mode should have lasted. 1114 BACKUP SUPPLY The power supply was switched to the rechargeable buffer battery.
  • Page 213 Chapter 15 Troubleshooting and repair Log entry Parameter Description Code Plain text Code Plain text 1281 ZLIB Internal error STREAMPROCESS Contact the manufacturer if the device log includes this error several times (see "Contact information" on page 227). 1282 ZLIB Internal error STREAMFINISH Contact the manufacturer if the device log...
  • Page 214 NO NET (NET Netlock/no matching provider LOCK) Try to improve the position of the antenna. Check whether the device is in the coverage area ( (www.microtronics.com/footprint). NO NET No GSM network Improve the position of the antenna Try again later GPRS ERROR No GPRS connection Try to improve the position of the antenna.
  • Page 215 Chapter 15 Troubleshooting and repair Log entry Parameter Description Code Plain text Code Plain text 2000 MODULE ERR Module-specific error (see "Error codes of the RS232 interface " on page 61) or area for customer-specific error codes, that can be written in the device log by means of the "Mdn_ 2999 WriteLog()"...
  • Page 216 Try again later BEARER NO -992 --- No answer ANSWER Try again later Check whether the device is in the coverage area (www.microtronics.com/footprint). BEARER NO -991 --- No carrier CARRIER Try again later Check whether the device is in the coverage area (www.microtronics.com/footprint).
  • Page 217 Error when selecting the network FAILURE Check whether the device is in the coverage area (www.microtronics.com/footprint). 1200 BAND SEL FAILED -969 --- A network could not be found on the GSM900/1800 or on the GSM850/1900 band. Try to improve the position of the antenna.
  • Page 218 Log entry Parameter Description Code Plain text Code Plain text TCP channel error (2/2) 1200 CHANNEL OUT OF -962 --- The optional value is outside the permissible RANGE range. Try again later CHANNEL -961 --- Internal error MEMORY CHANNEL -960 --- Internal error INTERNAL CHANNEL INVALID -959 ---...
  • Page 219: Evaluating The Device Log Using Deviceconfig

    Chapter 15 Troubleshooting and repair 15.3 Evaluating the device log 15.3.1 Evaluating the device log on the myDatanet server The last 300 log entries on the myDatanet server can be called up via the button shown below that is located in the measurement device list.
  • Page 221: Chapter 16 Spare Parts And Accessories

    Chapter 16 Spare parts and accessories Chapter 16 Spare parts and accessories 16.1 Antennas Description Quantity Order number Extension cable for antenna SMA-M/SMA-F 2,5m 206.807 Angle adapter SMA-M/SMA-F 300318 Flat antenna Smart Disc Multi Band 2xSMA-M 2m 301090 16.2 Power supply Description Quantity Order number...
  • Page 223: Chapter 17 Document History

    Chapter 17 Document history Chapter 17 Document history Rev. Date Changes 12.10.2020 First version Rev. 01...
  • Page 225: Chapter 18 Glossary

    The manufacturer's devices are equipped with subscriber identity modules (SIM) ex-works for the purpose of mobile data transmission. The footprint describes the countries and regions, in which a mobile connection is available (see www.microtronics.com/footprint). NaN value The myDatanet  uses special encoding to display different error statuses in the measurement values, for example.
  • Page 227: Chapter 19 Contact Information

    Chapter 19 Contact information Chapter 19 Contact information Support & Service: Microtronics Engineering GmbH Hauptstrasse 7 3244 Ruprechtshofen Austria, Europe Tel. +43 (0)2756 7718023 support@microtronics.com www.microtronics.com Microtronics Engineering GmbH (Headquarters) Hauptstrasse 7 3244 Ruprechtshofen Austria, Europe Tel. +43 (0)2756 77180 Fax.
  • Page 228 Certified by TÜV AUSTRIA: EN ISO 9001:2015, EN ISO 14001:2015, EN ISO 50001:2011 for myDatanet | TÜV SÜD: ATEX Directive 2014/34/EU © Microtronics Engineering GmbH. All rights reserved. Photos: Microtronics Microtronics Engineering GmbH | www.microtronics.com Hauptstrasse 7 | 3244 Ruprechtshofen | Austria | +43 2756 77180 | office@microtronics.com 301102 | Rev.01...

Table of Contents