Home

iMod User`s Manual ENG

image

Contents

1. 78 ER COMORES AIO mcm 78 WED VIS UOTE sat ote Sanne pantrrnenseade esata eoimant eae iee 79 IAD une 79 CRL nee E 79 SEU ejr 79 O 2012 TechBase S A Technical contact support techbase eu 5 100 iMod User s Manual ENG 4 100 Apache EEGEN HEEN eege EE ER Dafa REJISTENINO ME 83 E C dll E E EE E E AE E er ee ee E S 83 1 LEE 87 Example configuraion Modbus to SNMP ir 87 IMOG SDE We 90 lui au s e eta te E ted 91 XML Tree Possible Configuration Elements sn 92 o e 98 O 2012 TechBase S A Technical contact support techbase eu 4 100 iMod User s Manual ENG 5 100 O 2012 TechBase S A Technical contact support techbase eu 5 100 iMod User s Manual ENG 6 100 QuickStart O 2012 TechBase S A Technical contact support techbase eu 6 100 iMod User s Manual ENG 7 100 Preparation for the first start up 1 Power adapter In order to connect the device you need to prepare a power adapter according to the specification with the minimum parameters of 12VDC 1000 mA You can use the DN 20 24 power adapter 2 Network cable with RJ45 connector Network cable will be used to connect the device to a local area network LAN with access to the Internet or for a direct c
2. FE e VALUE CHANGE CHANGE USER LED Declaration of the event triggered modbus channel message channel name ModbusEvent gt protocol name modbus gt lt port gt ET localhost 502 TCP lt port gt lt message channel gt After a change of the value in the 104 parameter the parameter value is propagated to the 105 address which is indicated by the USER LED 2012 TechBase S A Technical contact support techbase eu 73 100 iMod User s Manual ENG 74 100 O 2012 TechBase S A Technical contact support techbase eu 74 100 iMod User s Manual ENG 75 100 These are the three stages POI input and USER LED have low status USER LED 0 PO1 has been changed PO1 value has been sent to modbus 105 address of the 502 port of a device with the following IP Localhost IP LOCALHOST PORT 502 ID 105 IP LOCALHOST PORT 502 MODBUS 2012 TechBase S A Technical contact support techbase eu 75 100 iMod User s Manual ENG 76 100 Force Read Modbus message for reading values is the least frequently used type but for some solutions it is irreplaceable This type of message enables a refresh read at an event of other parameters defined on the iMod platform VALUE 0 VALUE 1 READ ID 102 VALUE 1 Channel declaration is carried out similarly to other messages There is a possibility of defining the receiver both when
3. The SMS messages do not support national characters like e g a C Dynamic content definition In message contents you can use MACROS Those macros will be replaced dynamicaly by temporary value Below is presented list of available macros e REG NAMETid ID content of parameter with ID id e REG VALUE id current value parameter with ID id e REG UNIT id value from UNIT element defined in parameter with ID id e REG LABEL id value from Label element defined in parameter with ID id In macros instead of specify ID you could use word THIS It means that value written in this macro will be taken from parameter value which trigger parent event Such mechanism enable better performance and more transparency configuration For example REG VALUE THIS 2012 TechBase S A Technical contact support techbase eu 78 100 iMod User s Manual ENG 79 100 Web Visualization The iMod platform has a bult in Apache2 web server Two kinds of web interfaces were created on the basis of this server A system integrator can use them for building the visualization NXDynamics DYNAMICS NXDynamics is a modern web visualization platform web SCADA dedicated to cooperation with the NPE iMod devices via web browser The main advantages are e quick refresh of parameters e efficient data transfer without overloading bandwidth Further information on the NXDynamics interface and examples of its use can be found in t
4. property name user value testnpe gt property name password valuez 123npe lt protocol gt lt port gt mail a2s pl lt port gt lt recipient gt techbase a2s pl lt recipient gt lt message channel gt In order to define a message sending channel you need to provide e freely configurable channel name element e protocol element it must equal EMAIL e the protocol element must contain the definition of user s account user and password to log into the server e port element defining the SMTP e mail server e list of recipients each recipient must be located between a recipient element There are no limitations on the number of recipients Message Definition A message must be defined in accordance with the format presented in the Messages Definition chapter Assigning e mail to an event In the event element you need to provide a reference to an e mail channel and an ID of a message to be sent Example definition event type LoAlarm gt lt message channel channel name Email sender lt message id gt EmailMessagel lt message id gt lt property name trigger value 1 gt lt event gt 2012 TechBase S A Technical contact support techbase eu 68 100 iMod User s Manual ENG 69 100 SMS SMS iMod has the function to send an SMS with a dynamically generated content Example of a configuration sending messages to 48123456789 when the 102 parameter value cha
5. Available hardware resources and the precise look of the chart may differ depending on the version and model of the device Videotutorial www youtube com watch v psAXI8W3nTw O 2012 TechBase S A Technical contact support techbase eu 26 100 iMod User s Manual ENG 27 100 UO Access Via Modbus TCP Protocol read p PT _ _ Modbus TCP write Digital UO After uploading an appropriate configuration you can gain access to all the input output resources that the platform is equipped with using the Modbus protocol In order to gain access to the resources you need to upload the MainConfig xml directory containing definitions of all the hardware resources for location of the mnt mtd iMod config configuration and reboot the iMod A complete example configuration can be found on the FTP server Configuration File Structure The iMod configuration is saved in the MainConfig xml file located in the mnt mtd iMod config directory on the device Upload the configuration which enables access to the hardware resources using the Modbus TCP protocol Run Notepad Enable the NPP FTP plugin Configure the FTP connection with the device Download current configuration of the device mnt mtd iMod config MainConfig xml Download current configuration from the mnt mtd iMod config examplel hardware access xml device Copy the content of the examplel hardware access xml file into the MainConfig xml file Save
6. address type primery p secondary s e ID an integer from 0 to 255 When you detect Mbus registers in the meter you need to go to the scanning stage with the iMod engine O 2012 TechBase S A Technical contact support techbase eu 51 100 iMod User s Manual ENG 52 100 Making Your own MBus Configuration Generating Configuration iMod scan Mbus iMod supports the process of scanning on the Mbus protocol on all the serial ports at the same time In order to run a mechanism execute this command imod scan mbus In this moment the device will start the scanning with a default response time out for meters 2000ms After finishing scanning the MBusScan xml resulting file is created In this file there is a configuration containing all the available parameters detected during scanning If the meter is detected during scanning you will be informed about it with a proper write e g 12 05 25 223 dev ttyS0 com0 INFO Found MBUS slave com0 2400 8E1 p2 id 09847273 type CF55 Consolidation of Configuration with Main File After scanning the Mbus you need to copy part of the configuration into the main configuration the MainConfig xml file from the mnt mtd iMod config directory When you join the configurations you need to reboot the iMod platform with the imod start command Source channel The source channel element can be completely transferred into the main configuration Do not make any changes in this
7. e Offset displacement e Scale scale e Description an element enabling adding a parameter description e Label an element enabling labeling a parameter e minVal an element defining a minimum allowed parameter e maxVal an element defining a maximum allowed parameter Definition of Message Content Further information on communication and message content is in the Event triggered definition chapter messages definition Configuration Validation Before loading a configuration to a device you may validate the configuration on your computer In order to do that you need to download a parser from an FTP server for iMod clients or iMod product from the following website www a2s pl iMod configuration parser O 2012 TechBase S A Technical contact support techbase eu 33 100 iMod User s Manual ENG 34 100 Modbus Gateway Router Proxy The iMod can perform functions of a modbus gateway router or a proxy device at the same time In the following chapter you will find a definition of the mentioned functionalities with configuration examples Modbus Gateway Modbus device 1 Modbus Gateway Modbus device 3 Modbus Master Modbus Multi Master Slaves Information from Modbus slave Modbus RTU Modbus ASCII devices received through a serial port is transmitted to the Ethernet network Modbus TCP Modbus Router Modbus device 1 Modbus Router Modbus Master Modbus device 3 Modbus Slaves e Modbus
8. 100 iMod User s Manual ENG 84 100 Simple Registration In order to begin registration of parameters into one file you need to do two things e Add the acugisition period property into the imod element by entering the value in seconds you define how often you want to register selected parameters imod version 1 0 0 acquisition period 10 gt e Add the data logging element into a selected parameter lt data logging gt ture lt data logging gt The parameters will be registered in the data csv file in the mnt data SQL directory The values saved into a csv file are previously counted by the scale and offset elements Example configuration registering the value of the USER_LED every ten seconds lt xml version 1 0 encoding UTF 8 gt lt imod version 1 0 0 acquisition period 10 gt group name Definicje kanalow access channel name Modbus S1 gt protocol name MODBUS gt lt port gt ET 502 TCP lt port gt lt access channel gt source channel name NPE 10 gt protocol name HARDWARE gt lt gap gt 0 lt gap gt lt cycle gt 5 lt cycle gt lt source channel gt lt parameter gt lt id gt 100 lt id gt lt data logging gt true lt data logging gt lt description gt USR LED lt description gt source channel channel name NPE io parameter id USER LED gt access channel channel name Modbus S1 parameter id 100 gt lt parameter gt lt group gt lt imo
9. 8 e datatbits Even e Stop bits 1 e protocol type default Modbus RTU The above configuration contains only required elements Remaining elements such as modbus ID of the device or response to a request time are default Further information on the possible elements in defining the Modbus type source channel can be found in the XML chapter 2012 TechBase S A Technical contact support techbase eu 36 100 iMod User s Manual ENG 37 100 R I Modbus master Add Access channel Access Channel Modbus TCP After defining the data source add the definition of access to the data In this example it is the access via the Modbus TCP protocol access channel name Modbus S1 gt protocol name MODBUS gt lt port gt ET 502 TCP lt port gt lt access channel gt Add Parameter modbus registers Define the readout from selected modbus addresses and assign them to modbus addresses in the iMod In order to do that you need to include a reference to access and source channel in the parameter structure parameter lt id gt 1 lt id gt source channel channel name Modbus M1 parameter id 1 gt access channel channel name Modbus S1 parameter id 1 gt lt parameter gt The Modbus RTU register with the address of the 1 device connected to the COM3 port is converted to the TCP Modbus register with the same address The following example enables users to buffer
10. AI1 Data source from an external modbus device from a 101 register O 2012 TechBase S A Technical contact support techbase eu 32 100 iMod User s Manual ENG 33 100 lt source channel channel name ModbusSlave parameter id 101 gt Data source from a 1 wire sensor source channel channel name OneWire parameter 1id 28E616CA020000 temperature9 gt Access channel Element Assigning parameter to the access channel An assigned channel is identified by providing its name Many elements may be assigned to one access channel parameter You should provide the parameter id properties along with the name The parameter id format strictly depends on a communication protocol assigned in the channel definition e g for a modbus parameter the parameter id is the starting address of the parameter access channel channel name ModbusSlave parameter id 101 gt Event Element Each parameter may include the event element Further information on this element may be found in the event communication chapter This element is responsible for additional actions during values read out Optional Elements A number of elements improving clarity of the configuration may be assigned to each parameter Additionally content of the elements will be saved together with the parameter value in the SQLite3 default database modbus db It enables further download of the values and presenting them on the website in an easy way
11. If you see that the green RX LED signals feedback data it means that the O 2012 TechBase S A Technical contact support techbase eu 50 100 iMod User s Manual ENG 51 100 meter replies slower than 1000ms In this case use heatmet command with the t XXXX parameter where XXXX is the response time in ms If you receive the CHECK sum OK message in response Hheatmet s AUU 4400 34 SEMDCTd23 9 0x03 0x68 Ox53 OxFF OxBB OxOD Ox16 timeout 1000 ms Setting baud from B2400 to B2400 lengthz0 SENDCfdz3 5 Ox10 Ox5B OxSE OxE9 0x16 Time 717651 us 0 bytes ime 427 us 152 bytes ponse UK eangtn l5 b Jx94 Ox 9 Ox19 Ox04 0x36 OK Ox66 Ox92 O0x92 0x68 Ox06 0x58 Oxr2 0x94 Ox 9 1 Oste OxO1 OxOO OxOO OxOO It means that you can proceed to the next step Checking the Meter Support via Library Mubs jar The next step is to check if the mbus library detects the meter Example query java jar mnt mtd iMod jar protocols mbus jar comO 2400 8E1 p94 Query structure java jar path to the iMod installation directory jar protocols mbus jar lt serial port gt communication parameters meter id path to the iMod installation directory you can check it with the command getenv grep IMOD Available ports e comO RS 232 1 e com1 RS 232 2 e com3 RS 485 Available message parameters e 2400 connection baud rate e 8E1 connection properties Meter ID e p
12. RTU Modbus ASCII For Modbus RTU the frame is built of the following fields lst byte 2nd byte 3rd 4th byte 5th 6th byte 7th 8th byte Device id modbus address Function code Initial register Number of registers for readout Checksum Example frame Device id 10 Function code 0x03 Initial register 0 10 registers Checksum Adjusting 1st Byte The modbus address is set by adding the following element lt property name device id value XX gt Further information can be found in the Point to multipoint connection section 2012 TechBase S A Technical contact support techbase eu 40 100 iMod User s Manual ENG 41 100 Adjusting 2nd Byte Functions Codes There are four readout function codes in modbus d iTi eT Wer A ETUIS Function description 0x01 Coil Modbus register for reading and writing binary parameters 0 1 0x02 Discrete Modbus register for read only binary parameters 0 1 0x03 Output Modbus register for reading and writing 0x04 Input Modbus register for read only In iMod you change the sent function code in the poll by adding a property element named varspace e g lt property name varspace value coil gt The name varspace is used because in older devices function code also meant memory area from which a parameter was taken Example definition of a coil type modbus register lt parameter gt lt id gt 1 lt id gt lt source channe
13. be synchronized with the RTC after the Y OUT RESTORE Variable defining if the state of digital inputs outputs should be restored ly DEFAULT ROUTE Variable defining a default routing ETH START CONSOLE Startup of the system console on the COMO serial port dev ttySO N START BLINK NPE system operation indicator on the RDY diode N START DHCP IP lease from a router Y START FTP Variable defining if the FTP server starts at the device startup Y START TELNET Variable defining the telnet server startup Y START_SNMP Variable defining if the SNMP server starts at the device startup N START SMS Variable defining if the SMS server starts at the device startup Y START NPESRV ii helps to find the device in the network with the SearchNPE Y START INITSRV Variable defining loading of the start scripts from the mnt mtd init srv directory Y START_APACHE Variable defining the automatic startup of the apache server ly START POSTGRESQL Variable defining the automatic startup of the PSQL server Y START SSH Variable defining the automatic startup of the SSH server ly VPN SERVER Variable defining the address of the VPN server 10 8 0 1 The PostgreSQL support and some components like e g VPN or SSH are not installed on the device These packages require further installation with the packages manager softmgr 2012 TechBase S A Technical contact support techbase eu 21 100 iMod User s Manual ENG 22 100 Startup Ser
14. can disable creating it by adding the parameter_db false properties to the imod element to improve performence lt imod version 1 0 25 paramter db false gt 2012 TechBase S A Technical contact support techbase eu 71 100 iMod User s Manual ENG 72 100 If you assign value 1 in the SQLiteFlag column the iMod engine will try to enter the value from the VALUE column and to change the flag with value 0 automatically Message channel Definition Example channel definition message channel name PSQL Alarms protocol name SQL gt lt port 0 0 0 0 5432 databaseName port lt property name mode value direct gt lt property name driver value POSTGRESQL gt lt property name user value postgres property name password value message channel PSQL type message channel element contains the following elements e protocol protocol definition Must equal SQL e port IP definition where the PSQL server is located The 0 0 0 0 value indicates an iMod device where it is started After entering the IP you need to type in the TCP PORT where the database listening has been launched The Default value is 5432 The last value in the port field is the name of the database you want to connect to e mode database connection mode Must equal direct e driver database driver Must equal POSTGRESQL e user database user s login e password database password If you do not enter th
15. gt element you need to provide a reference to an SMS channel and an ID of a message to be sent Example definition event type LoAlarm gt lt message channel channel name SMS sender gt message id SMSMessagel message id property name trigger value 1 gt lt event gt You can also define a recipient in the event In order to do that you need to add the message channel channel name SMS sender element to the parameter id phone number element Definition of a recipient in a channel reference message channel channel name SMS sender parameter id 48987654321 gt Example of assigning SMS sending to an event with a recipient definition event type LoAlarm gt message channel channel name SMS sender parameter id 48987654321 gt message id SMSMessagel message id property name trigger value 1 gt lt event gt Action Verification In order to verify the operation of SMS sending you can define a simple configuration which sends a message at a parameter change You will see the following entry in the Mod log file 11 15 05 502 INFO SMS CHANNE NAME The channel SMS CHANNE NAME received the event leid 73f9 d98a pos 1 200 parameter id none message YOUR MESSAGE CONTENT O 2012 TechBase S A Technical contact support techbase eu 70 100 iMod User s Manual ENG 71 100 Database Entry DATABASE iMod has a built in mechanism for writing to a da
16. imod ftp a2s pl Pass npe 1m0d Example Configuration of Receiving Access to Hardware Resources The iMod platform enables multiple access both to the internal hardware resources and the external parameters In case of building a proper configuration the data is stored in a database available via a web template Modbus protocol and SNMP A few ways of gaining access to hardware resources are presented as an introductory example this will be useful in further learning about the iMod platform operation O 2012 TechBase S A Technical contact support techbase eu 25 100 iMod User s Manual ENG 26 100 I O access from NxDynamics read p E m m CH Et write Digital UO Web visualisation Each iMod device is delivered with a pre installed trial version of the NXDynamics interface The possibility of a free interface update ends after 30 days It enables an easy preview of hardware resources and control of digital outputs via the web interface e Type lt P of the device gt nx into the browser URL address bar e Log into the website and click on the O tab e On the screen you will see a hardware resources chart which you can control with your mouse NX DYNAMICS 0 Vv 00 V ADS 2 apc3 CONNECTED The NxDynamics interface uses a dedicated message channel with an application for interrupt support of hardware resources It provides almost instant refresh of the parameters on the web without burdening bandwidth
17. lt port gt ET 0 0 0 0 lt port gt iMod can read the values of the one wire sensors from another device The default setting of the port is the device which the iMod is started from you can just change the IP in order to receive values from another device Gap amp Cycle lt gap gt 0 lt gap gt lt cycle gt 10 lt cycle gt The time intended for refreshing parameters expressed in seconds e Gap time free from readout e Cycle the amount of time intended for refreshing all the values of the channel Transferring Access channel lt access channel name Modbus gt lt protocol name MODBUS gt lt port gt ET 1502 TCP lt port gt access channel MAINCONFIG access channel name Modbus gt protocol name MODBUS gt lt port gt ET 1502 TCP lt port gt access channel You can transfer the access channel completely into the main configuration The default data access is configured on the 1502 port If you already have data access via Modbus TCP on the 502 port in the main configuration you don t have to transfer the access channel element You just need to change the name of the access channel in the parameters Transferring Parameters O 2012 TechBase S A Technical contact support techbase eu 48 100 iMod User s Manual ENG 49 100 e e e lt source channel channel name OneWire parameter id 28bE616CA020000 temperature y DA gt lt source channel channe
18. port have polarizing resistors A Biasing polarizing resistors are built in all the NPE devices produced since 01 02 2012 Q What is the analog and digital input resolution in the 9000 series A Analog inputs 12 bit digital inputs 45Hz Q Does iMod operate in continuous mode as a TCP master and a TCP slave or do need to reconfigure A iMod operates as a router It can be both a master and a slave Q Can I reset the digital input counter with the Modbus TCP A Yes you can O 2012 TechBase S A Technical contact support techbase eu 98 100
19. remember to increment the following access channel parameter ID by two There are five types of parameters in iMod Parameter type Description int16 int32 word16 word32 real32 Example parameter definition parameter type int16 gt lt id gt 1 lt id gt lt source channel lt access channel lt parameter gt parameter type int32 gt lt id gt 2 lt id gt lt source channel lt access channel lt parameter gt lt parameter type word16 gt lt id gt 3 lt id gt lt source channel lt access channel lt parameter gt lt parameter type word32 gt lt id gt 4 lt id gt lt source channel lt access channel lt parameter gt lt parameter type real32 gt lt id gt 5 lt id gt lt source channel lt access channel lt parameter gt 2012 TechBase S A 16 bit Parameter 32 bit Parameter 16 bit Parameter with no sign unsign integer 32 bit Parameter with no sign unsign integer 32 bit Parameter with a floating point value channel name Modbus M1 channel name Modbus S1 parameter id 1 parameter id 1 channel name Modbus M1 channel name Modbus S1 parameter id 2 parameter idz 2 channel name Modbus M1 channel name Modbus S1 parameter id 4 parameter id 4 channel name Modbus MI channel name Modbus S1 parameter 1d 5 parameter idz 5 channel name Modbus M1 channel name Modbus S1 parameter idz 7 parame
20. slave devices can work in the Ethernet network e Modbus master device can communicate via serial port O 2012 TechBase S A Technical contact support techbase eu 34 100 iMod User s Manual ENG 35 100 Modbus Proxy Modbus device 3 Modbus Slaves e Readout from slave type devices e Write in the buffer e Transmitting data to modbus masters O 2012 TechBase S A Modbus Router Modbus Master Technical contact support techbase eu 35 100 iMod User s Manual ENG 36 100 Point to Point Connection Example Configuration Structure san COM3 RS485 TCP IP Modbus device Modbus master This example demonstrates a method of communication of the iMod device with another device supporting the Modbus RTU protocol An example configuration example2 modbus proxy xml can be found in the device directory mnt mtd iMod config examples Add Source channel Source channel e SSBOCOULUL ZAAApw o o swoaA AM COM3 R5485 Modbus device First you need to define a serial port for the readout This is a structure of the configuration of a channel supporting the Modbus RTU protocol on the COM3 port source channel name Modbus M1 gt protocol name MODBUS gt lt port gt com3 19200 8E1 lt port gt lt gap gt 0 lt gap gt lt cycle gt 6 lt cycle gt lt source channel gt The parameters of the serial port are as follows e COM port 3 RS 485 e baudrate 19200 baud s e datatbits
21. the GPRS connection GPRS PING IP 2 related to GERS RECONNECT 1 255 1 255 1 255 1 255 AUTO 1 255 1 255 1 255 1 255 Definition of the Usepeerdns use while a connection attempt In case when the GPRS AUTO DNS option is set to N the written DNS records are set for the GSM 1 255 1 255 1 255 1 255 network In case when the GPRS AUTO DNS option is set to N the written DNS records are set for the GSM 1 255 1 255 1 255 1 255 network In case when the GPRS AUTO DNS option is set GRPS DNS 3 to N the written DNS records are set for the GSM 1 255 1 255 1 255 1 255 network GPRS LOGIN Login for the APN of the GPRS connection String GPRS PASSWORD Password for the APN of the GPRS connection String GPRS AUTO DNS GRPS DNS 1 GRPS DNS 2 SIM card PIN In case of no PIN on a card this setting will be ignored Number GPRS PIN Activation of the DynDNS service at every GPRS GPRS DYNDNS connection with options in the etc inadyn conf Y N file GSM modem multiplex mode Enables using the GPRS session dev ttyS5 and SMS sending dev ttyS6 leaving one channel for any usage dev ttyS7 GPRS MUX Y N O 2012 TechBase S A Technical contact support techbase eu Autocomplete depending on the model 208 67 222 222 208 67 220 220 211 138 151 161 202 101 103 55 8 8 8 8 empty empty empty 23 100 iMod User s Manual ENG 24 100 DynDNS Configuration iMod
22. the configuration on the device It is recommended to copy the previously uploaded configuration into the configuration parser in order to check if the configuration is correct This time you don t have to do that because you have a guarantee that the prepared example files are correct Log into the device with a console or the NxDynamics interface 9 reboot the iMod with the imod start command NOOB WYN Hm O0 Video tutorial points 1 7 www youtube com watch v 1ouYOkJQvBU medium O 2012 TechBase S A Technical contact support techbase eu 27 100 iMod User s Manual ENG 28 100 Startup of the Platform The iMod platform runs automatically after activation of the NPE firmware If you modify the configuration you need to reboot the iMod You can do that by writing the imod start command from the command line There are different iMod startup modes debug and trace which are useful in case of developing own configurations The iMod platform operation can be previewed in real time through so called live logs In order to preview with a live log execute the following commmand tail f mnt data logs iMod log n case of a startup of the platform in the trace mode you will see each parameter change and each supported question together with the sent answer Operation Verification Verify if you can connect to the device with the modbus protocol Run a modbus master type appllication np modbus poll Configure polling
23. www youtube com watch v W6wBm_GtWX8 2012 TechBase S A Technical contact support techbase eu 58 100 iMod User s Manual ENG 59 100 Event Communication SERVER e 2 MOBILE C aA PC MODBUS DEVICE The iMod platform has a built in event triggered action performance mechanism There are a few types of action e g e mail sending bash scripting There are also a few conditions of triggering an event e g after crossing the value with a set threshold In addition it has force read and force write mechanisms The following chapter describes the event configuration method Each event must be within the parameter element and must contain message channel action type elements Triggering Conditions Together with the event element definition a triggering condition is defined An example event event type OnChange gt message channel channel name Email sender lt message id gt Mess 1 lt message id gt lt event gt 2012 TechBase S A Technical contact support techbase eu 59 100 iMod User s Manual ENG 60 100 OnUpdate v Ch vr OnUpdate The first triggering type is the event type which takes place at each parameter readout The event will be triggered regardless of the value It is useful in typical event triggered communication like e g RFID reader support The same user may enter or quit Then the card ID doesn t change however the event sen
24. 2 parameters from the address 100 Configure the connection setting with the device Device id 1 Default IP 192 168 0 101 default TCP port 502 Start polling Check if the hardware resources on the NxDynamics chart change in accordance with the changes made by the actions performed via the TCP modbus protocol U B WN H Video tutorial illustrating points 1 5 www youtube com watch v 6tKCJUZSQMo Extensive Hardware Resources File Depending on the version of the device you can extend the example configuration with additional parameters On the FTP server you can find the examplel hardware access extended version xml configuration for the NPE 9000 series O 2012 TechBase S A Technical contact support techbase eu 28 100 iMod User s Manual ENG 29 100 UO Access with Telnet Console read Eo a write Digital UO Telnet client The NPE platform provides two access levels to hardware resources with the uploaded into firmware of the device npe application which uses hardware resources library of the NPE device via the npe service application which provides permanent readout of hardware resources Readout with npe Application In order to use the built in npe application you need to log into the device as a super user root The npe command is visible from any place on the device Readout is done by assigning one of the inputs outputs to the variable and calling the variable with the echo comm
25. 2 158 0 145 O 2012 TechBase S A 18 83 C 4 04 25 00 20 30 40 55 18 83 C4 04 22 18 83 04 04 21 18 83 C4 04 24 18 83 04 04 23 1583040423 2628108530 urnas err iMod TRM 2 6 26 10 30 MxDynamics iMad TRM 26281031 2 6 26 10 11 NxDynamics TESTER 1 TESTER 2 2 6 26 10 11 NxDynamics TESTER_3 2 6 26 10 11 NxDynamics 26281031 iMod TRM iMod TRM TESTER 4 Technical contact support techbase eu 10 100 iMod User s Manual ENG 11 100 Next you need to set the scope of the addresses you search as default for the LAN For example for 192 168 5 x network addresses type in 192 168 5 192 168 0 Click on the Search button in order to search the network ee zc NEM a WW 2012 TechBase S A Technical contact support techbase eu 11 100 iMod User s Manual ENG 12 100 Telnet connection When you already know the IP address of a device you can make a telnet connection in order to begin the device startup and configuration In Windows 7 you need to install the service manually e type in telnet IP address in the command line interface C v telnet 192 168 8 181 e The following window appears You need to enter a login and a password in order to log in The default values are e Login user e Password user The entered password is not visible on the screen e In order to get Administrator privileges you need to use the su command Default password
26. 295 main INFO Parsed the configuration file in 1 66 ms 12 01 21 155 main INFO Interpretation took 849ms 12 01 29 679 main INFO Running Scanner 12 01 29 750 main INFO OneWire scanner initialization 12 01 30 252 main INFO Running owserver client thread on ip 0 0 0 0 port 4304 12 01 30 260 main INFO Waiting for bus reset 12 01 30 280 main INFO Trying to run OneWire scanner 12 01 30 392 main INFO Scanning in progress Please wait 12 01 30 401 ONEWIRE 4304 INFO Starting the scan on port 4304 ip 0 0 0 0 12 01 32 820 ONEWIRE 4202 INFO Found Wire slave id 28E616CA020000 type THERMOMETER DS18B20 12 01 32 861 ONEWIRE 4594 INFO Add OneWire parameter 28E616CA020000 temperature definition 12 01 32 875 ONEWIRE 4304 INFO Add OneWire parameter 28E616CA020000 temperature9 definition 12 01 32 889 ONEWIRE 4304 INFO Add OneWire parameter 28E616CA020000 temperature10 definition O 2012 TechBase S A Technical contact support techbase eu 46 100 iMod User s Manual ENG 47 100 12 01 32 903 ONEWIRE 4304 INFO Add OneWire parameter 28E616CA020000 temperaturell definition 12 01 32 917 ONEWIRE 4304 INFO Add OneWire parameter 28E616CA020000 temperature12 definition 12 01 32 928 ONEWIRE 4 04 INFO Close sensor detecting 12 01 32 947 main INFO Trying to write to XML file 12 01 33 881 main INFO XML file mnt mtd iMod config ONEWIREScan
27. 4 PO4 Open Collector digital output This is Relay in the R series models 5 PO3 Open Collector digital output This is Relay in the R series models 6 PO2 Open Collector digital output This is Relay in the R series models 7 POI Open Collector digital output This is Relay in the R series models 8 DO2 Open Collector digital output 9 DOI Open Collector digital output 10 T 1 RS 232 Serial port Transmit data com0 11 RX1 1 RS 232 Serial port Receive data com0 12 GND Serial port common ground 13 n3 3 RS 232 Serial port Transmit data com2 14 RX3 3 RS 232 Serial port Receive data com2 The serial ports in the iMod configuration are defined com0 RX1 TX1 and com2 RX3 TX3 respectively 2012 TechBase S A Technical contact support techbase eu 18 100 iMod User s Manual ENG 19 100 2 Screw Connection Description C2 See the F A Q chapter if you want to find out more about connection to hardware 77A RS485 serial port Pin number Label 3 GND Ground 5 DI2 Digital input 7 DI4 Digital input 9 DI6 Digital interrupt input 11 DI5 Digital interrupt output or a 1Wire interface 13 An 0 10VDC analog input 15 DE 0 10VDC analog input resources O 2012 TechBase S A Technical contact support techbase eu iMod User s Manual ENG 20 100 Configuration of the Device NPE The device based on the
28. CP chart start up dynamic IP FTP marrer wtect up Telnet service gtart up START ESHMP SHMP service start up Available START NFESRY Start deamon that enables sarc GPRS REDCONHECT Start up of promus reconmecting 1112211500 AUTO SYMCTIME Auto Time Synchonization with Eh Dry nus Start refreshing wabdarnain that KANDSON A toni Em Eratall Lininztall Seailakd fe DrYMAMICE bioden interface for operating an 1108261704 E Ter Web HTTP perver 1112211500 2000000009000090H CONNECTED e If there are any updates for the packages you need to use the update option 5oftware Manager Update List Available updates are listed below Package Installed Version Available Version isc OY AL Ics 1204 192343 120509151 1 i APACHE 1205101315 1205111224 GPRS 1205101315 1205111224 CURL 1205101315 1205111224 OPENSSL 1110121433 1201110905 OPENVPN 1111231708 1203071018 SSH 1202091330 1205101315 2012 TechBase S A Technical contact support techbase eu 14 100 iMod User s Manual ENG 15 100 Introduction About Document This documentation describes configuration of the iMod device Device Version Functionality of an iMod depends on the configuration of the device In the following part of this document the term device is used to describe a device based on the iMod platform Certain hardware resources of a
29. WWW INFOPULSAS LT info Qinfopulsas lt iMod User s Manual 2012 TechBase S A Technical contact support techbase eu 1 100 iMod User s Manual ENG 2 100 iMod User s Manual Version Document version Creation Date Changes 210 21 08 2012 Extended base version XML Tree Possible Configuration Elements F A Q chapter supplemented 1 0 0 21 04 2010 Base version 110 01 06 2011 Extended base version 1wire Mbus WWW chapter Basic commands XML Tutorial v dE Added chapter 8 Appendix A Appendix B Appendix C 2 0 0 01 05 2012 Second version For further information on work with the device consult the following documents 1 NPE instructions 2 NxDynamics instructions For further information or in case of finding any innacuracy please use the technical supprt portal TechBase Support in order to submit an application This version of the document is a pre release version made public due to many requests from our customers The folliwing content is not official technical documentation and may be used only as auxiliary information TechBase SA reserves the right to change the contents of the document without notice O 2012 TechBase S A Technical contact support techbase eu 2 100 iMod User s Manual ENG 3 100 Table of Contents l 2 3 4 5 6 7 8 Ke Table of contents Preparation for the first start up Introduction Description of the Connectors Configuration of the Devic
30. ach parameter contains a series of elements defining where data is taken from and a method of data access It is possible to define a parameter which is not related to the Source channel Such a parameter is called dummy It enables to create empty registers on the platform for any use In the parameter definition of an element you can declare its type as well There are the following types of parameters e int16 Integer A whole number from 32 768 to 32 767 e int32 Double Integer A whole number from 2 147 483 648 to 2 147 483 647 e word16 A whole number from 0 to 65 535 e Word32 A whole number from 0 to 4 294 967 295 e real32 A floating point number from 3 4e 038 to 3 4e 03 An example parameter type definition parameter type real32 gt ID Element The value of the ID element must be unique in the entire configuration It is alohanumeric data type e g lt id gt ExampleID1 lt id gt Source channel Element Data source assigned to a channel parameter The assigned channel is identified by providing its name You should provide the parameter id properties along with the name The parameter id format strictly depends on a communication protocol assigned in the channel definition Only 1 source channel element may be assigned to each parameter It is an optional element so you may also omit its definition e g Data source as an analogue input I source channel channel name NPE io parameter id
31. and npe DO1 echo More examples of the NPE application use can be found in the application manual on the device Just type the following command npe Aplikaja npe manual Readout with npe service The NPE platform has a built in application for the event support of hardware resources In order to preview or control the 1 0 in NPE you need to refer to the npe srv client application Example readout of a digital output root techbase npe srv client i DOI Example writing of a digital output root techbase npe srv client i DO1 0 Video tutorial illustrating access to hardware resources from a console www youtube com watch v OyLaqOgEHGk 2012 TechBase S A Technical contact support techbase eu 29 100 iMod User s Manual ENG 30 100 Configuration File Structure Configuration file is written in the XML format The iMod engine reads a configuration from the MainConfig xml file in mnt mtd iMod config directory Loading a Configuration Configuration is loaded via the FTP protocol into mnt mtd iMod config directory While using other programs remember to copy onto NPE platform in binary mode Configuration Verification Each configuration and implemented changes should be verified in 3 stages 1 User PC verification with configuration parser 2 NPE platform verification with iMod built in parser it is done automatically after executing the imod start command 3 Validation of configuration ope
32. arametersRootName value techbaseObjects gt lt property name groupRootName value techbaseGroups gt lt access channel gt lt message channel name SNMP Msg 1 gt lt protocol name SNMP gt lt port gt ET 162 UDP lt port gt property name device id value 1 gt lt property name mib file value etc snmp NPE2 MIB2 txt gt lt property name ip address value 0 0 0 0 gt lt property name parametersRootName value techbaseObjects gt lt property name groupRootName value techbaseGroups gt lt recipient gt 192 168 1 11 162 lt recipient gt lt message channel gt source channel name Modbus M1 gt protocol name MODBUS gt lt port gt com3 19200 8E1 lt port gt lt gap gt 0 lt gap gt lt cycle gt 60 lt cycle gt lt delLay gt 1000ms lt delay gt lt read timeout gt 250ms lt read timeout gt lt source channel gt lt message id trap 1 gt lt CDATA Exceed edge value 11 gt lt message gt lt group gt group name Parameters gt lt parameter type int32 gt lt id gt 1100 lt id gt description ParamIntl description access channel channel name SNMP Slave 1 parameter id 1100 O 2012 TechBase S A Technical contact support techbase eu 88 100 iMod User s Manual ENG 89 100 lt parameter gt lt parameter gt lt id gt 1102 lt id gt description ParamIntl description source channel channel name Mo
33. ase ere Ueleg leiere NEE 20 Startup Services Configuration initsrv NEE 22 EREECHEN 23 DYNDNS Sint e UI ele e ME 24 iMod Platform Quickstart 25 ius lee raen a ec A EN 25 Example Configuration of Receiving Access to Hardware ResoUrces sssssssseee nennen nennen nnn nnn nnns 25 Configuration File Structure EE 30 kse olla gege olaj eltiri eln WE 30 Configuration ehr e ein EE 30 PUSS OR ei gel Led o e c 30 Modbus Gateway Router Proxy 34 MODS OO MT 34 KMOdDUS ROUL diee MT TT 34 MOADUS ide S EE 35 POMETO ROIRE eina sie o uM ea mm 36 Point to Multipoint Sall d e BE 38 pue gas A 40 How to Adjust C nfiguration to the e EE 40 ZOU 5 162 LACS LS CHE 42 Gap Cycle Delay Read Timeout nn ENER 43 Forcing Each Write PO De OP FOCE a mme 45 Integration of 1 Wire Bus with iMod Platform 46 soy ol hs Or D CO Mum 46 Mtegraton egen Le EC e ME 47 MDUS PROC CON 50 eine CU MOMS RER en ae a a eo 50 Making Your own MBUS Configuration EE 52 Scripts as Data Source ere 56 Examples User LED eadoUT tege 56 EVGME C omMU UnNICatIO 2 ee iaeia e ikat ee Eben 59 TADE KR e el el 59 hero Hag qe rU 67 Messages Definition
34. ase there is no type in the paramter element a default value of int16 is taken 2012 TechBase S A Technical contact support techbase eu 53 100 iMod User s Manual ENG 54 100 ID ID is automatically generated and freely configurable It consists of CHANNEL NAMES METER SERIAL NUMBER METER ID FRAME NUMBER Example parameter ID lt id gt MBUS 09847273 2 10 lt id gt Scale multiplier Scale is automatically generated and freely configurable lt scale gt 10e 7 lt scale gt The scale parameter is downloaded from the device by default and saved for J W m 3 etc Scaling of the values takes place in the following way lt scale gt 10e 7 lt scale gt it means VALUE 1 10 7 However you can rescale the result by changing the parameter scale 10e 2 scale Than if the previous value was in J after rescaling it will be presented in GJ By changing a multiplier you should remember to change also the Unit element after Unit Unit is automatically generated and freely configurable An element specifying the unit of read values lt unit gt m 3 lt unit gt Description The description field is automatically generated and freely configurable This is a short description of a Mbus field It describes the value read from a meter lt description gt POWER lt description gt It is possible that the meter has several parameters with the same description Than you need to compare the
35. cle gt parameter defines the frequency of the modbus addresses series update This is a required element The default value unit is a second Gap 2012 TechBase S A Technical contact support techbase eu 43 100 iMod User s Manual ENG 44 100 GAP ycle The gap parameter defines the min require silent at the end of a cycle This is a required element The default value unit is a second Delay GAP DELAY m ycle The delay parameter defines an interval between the modbus polls Declared total values are seconds The delay parameter is optional lack of the parameter results in assigning a default value of Oms Read timeout Read timeout Ra Cycle The lt read timeout gt element defines time the Mod platform waits for a response from a device This is an optional element The default value is 1000ms O 2012 TechBase S A Technical contact support techbase eu 44 100 iMod User s Manual ENG 45 100 Forcing Each Write Property Force There are modbus elements which perform actions after update parameter value iMod has an internal logic that does not forward the write command if the parameter value does not change However you can force such a transmission by adding a property element property name force value true gt Example definition with a force property implementation lt parameter type int32 gt lt id gt 1 lt id gt source channel c
36. creating an example php file which will read the previously declared parameters and control them All the parameters defined in the configuration file are registered in the SQLite database which is in the following directory mnt ramdisk modbus db In order to read the value of a selected parameter you need to refer to the variable value in the VALUE column Result BS Table Data Object Info Documentation Ins Add New F2 Edit Del Delete Ptikey TIGER ID TD Grupo Type I ECL Une Address ScheduleID TCPAddress Name Value SQLiteFlag Comment d 70000 Settings Di 70000 0 70000 TCP PORT 1502 2 70002 Settings D3 70002 0 70002 SCHEDULING GAP 10 3 70003 Settings D4 70003 0 70003 REFRESH PERIOD 0 mm 4 70004 Error D5 70004 0 70004 ERROR 0 mm 5 70005 Settings D6 70005 0 70005 VERSION 1 0 24 mm 6 70006 Settings D7 70006 0 70006 SAVE 0 a 7 100 99 IntRegOut 39 0 100 DO1 0 oO pol 2012 TechBase S A Technical contact support techbase eu 80 100 iMod User s Manual ENG 81 100 PHP Configuration Defining Database First define the access path to the database by specifying its location The SQLite database on the iMod device uses an universal interface for connection with the PDO database this is why there is a reference to this interface in the database definition The db variable is assigned to the modbus db database define DB SQLLITE mnt ramdisk modbus db
37. d gt The data csv files are rotated each time after start of the iMod or after reaching a configured file size The amount and the files and the size after they are rotated is configured in the og4j xml file in the mnt mtd iMod config log4 xml directory O 2012 TechBase S A Technical contact support techbase eu 84 100 iMod User s Manual ENG 85 100 Registration with Message channel ol EVENT iMod can write values of selected parameters into CSV files or databases SQLite or PSQL at certain minutes hours days weeks or even years The schedule of the tasks implemented in the iMod device can be used in a variety of ways e g to write selected parameters into CSV files Cron Format The schedule of tasks functionality is performed with message channel connected to the CRON functionality a Linux program enabling periodic launching of programs and events It enables to define time and date with accuracy of 1 minute Time and date is defined by using separate combinations of signs where each one is responsible for another variable GEIER EENENNNENN month 1 12 5 snnnsnnssnnsnnnne day of month 1 31 EHENHENENENHENENENENEEENENENENENNNENEN hour 0 23 Ew NNNIEwSESNESINESIEENESN ENENINESN EENNINNEENNEN minute 0 59 Apart from the values presented above there is a possibility of using the sign which describes execution of a command for each available time interval value As an exam
38. db new PDO sqlite DB SQLLITE Readout of Values from Database E f I J d The next step is referring to the database and reading proper values for selected parameters in this situation the parameters for which the Description in the MainConfig xml file was defined as USER LED and DI1 sqlite SELECT TIGER ID Name Value SQLiteFlag FROM dane WHERE name USR LED or name DEI The SQLiteFlag variable enables writing selected values directly in the NPE iMod device Next you need to view the parameters which are interesting for a user You need to create a table with a template fragment where a user can change the value of a selected parameter As an example a 4x3 table will be created echo lt table gt echo lt tr gt lt td gt lt b gt ID lt b gt lt td gt lt td gt lt b gt Name lt b gt lt td gt lt td gt lt b gt Value lt b gt lt td gt lt tr gt foreach dbh gt query sqlite as row print lt tr gt lt td gt row TIGER ID lt td gt print lt td gt row Name lt td gt print lt td gt lt form action test php a update method post lt input type hidden name id value row TIGER ID lt input type text name value new value row Value td print lt td gt lt input type submit value upgrade lt form gt lt td gt lt tr gt echo table Writing Value into Da
39. dbus M1 parameter id 1102 gt access channel channel name SNMP Slave 1 parameter id 1102 j lt parameter gt parameter type int32 gt lt id gt 1120 lt id gt lt description gt ParamInt2 lt description gt lt access channel channel name SNMP Slave 1 parameter id 1120 gt event type HiAlarm gt lt message channel channel name SNMP Msg 1 gt lt message id gt trap 1 lt message id gt lt property name SnmpDescr value Trap description gt lt property name SnmpTrapType value inform gt property name trigger value 12 gt lt event gt lt parameter gt lt group gt lt imod gt 2012 TechBase S A Technical contact support techbase eu 89 100 iMod User s Manual ENG 90 100 iMod SDK The iMod engine enables adding user protocols with a simple API in JAVA A precise API description can be found in a separate document describing an example addition of a plugin to the iMod engine Use this link to download the document http www a2s pl products imod SDK iMod Manual PLv3 pdf 2012 TechBase S A Technical contact support techbase eu 90 100 iMod User s Manual ENG 91 100 iMod PLC You can use the iMod platform as a PLC You can program its functionalities in Ladder Logic A precise description of use of the iMod platform as a PLC can be found in the following document http www a2s pl products imod iMod PLC PL pdf In order to use the iMod PLC engine you
40. defining the channel and during an event execution in the parameter In this case the declaration takes place at the parameter this is why a channel definition takes only three lines message channel name ForceRead gt protocol name forceread gt message channel Setting a noChange type event forces a refresh of the 102 parameter in the iMod internal parameter array each time the USER LED doesn t change its value at the read parameter lt id gt 105 lt id gt lt comment gt USR LED lt comment gt lt description gt USR LED lt description gt source channel channel name NPE io parameter id USER LED gt access channel channel name Modbus S1 parameter id 105 gt lt event type NoChange gt message channel channel name ForceRead parameter id 102 gt lt event gt lt parameter gt 2012 TechBase S A Technical contact support techbase eu 76 100 iMod User s Manual ENG 77 100 Force Write Force write type message Is a modbus message which enables to write a value of another parameter at an event In the following example a method in which the DO1 value change results in the DO2 change e Declaration of the channel is made by giving the channel a unique name Enter forcewrite as the protocol e There is a possibility of defining several receivers Enter a parameter ID where the parameter value is written as a receiver e A parameter value where the event Comes out is s
41. device like e g a built in GSM GPRS modem are only in selected versions of the device this is the reason why the is used The means that the described functionality is applicable only to some versions of the device Latest Version of Documentation iMod is a dynamically developed product This way you can receive new functionalities of the device by updating the software A new version of documentation is released with each software update The newest version of the documentation can be found at www a2s pl or the ftp server Host ftp a2s pl Login npe imod ftp a2s pl Pass npe 1mOd About the Device iMod is a telemetry module with an innovative solution based on the concept of three channels e source channel e access channel e message channel The whole operation logic of the device is described in one descriptive file MainConfig xml The following scheme illustrates the system structure of the device O 2012 TechBase S A Technical contact support techbase eu 15 100 iMod User s Manual ENG 16 100 About the NPE system As mentioned before the platform operates on a NPE device This means that it is possible to administer the device in a manner consistent with other devices or computers based on the Linux system using a terminal You can access the hardware resources directly from the NPE system EN GPRS EDGE A detailed description of the NPE and Linux systems is beyond the scope of this document Furth
42. ds a value with the event time to a database Example definition event type OnUpdate message channel channel name BashScript gt lt event gt OnChange OnChange is a type of event which is triggered each time a parameter changes its value HighState O 2012 TechBase S A Technical contact support techbase eu 60 100 iMod User s Manual ENG 61 100 O 2012 TechBase S A Technical contact support techbase eu 61 100 iMod User s Manual ENG 62 100 NoChange 7s NoChange NoChange is a type of event which is triggered each time a parameter doesn t change its value event type NoChange gt message channel channel name BashScript gt event OnChangeStatus OnChangeStatus OnChangeStatus is a type of event which is triggered each time it is impossible to read a parameter or when it is possible again after a communication breakdown O 2012 TechBase S A Technical contact support techbase eu 62 100 iMod User s Manual ENG 63 100 Ww rrFIIFIPIZPIPPIPIPPIPIPZIPF O 2012 TechBase S A Technical contact support techbase eu 63 100 iMod User s Manual ENG 64 100 HiAlarm HiAlarm is a type of event which is triggered each time a parameter exceeds a set trigger It is an equivalent condition to greater than HighState Alarm Value X LowState lt event type HiALarm gt lt message channel channel name BashScript gt lt pr
43. e NPE IMod Platform Quickstart Configuration File Structure Modbus Gateway Router Proxy Integration of 1 Wire Bus with iMod Platform 10 11 12 13 14 15 16 17 18 Mbus Protocol Scripts as Data Source Event Communication Web Visualization Data Registering SNMP iMod SDK iMod PLC F A Q Appendices e iMod Configuration Tutorials e Example XML Configurations e XML Tree Possible Configuration Elements e Useful Tools and Commands e Accessories e TRM Manual O 2012 TechBase S A Technical contact support techbase eu 3 100 iMod User s Manual ENG 4 100 O 2012 TechBase S A Technical contact support techbase eu 4 100 iMod User s Manual ENG 5 100 Spis tresci Preparation for the first start up 7 C nnecting the CS ICS a oe rece ces eats on ee OR a ne 8 Solga eltern Le EE 8 MEENOG Z LAN CONNGCTION e 10 TEER ee e BEE 12 Checking Firmware Version ET 13 Packages Update with PPM 13 Ia dee DT du NEE 15 ADOUE DOCUMEN d p 15 POU E e de a DRE 0e D N EEEE AER 15 ADOUE T NPE Sy SR an ta EE E E Eed 16 Preparation for the first start up iii iiiiiieesererseeenneeeeeneeeeneeeennns 17 Preparation for the first e Te ONE 17 L screw Connecdoh Description e D WEE 18 2 SCreW CONMECHOM BI cageuo E 19 Configuration of the Device NPE 20 B
44. e ip address value 0 0 0 0 gt property name parametersRootName value techbaseObjects property name groupRootName value techbaseGroups lt recipient gt 192 168 1 11 162 lt recipient gt lt message channel gt Example of setting reference to access channel parameter type int32 gt lt id gt 1120 lt id gt description ParamInt2 description access channel channel name SNMP Slave 1 parameter id 1120 gt event type HiAlarm gt message channel channel name SNMP Msg 1 message id trap 1 lt message id gt property name SnmpDescr value Trap description property name SnmpTrapType value inform property name trigger value 12 gt 2012 TechBase S A Technical contact support techbase eu 87 100 iMod User s Manual ENG 88 100 lt event gt lt parameter gt Parameters OIDs The last thing you need to do in order to build the SNMP configuration of the iMod device is to add parameters This is the whole example configuration lt xml version 1 0 encoding UTF 8 gt lt imod version 1 0 25 gt lt group name Channels definition gt access channel name SNMP Slave 1 gt lt protocol name SNMP gt lt port gt ET 161 UDP lt port gt lt property name device id value 1 gt property name mib file value etc snmp NPE2 MIB txt gt lt property name ip address value 0 0 0 0 gt property name p
45. e direct operation mode iMod will create its own ALARM table where it will insert entries in case of an event O 2012 TechBase S A Technical contact support techbase eu 72 100 iMod User s Manual ENG 73 100 SQL Expression Definition The SQL expression which is to be executed must be entered in the messages element content It can contain any SQL question and in place of parameters content it can use MACROS Further information on communications structure can be found in the event communication section Example expression recorded in a message content message id Alarml lt I CDATA INSERT INTO TABLE value name description Date VALUES REG VALUE 100 REG NAME 100 Some text message NOW 11 gt message Modbus The iMod engine is supported by a unique modbus event triggered messages mechanism It enables minimization of the transmission between two iMod devices There is also an option of a force write or read of selected parameters on the basis of 1 exceeding a set value 2 dropping below a set value 3 parameter value change by the set hysteresis There is also an option of sending a read value or saving it on another modbus device e g CHANGE VALUE CHANGE An example below helps to illustrate a channel operation based on the onChange event and a configuration where only one device is enough A change on the POI digital output results in a change in the USER LED as well
46. ee channels principle Parameter output SCADA database custom protocols Parameter source hardware resources inputs outputs Source channel external devices custom parameters Access channel Message channel iMod sms email file e Source channel data source channel e Access channel data access channel e Message channel event triggered communication Name Each channel must hold a separate name which will be used in channel identification parameters e g access channel name Modbus S1 gt Protocol Each channel must contain a protocol element which defines the protocol e g protocol name MODBUS gt Other Elements Definition of other elements depends on a channel type and a protocol e g access channel name Modbus Master gt protocol name MODBUS gt lt port gt ET 502 TCP lt port gt 2012 TechBase S A Technical contact support techbase eu 31 100 iMod User s Manual ENG 32 100 lt access channel gt lt source channel name Modbus Slave gt lt protocol name Modbus gt lt port gt com3 1200 8N1 lt port gt lt gap gt 0 lt gap gt lt cycle gt 5s lt cycle gt lt source channel gt lt message channel name DiffrenceCounter gt lt protocol name SCRIPT gt lt port gt mnt mtd iMod config lt port gt lt recipient gt difference lt recipient gt lt message channel gt Parameters Definition Parameter Element E
47. element lt source channel name MBUS com0 gt lt protocol name MBUS gt lt port gt com0 2400 8E1 lt port gt lt property name device id value 2 MODEL CF55 gt lt gap gt 0 lt gap gt lt cycle gt 60 lt cycle gt lt source channel gt Name Element lt protocol name MBUS gt You can freely modify the channel name However you need to remember that there are also references to the channel name in the parameters where you need to change the name Port Element lt port gt com0 2400 8E1 lt port gt The port element consists of the serial port definition where the readout is performed and connection parameters Property device id Elements property name device id valuez 2 MODEL CF55 gt There will be a number of property elements created depending on the amount of detected meters The value of this element is built in the following way meter id gt MODEL meter name O 2012 TechBase S A Technical contact support techbase eu 52 100 iMod User s Manual ENG 53 100 If the meter is seen as Unknown it means that during the configuration generation default parameters were used cycle read timeout etc GAP CYCLE DELAY and READ TIMEOUT Elements At the end you need to define the frequency response parameters In case of slower meters you should also add the optional read timeout element Example of a complex channel definition source channel name MBUS com0 gt
48. enerated and freely configurable You can freely modify the ID into an alphanumeric value Source channel of Parameter source channel channel name OneWire parameter id 28E616CA020000 temperature9 gt The generated source channel element in a parameter refers to a default name of the oneWire channel The paramter id consists of a unique sensor ID and the resolution with which you want to read temperature after the sign Access channel of Parameter access channel channel name Modbus parameter id 11000 gt The generated access channel element in a parameter refers to a default name of the Modbus channel The paramter id is automatically incremented from the value of 11000 and defines the modbus register where the parameter is available Both the channel name and the paramter id are freely configurable O 2012 TechBase S A Technical contact support techbase eu 49 100 iMod User s Manual ENG 50 100 Mbus Protocol Connecting Mbus meters The meters which communicate via Mbus protocol are connected with the Mbus10 device A method of connecting meters to the Mbus converter depends on the kind of a meter Please read the meter documentation in order to connect the Mbus interface with an external device in a correct way The Mbus10 converter has the RS 232 interface on the other side Below there is an example scheme of connecting the converter to the iMod with a serial port Pin 10 Preparing Working Env
49. ent by default There is a possibility of overwriting that by entering the value to be written in the message declaration however such a case is not presented in the examples message channel name ForceWrite gt protocol name forcewrite gt lt recipient gt 103 lt recipient gt lt message channel gt Each time a parameter value changes it will be rewritten to the 103 parameter lt parameter gt lt id gt 102 lt id gt lt comment gt D01 lt comment gt lt init value gt 0 lt init value gt lt description gt D01 lt description gt source channel channel name NPE io parameter id D01 gt lt access channel channel name Modbus S1 parameter id 102 gt event type OnChange gt message channel channel name ForceWrite gt lt event gt lt parameter gt 2012 TechBase S A Technical contact support techbase eu 77 100 iMod User s Manual ENG 78 100 Messages Definition An event can send a message with a static or a dynamically completed content Static Content Definition lt message id Mess 1 gt lt CDATA Connected to ground 11 gt lt message gt Each communication definition must contain a unique ID which will be assigned to an event The content of a message is written between the elements lt CDATA 11 gt For the force write type events it is recommended to enter the numerical value by which we want to update a selected parameter
50. er information NPE User s Manual NxDynamics Manual O 2012 TechBase S A Technical contact support techbase eu 16 100 iMod User s Manual ENG 17 100 Description of the Connectors The iMod platform was developed based on the NPE device NPE has two screw connections C1 C2 and a front panel On the front panel there are two monostable buttons and LEDs indicating operation of the device There is also a number of interfaces available which are illustrated in the following scheme Pin Description Connector 1 Connector 2 READY LED RDY sy User LED 0 Power LED PWR Card Slot Element name Description Connector 1 Connector no 1 14 pins Connector 2 Connector no 2 16 pins Sim card slot Sim card slot SD Card Slot SD MMC Card Slot Ethernet port RJ45 socket Antenna GSM GPRS antenna input Power LED PWR LED power indicator User LED USR LED available to the User Status LED RDY LED for the device operation status GPRS LED GPRS connection status LED Modem LED GSM LED for modem communication status 2012 TechBase S A Technical contact support techbase eu 17 100 iMod User s Manual ENG 18 100 1 Screw Connection Description C1 Power Pin 1 A RS232 serial Pin 14 port Pin number Label Description 1 VCC Plus 12 30VDC min 1000mA 2 GND Minus 3 CWD Clamps for LEDs protecting the transistor outputs
51. evices The configuration contains a minimum configuration which is required Part of the not configured settings took default values These included e g the device id element How To Change iMod Modbus ID The device ID enables its identification among other devices iMod has a default ID 1 You can change that by adding a property to the access channel Example iMod ID change to ID 2 access channel name Modbus S1 gt protocol name MODBUS gt lt port gt ET 502 TCP lt port gt lt property name device id value 2 gt lt access channel gt 2012 TechBase S A Technical contact support techbase eu 38 100 iMod User s Manual ENG 39 100 How to Set ID for Modbus Slave Device modbus address There are two ways of an ID change for a modbus slave Deafult ID change for a Modbus Slave Default modbus address for a source channel slave type devices is 1 However you can change the default setting by writing an ID in the source channel definition property name device id value NEW ID gt Example source channel with a changed default modbus address to address 2 lt source channel name Modbus M1 gt lt protocol name MODBUS gt lt port gt com0 19200 8E1 lt port gt lt property name device id value 2 gt lt gap gt 0 lt gap gt lt cycle gt 1 lt cycle gt lt delay gt 100ms lt delay gt lt source channel gt Device ID Change in Parameter If you have severa
52. function is not triggered catch PDOException e print Error e gt getMessage br die For testing purposes there is an option of uploading PHP files to the mnt ramdisk htdocs directory However it is a part of volatile memory which means that after a reboot of the iMod platform all the saved files will disappear This is why it is advised to put all the tested files in the mnt nand user htdocs src directory This procedure saves all the files permanently and they will be visible after a reboot of the device Apache Server Configuration You can configure the Apache through configuration of the httpd conf file in the lt home apache directory conf In order to change setting of the Apache server you need to reboot it O 2012 TechBase S A Technical contact support techbase eu 82 100 iMod User s Manual ENG 83 100 Data Registering e DATABASE The iMod engine enables saving buffered values into a file or a database Into CSV Files iMod enables two ways of registering data e The first way Simple registration enables to register selected parameters in one file with selected frequency since the moment of start of the iMod engine e The second way Registration with Message channel enables to register selected parameters into selected files with frequency that doesn t depend on the start of the iMod engine O 2012 TechBase S A Technical contact support techbase eu 83
53. h bigger indexes Do not double the SXX indexes in the script names If there are two scripts with identical numbers they will be activated in the alphabetical order 2012 TechBase S A Technical contact support techbase eu 22 100 iMod User s Manual ENG 23 100 GPRS Connection Configuration Configuration of basic GPRS connection parameters can be done from the web interface of the device NxDynamics In order to get the full access to all the options you need to modify the section of GPRS connection in the Syscfg directory Default Value Parameter Name Description Format Communication speed with the GSM modem For the EDGE modems it is the value of 230400 and GSM BAUD for the GPRS modems it is the value of 115200 Y N You can check the modem type with the modem info Variable defining if the GPRS connection is GPRS AUTOSTART automatic after the device startup Y or itis not Y N B automatically activated GPRS APN NAME The APN name for the GPRS connection String Activation of the GPRS reconnection process after disconnection In case of setting the DEAFAULT ROUTE to B In case of using a number it is the indication in seconds of the speed of pinging the GPRS PING addresses in order to verify if there is an active connection GPRS RECONNECT Ylinteger IP of the server for checking the GPRS connection GPRS PING IP 1 related to GPRS RECONNECT 1 255 1 255 1 255 1 255 IP of the server for checking
54. hannel name Modbus M1 parameter id 1 gt lt access channel channel name Modbus S1 parameter id 1 gt lt property name force value true gt lt access channel gt lt parameter gt 2012 TechBase S A Technical contact support techbase eu 45 100 iMod User s Manual ENG 46 100 Integration of 1 Wire Bus with iMod Platform The following chapter describes the way of using the iMod system for collecting information from a distributed system of sensors transmitters reed switches etc connected to the 1 Wire bus Sensor Detection em og vd wr w IL eee SCAN READ ONEWIRE X First check if the sensors were detected by the one wire server with the following command root techbase owlist info id 28E616CA020000 chip DS18B20 desc THERMOMETER value 24 125 If the sensor has been detected scan the one wire bus with the imod scan onewire command This command results in generating a configuration containing parameters together with a readout from sensors and sharing the results via the modbus protocol in the ONEWIREScan xml directory rootatechbase imod scan onewire iMod Tiger Engine Version 1202171418 Stopping iMod daemon Please wait Killing iMod daemon Succeeded 12 01 17 963 main INFO Starting iMod Tiger Engine Version 1203271136 Xml Config Version ES oS 12 01 18 511 main INFO Parsing the file mnt mtd iMod config MainConfig xml 12 01 20
55. has a mechanism for using the DynDNS service for the PPP protocol GPRS connections This script uses the InaDynConf library Further information on this package can be found at http www inatech eu inadyn The DynDNS service configuration is limited to creating a personal account in the www dyndns com service and editing the mnt mtd iMod config inadyn conf file This is an example configuration DynDNS configuration username test password test alias test homeip net iterations O 2012 TechBase S A Technical contact support techbase eu 24 100 iMod User s Manual ENG 25 100 iMod Platform Quickstart Initial Information In order to start with the iMod platform you need to prepare the following software improving building of the configuration and verification of the iMod engine operation This is the list of the necessary software e FTP client e g FreeCommander e XML files editor e g Notepad e iMod configuration parser available here for download e Internet browser not earlier than IE9 FF6 Opera 10 Chrome 8 e Modbus master type software e g modbus poll e Modbus slave type software e g Modbus simulator e Telnet client e g Putty e SearchNPE The following examples illustrate an optimal configuration of the work environment with the iMod platform All of the examples below and video tutorials showing the usage are available on the FTP server Host ftp a2s pl Login npe
56. he NXDynamics product card TRM Template There is a default TRM interface template uploaded to the device Source files are in the mnt nand user htdocs src directory At the startup they are copied into the mnt ramdisk htdocs ramdisk The template contains an example PHP code which enables downloading data from database and its presentation A detailed description of the used functions can be found in the synoptyka php file Own Website The iMod telemetry module uses a built in Apache2 web server with PHP and database SQLite and PSQL support for sharing data In order to build a simple web interface you just need to know basics of HTML PHP and be familiar with database Support O 2012 TechBase S A Technical contact support techbase eu 79 100 iMod User s Manual ENG 80 100 iMod Device Configuration Mod XML In order to read the data with a web browser you need to configure the iMod device in a proper way first Use the examplel hardware access xml file in the mnt mtd iMod config examples directory This configuration is a default configuration on the iMod device and it enables access to the hardware resources of the device e User LED e DI1 digital input Registering data in the database of the iMod device is assigned by default to the SQLite database However there is an option of sending the value directly from the iMod engine to a local or external postgreSQL database Database The second step is
57. iMod platform is configured by two configuration files 1 The mnt mtd Syscfg file s responsible for the startup options of the NPE system device This configuration is called the Startup Configuration 2 The mnt mtd iMod config MainConfig xml file s responsible for the iMod application configuration This is called the Application Configuration In order to upload a configuration you need to restart the iMod platform You can do that by executing the imod start command from the console or the interface NxDynamics Base Configuration syscfg The startup configuration file is a text file with the following format Parameter Value Do not put a space between the sign and the text Do NOT use quotation marks as well Value O 2012 TechBase S A Technical contact support techbase eu 20 100 iMod User s Manual ENG 21 100 Parameter Name Description Default Value Parameter which also describes a prompt on login screen Whitespaces are not HOST NAME accepted techbase HOST IP IP of a device if it doesn t receive an address from the DHCP service 192 168 0 101 GW IP Gateway of the device 192 168 0 1 NET MASK Subnet mask 255 255 255 0 HOST MAC Mac address of the device 18 83 C4 04 XX XX ETH DNS 1 DNS address if the device doesn t receive one from the router 8 8 8 8 ETH DNS 2 Second DNS address if the device doesn t receive one from the router RTC RESTORE ae defining if the time should
58. ine contains a plugin to convert its parameters into SNMP values A MIB file is ganerated automatically and enables easy conversion of the NPE hardware resources or modbus parameters to SNMP protocol Moreover the plugin contains an event mechanism called a TRAP in SNMP Example configuraion Modbus to SNMP The configuration below presents how to declare a place for creating SNMP files and roots of parameters access channel definition Access channel In access channel you must define a place for generating MIB files configuration and roots of parameters in an OID tree access channel name SNMP Slave 1 gt protocol name SNMP lt port gt ET 161 UDP lt port gt lt property name device id value 1 gt lt property name mib file value etc snmp NPE2 MIB txt gt property name ip address value 0 0 0 0 gt lt property name parametersRootName value techbaseObjects gt lt property name groupRootName value techbaseGroups gt lt access channel gt Traps iMod enables to sent SNMP traps when event conditions become true Firstly you need to declare a message channel then include reference to that channel in the event element Example SNMP type message channel message channel name SNMP Msg 1 gt protocol name SNMP lt port gt ET 162 UDP lt port gt lt property name device id value 1 gt property name mib file valuez etc snmp NPE2 MIB2 txt property nam
59. ine in the event element you assign a script execution to an event message channel channel name Script gt An example parameter with executing a script parameter lt id gt 110 lt id gt lt access channel channel name Modbus S1 parameter id 110 gt event type z OnChange message channel channel name ScriptChangeLED gt lt event gt lt parameter gt Verifying Script Running You can check script running in the iMod logs In order to do this execute the following command tail f mnt data logs iMod log grep channel name An example entry from an execution of the Script channel 13 24 29 589 INFO pool l thread Added to Script s queue event eid ff36 a633 pos 3 200 parameter id 110 mid 110 gt did none 13 24 29 783 INFO Script The channel Script received the event eid ff36 a633 pos 3 200 parameter id none message 23 O 2012 TechBase S A Technical contact support techbase eu 67 100 iMod User s Manual ENG 68 100 E mail VALUE CHANGE m FE rs717 DA 111 mt iMod can send e mail messages via a given e mail account It has no limitations on the amount of receivers groups of receivers or the message content structure The Current iMod version does not support e mail accounts requiring TLS encryption Channel Definition Example channel definition message channel name Email sender gt lt protocol name EMAIL gt
60. interval port element lt access channel gt message channel element cycle element read timeout element persistent element lt message channel gt persistent element DECO recipient element lt recipient gt 2012 TechBase S A Technical contact support techbase eu 94 100 iMod User s Manual ENG 95 100 command channel element parameter element EE e Ce e init value element source channel ref element label element comment element access channel ref element unit element scale element max val element event element lt parameter gt init value element string unit element unit string lt unit gt 2012 TechBase S A Technical contact support techbase eu 95 100 iMod User s Manual ENG 96 100 scale element Scale string ke lt scale gt offset element offset string min val element minval string lt offset max val element lt maxval gt string source channel ref element o gt lt source channel channel name C property element lt source channel gt access channel ref element o gt lt access channel channel name EN O 2012 TechBase S A lt minval gt lt maxval gt Ces Technical contact support techbase eu 96 100 iMod User s Manual ENG 97 100 event element event string
61. ironment A working iMod using serial ports in configuration blocks the readout via external applications This is why you need to Switch off the iMod application before polling the meters A set of commands turning off the platform rootatechbase imod stop After turning off the platform you should download heatmet which enables polling meters via console You can download the heatmet application from the ftp server dedicated for iMod uers Ask for a password through the technical support portal http suppport techbase eu Checking Connection and Response time of a Meter heatmet After connecting the Mbus meter to the iMod device you need to check if the connection is correct You can do that with the following application heatmet You need to copy the application onto the device and execute the following commands chmod 54 heatmet heatmet 1 2400 2400 METER ID gt Heatmet com number check baudrate set baudrate gt lt scan mode ID Specify the COM port where the meter is plugged in as the first parameter The second value is a baud rate where the meter currently works The third value is the communication speed set in the metre The fourth parameter can take a value from do 255 means scanning all the addresses in search for the meter Instead of the 1 value it is better to enter the ID of a plugged meter In case of no response after sending a readout command observe the Mbus10 converter
62. its default value of O parameter lt id gt 110 lt id gt lt access channel channel name Modbus S1 parameter id 110 gt lt event type LoAlarm gt message channel channel name Script gt lt property name trigger value 27 gt lt histeresis gt 2 lt histeresis gt lt event gt lt parameter gt 2012 TechBase S A Technical contact support techbase eu 66 100 iMod User s Manual ENG 67 100 Action Types An action may be assigned to each event Very often a message is related to an action Actions are defined by message channel and contents are defined by declared messages message Script The simplest type of action is an execution of a script If an event occurs a bash script is run Message channel Definition If you want to assign a script to an event you need to define a message channel first Example definition message channel name ScriptChangeLED gt protocol name script gt lt port gt mnt mtd iMod config examples lt port gt lt recipient gt changeLED lt recipient gt lt message channel gt Provide the path to the port element file and the recipient element file in the message channel definition The script files should be given permissions by the chmod 754 file name command It is important that the script file has correct run time permissions Otherwise the script will not be executed Assigning Script to an Event If you add a l
63. l channel name Modbus M1 parameter id 1 gt lt property name varspace value coil gt lt source channel gt lt parameter gt Adjusting the 3rd and 4th byte Initial Register A shift of registers may occur in the modbus devices If in the modbus slave device documentation there is a description that a parameter X is in the register at the N number it may mean that it should be defined as N 1 N 1 or simply N in the iMod The initial value is taken from the parameter and its parameter id element defined in the source channel i e parameter lt id gt 1 lt id gt source channel channel name Modbus M1 parameter 1d 100 gt lt parameter gt means sending a poll with the initial address 00 64 Adjusting the 5th and 6th byte Number of Registers for Polling iMod internally groups the read parameters It finds the initial address and adjusts polls together with the number of registers to read in such a way to gather as much data in the smallest number of polls Adjusting Checksum iMod automatically calculates the correct checksum for each poll O 2012 TechBase S A Technical contact support techbase eu 41 100 iMod User s Manual ENG 42 100 32 bit Parameters Part of the modbus devices has 32 bit parameters in the registers table iMod enables definition of such registers by changing a parameter parameter type real32 gt When defining a 32 byte parameter you need to
64. l devices you need to enter the ID which the parameter refers to for parameters with a modbus address other than default modbus register The definition of a modbus address needs to be included in the lt source channel gt element Below there is an example parameter definition from a modbus device with the address 2 and register 3 lt parameter gt lt id gt 2 3 lt id gt lt source channel channel name Modbus M1 parameter id 3 gt lt property name device id value 2 gt lt source channel gt lt parameter gt 2012 TechBase S A Technical contact support techbase eu 39 100 iMod User s Manual ENG 40 100 TCP RTU ASCII Connection iMod supports the modbus protocol in its three varations ASCII TCP and RTU In order to define a modbus type protocol you need to include the property type protocol in the element protocol name MODBUS gt property name type value RTU lt protocol gt Example Modbus ASCII protocol declaration lt source channel name Modbus M1 gt lt protocol name MODBUS gt lt property name type value ASCII gt lt protocol gt lt port gt com0 19200 8E1 lt port gt lt gap gt 0 lt gap gt lt cycle gt 1 lt cycle gt lt delay gt 100ms lt delay gt lt source channel gt A change in the protocol type is made in an identical way both for the data source channel and data access channel How to Adjust Configuration to the Poll Modbus
65. l name OneWire parameter id 28bE616CA020000 temperature9 SCAN lt source channel channel name OneWire parameter id 28E616CA020000 temperature10 ONEWIRE SA The one wire scan for the DS1820 sensors makes a set of parameters For each sensor there are several parameters generated In order to get correct one wire readouts you need to transfer only ONE The generated parameters differ in measurement resolution which is saved in the parameter id of the source channel element e g source channel channel name OneWire parameter id 28E616CA020000 temperature source channel channel name OneWire parameter id 28E616CA020000 temperature9 source channel channel name OneWire parameter id 28E616CA020000 temperature10 gt Example one wire parameter automatically generated through scanning parameter type real32 gt lt id gt THERM1 1 lt id gt lt description gt THERMOMETER DS18B20 lt description gt lt source channel channel name OneWire parameter id 28E616CA020000 temperature gt access channel channel name Modbus parameter id 11000 gt lt parameter gt Parameter ID lt id gt THERM1 1 lt id gt An ID is automatically generated and freely configurable You can freely modify the ID into an alphanumeric value It needs to be unique in the configuration Description lt description gt THERMOMETER DS18B20 lt description gt description is automatically g
66. message channel ref element e hysteresis element property element lt event gt O 2012 TechBase S A Technical contact support techbase eu 97 100 iMod User s Manual ENG 98 100 F A Q Q How to connect a relay to a digital output A A scheme illustrating the connection of relays is in the NPE manual Q What are the parameters of the digital output A If a digital output is set to low state 0 than after using a pull up resistor externally you can get maximum 24VDC Digital output load is 500 mA Q What are the parameters of the relay output A 230VAC 1000mA Q How can easily check if my digital output is working A You just need to connect a digital output with a digital input Q How can check the output with the software A You can check the digital output with the NxDynamics Web interface or a console with the following command npe DO1 echo 7 Q What is the voltage range in the analog input A For the 9x00 version it is 4x 0 10VDC For the 9x01 version it is 3x 0 10VDC and 1x 0 70VAC Q How do I connect voltage to the analog input A Connect Plus to Al input and minus to GND input Q Do analog inputs in the NPE 9000 have galvanic separation A No they don t Q How do read voltage A e With the iMod configuration HardwareResources xml e Through telnet console with the command npe AIU1 echo e With the NXDynamics interface and the O tab Q Does the RS 485
67. need to prepare the iMod configuration which enables using the iMod parameters with the Ladder Logic LAD in an XML file O 2012 TechBase S A Technical contact support techbase eu 91 100 iMod User s Manual ENG 92 100 XML Tree Possible Configuration Elements imod element imod version E parameter db e E acquisition_period C time interva group element E group element gt r gt Came E gt parameter element lt g rou p gt message element channel element source channel element D access channel element meassaqe channel element command channel element O 2012 TechBase S A Technical contact support techbase eu 92 100 iMod User s Manual ENG 93 100 source channel element property element cycle element delay element U VR SY Wwrite delay element lt source channel gt protocol element protocol property element lt protocol gt gt port element string string time interval cycle element cycle time interval lt cycle gt 2012 TechBase S A Technical contact support techbase eu 93 100 iMod User s Manual ENG 94 100 delay element write delay element Write delay read timeout element read timeout access channel element o gt lt access channel name LC ka itime interval lt delay gt time interval time
68. nges message channel name SMS sender gt protocol name SMS gt lt recipient gt 48123456789 lt recipient gt lt message channel gt message id SMSMessagel gt lt CDATA REG NAME THIS changed to Value REG VALUE THIS REG UNIT THIS 11 gt lt message gt lt parameter gt lt 1d gt 102 lt 1id gt access channel channel name Modbus S1 parameter id 102 gt event type OnChange gt lt message channel channel name SMS sender gt message id SMSMessagel message id property name trigger value 1 gt event lt parameter gt Channel Definition The channel definition consists of e freely configurable channel name element e protocol element must equal SMS e list of recipients each recipient must be located between recipient element There are no limitations on the number of recipients message channel channel name SMS sender gt protocol name SMS gt lt recipient gt 48123456789 lt recipient gt lt message channel gt 2012 TechBase S A Technical contact support techbase eu 69 100 iMod User s Manual ENG 70 100 The recipient s number must contain a dialing code of a country In order to define several recipient groups you can define several SMS channels Message Definition A message must be defined in accordance with the format presented in the Messages Definition chapter Assigning SMS to an Event In the lt event
69. o state function npe USER LED echo O 2012 TechBase S A Technical contact support techbase eu 57 100 iMod User s Manual ENG 58 100 Action for Write Argument For the write action check the value of the second argument If it equals 0 set the USER LED to O turn off the user LED If the value of the second argument is a nonzero value set it to high status At the end look at the current value of the USER LED if if 2 eq 0 then npe USER LED npe USER LED echo else npe USER LED npe USER LED echo fi eq 0 J then npe USER LED npe USER LED echo else npe USER LED npe USER LED echo fi Further information on bash scripts can be found in the documents fully available on the Internet After copying the script file into the NPE device you need to execute the following commands dos2unix file name gt corrects the line breakes chmod 754 file name gives properly previlages to run a file Otherwise the iMod platform will not have the permission to execute the script Verification of Actions 1 read the 100 parameter via the modbus protocol and verify if it matches the USER LED status 2 Save the 100 parameter value and check if the the value changes according to the conditions written in the script 3 Change USER LED into DO in the script 4 Check if the DO1 parameter changes instead of the USER LED Video tutorial presenting points from 1 to 3
70. omputer connection 3 SearchNPE Application The SearchNPE application enables detection of iMOD NPE devices in the network You should install this application on the computer 2012 TechBase S A Technical contact support techbase eu 7 100 Connecting the device The first step is to connect the power supply Pewee 1230 DC source Next connect the device to a computer or LAN with a network cable Method 1 Direct connection NPE IMOD Direct connection between a computer and the device requires additional network interface configuration The device should be connected directly to a computer with an Ethernet network cable The device automatically detects the connection cable type so that you can use both crossover and standard cables O 2012 TechBase S A Technical contact support techbase eu 8 100 iMod User s Manual ENG 9 100 IP configuration In order to establish a connection you need to configure the IP properly The IP address should be on the same subnet as the device The subnet of the computer and the device is defined by two parameters e IP address e Subnet mask Ethernet interface of the device has the following default configuration e P address 192 168 0 101 e Subnet mask 255 255 255 0 This information will be used in the next step Internet Protocol Version 4 TCP IPv4 Properties e General You can get IP settings assigned automatically if your network support
71. operty name trigger value 1 gt lt event gt LoAlarm LoAlarm is a type of event which is triggered each time a parameter exceeds a set trigger It is an equivalent condition to less than 2012 TechBase S A Technical contact support techbase eu 64 100 iMod User s Manual ENG 65 100 Y HighState MEARBLERL_REQEREmRPCRBARERE EEKE ERBRELEREERELBRBLELBLEBERBLEBELEARELLEAE Alarm Value KWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW LowState event type LoAlarm gt message channel channel name BashScript gt property name trigger value 1 gt lt event gt 2012 TechBase S A Technical contact support techbase eu 65 100 iMod User s Manual ENG 66 100 Hysteresis vs HYSTERESIS HiAlarm LoAlarm type events may contain a hysteresis element When a parameter value exceeds drops below the trigger value an event is triggered An event is not triggered until it exceeds drops below the hysteresis value For example an event is triggered if a parameter exceeds the HiAlarm trigger value 27 If hysteresis is 2 it means that the value must drop below 25 in order to trigger the event again If an event is defined to be triggered at a decrease LoAlarm of the trigger value 27 and hysteresis is set to 2 it means that the value must increase to 29 in order to trigger the event again after the decrease below 27 In case of events definition without hysteresis it has
72. ple the write means execution of a command every minute You can put the properly configured time and date in the cycle type element in the iMod configuration file O 2012 TechBase S A Technical contact support techbase eu 85 100 iMod User s Manual ENG 86 100 Example CSV message channel An example of use of the event schedule is presented below In this example a write into the datal csv bedzie file will be executed at 16 15 everyday message channel name RegisterAt1615 gt protocol name CSV gt lt port gt mnt nand user exampleCSV csv lt port gt lt cycle gt 15 16 lt cycle gt property name separator value gt lt message channel gt Location and Name of Registered File Enter the path and file name where you want to register data into the port element lt port gt mnt nand user exampleCSV csv lt port gt Separator In the channel definition you can enter a whitespace between columns property name separator value gt Assigning Message channel in Parameter Enter a reference to the message channel element in the parameter element Example definition parameter lt 1d gt 100 lt 1d gt lt access channel channel name Modbus S1 parameter id 100 gt message channel channel name CSV gt lt parameter gt 2012 TechBase S A Technical contact support techbase eu 86 100 iMod User s Manual ENG 87 100 SNMP The iMod eng
73. protocol name MBUS gt lt port gt com0 2400 8E1 lt port gt property name device id value 2 MODEL UNKNOWN gt lt gap gt 0 lt gap gt lt cycle gt 60 lt cycle gt lt delay gt 1000ms lt delay gt lt read timeout gt 5000ms lt read timeout gt lt source channel gt Access channel You can transfer the access channel completely into the main configuration The default data access is configured on the 1502 port If you already have data access via Modbus TCP on the 502 port in the main configuration you don t have to transfer the access channel element You just need to change the name of the access channel in the Mbus parameters Double definition of access channel on the same TCP port results in malfunction of the platform Parameters Mbus scanning creates a set of parameters read from a meter Transfer only the parameters necessary for the project implementation to the main configuration Example parameter parameter type int32 gt lt id gt MBUS 09847273 2 2 4 lt id gt lt Actual value 0 Integer scale 10e3 scale lt unit gt W lt unit gt lt description gt POWER lt description gt lt comment gt MAX VAL lt comment gt source channel channel name MBUS Comp parameter id 2 2 4 gt lt access channel channel name Modbus SMBUS parameter id 157 gt lt parameter gt Parameter Element The parameter element has lt parameter type int32 gt In c
74. rameter gt By assigning a script name to the parameter id property in the source channel element you define the script file name The script will be run cyclically in accordance with the value at the channel definition The run script is with the read argument Each read cycle executes a script with the read argument In the example above the execution will be equal to running the script with the following command mnt nand user UserLed sh read The definition above enables a change of a parameter via modbus protocol Than the script is run with the write written value arguments mnt nand user UserLed sh write value Script Structure The bash script is a text file beginning with the following line bin sh In order to get familiar with the script structure create a file with the name userLed sh Arguments of Running a Script Running the script with a parameter makes it available as variables in the script e g UserLed sh read It makes that behind the 1 variable there is a sign of the read value Checking the First Argument Read or Write At the beginning you should detect the value of the first parameter should the parameter execute the read or write action if class code bash read then elif class code bash write then fi Action for Read Argument Next enter proper actions for proper conditions For the read action return the USER LED state with the ech
75. ration to check if the implemented changes comply with your needs with dedicated use cases It is crucial that the configuration is correct and optimal Only then will iMod make full use of the NPE platform hardware resources In order to check if it operates properly see if there is no WARN and ERROR type information in the Mod log file in normal mode Rules of Construction General Rules Configuration consists of elements Each element must be closed Closing the elements may be done in two ways e g 1 Opening and closing an element in one Line element 2 Opening and closing an element in two lines element lt element gt An element may have a property Possible values of a property strongly depend on an element they are in The use of properties is precisely written out in chapters describing specific functionalities e g property name device id valuez 3 Other elements may be nested in an element e g element lt elementl gt lt element gt 2012 TechBase S A Technical contact support techbase eu 30 100 iMod User s Manual ENG 31 100 All the elements must be inside the imod element e g lt imod version 1 0 0 gt lt imod gt Elements may be grouped by closing them in a group element with a name e g group name Channel definitions gt lt group gt Configuration is not case sensitive Channel Definition iMod logic is based on a thr
76. read values during scanning Compare them with the values on the meter display In this way you will be able to type which value is the desired value Comment The comment field is automatically generated and freely configurable It often describes an additional information enabling property description of a read value lt comment gt MAX VAL lt comment gt Parameter Source channel Example source channel source channel channel name MBUS comO parameter id 2 2 10 gt The source channel element refers to the meter ID frame in the meter and field in the frame Syntax meter id gt lt frame number gt lt field in the frame O 2012 TechBase S A Technical contact support techbase eu 54 100 iMod User s Manual ENG 55 100 Access channel of Parameter Example access channel access channel channel name Modbus SMBUS parameter id 100 gt The generated access channel element in the parameter refers to a default channel name Modbus The id parameter is automatically incremented from the value of 100 and describes a modbus register where the parameter is available Both the channel name and the paramter id are freely configurable Double definition of the same modbus register will result in a malfunction of the iMod platform Make sure that after joining the Mbus configuration into the main configuration all the access channel parameter id elements are unique 2012 TechBase S A Technical contact
77. s this capability Otherwise you need to ask your network administrator for the appropriate IP settings Obtain an IP address automatically Use the following IP address IP address 192 165 D 105 Subnet mask 255 255 255 0 Default gateway Obtain DNS server address automatically Use the following DNS server addresses Preferred DNS server Alternate DNS server 7 Validate settings upon exit Above there are the device default parameters assuming they have not been changed The computer must have the following IP configuration e IP address 192 168 0 105 e Subnet mask 255 255 255 0 After the above mentioned network settings configuration you will be able to establish a connection with the iMod NPE device 2012 TechBase S A Technical contact support techbase eu 9 100 iMod User s Manual ENG 10 100 Method 2 LAN connection PC ROUTER NPE IMOD Another method is connecting the device to a local area network LAN If a router in the network has the DHCP Dynamic Host Configuration Protocol service active the device IP address will be randomly assigned after start In order to improve searching for the addresses assigned to devices in the local area network the SearchNPE application has been created After launching the installed application a search window will appear f SearchNPE SearchNPE w 182 158 0 60 182 158 0 113 182 158 0 112 192 168 0 136 182 158 0 148 182 158 0 142 18
78. support techbase eu 55 100 iMod User s Manual ENG 56 100 Scripts as Data Source Script return value UserLED sh iMod can define the bash script as a data source The value that the script sends back becomes a parameter value Example User LED readout Script return USER LED state UserLED sh User LED The configuration structure that contains source channel as data source will be presented through reading the USER LED e Script will be run cyclically every 2 seconds e Parameter value will equal the value send back by the script with the expression return USER LED VALUE Source channel Definition source channel name SCRIPT CHANNEL protocol name SCRIPT gt lt port gt mnt nand user lt port gt lt cycle gt 2 lt cycle gt lt source channel gt Script channel definition consists of the following e Channel name You can freely modify the channel name However you need to remember that there are also references to the channel name in the parameters e Port the port element contains the path to directory with a script s e Cycle script execution frequency O 2012 TechBase S A Technical contact support techbase eu 56 100 iMod User s Manual ENG 57 100 Parameter Definition parameter lt id gt 100 lt id gt lt source channel channel name SCRIPT CHANNEL parameter id UserLed sh gt lt access channel channel name Modbus S1 parameter id 100 gt lt pa
79. tabase The action attribute value from the form is defined as the test php a update address The a variable is introduced When you press the upgrade button next to a selected parameter the a variable takes the update value Writing the parameter value takes place by means of using a logical function at the moment when the a variable takes update value O 2012 TechBase S A Technical contact support techbase eu 81 100 iMod User s Manual ENG 82 100 In this case the ID and the value of a selected parameter is read from the form and saved in the database It is important to assign the 1 value to the SQLite variable Setting the SQLiteFlag to 1 makes the iMod download a value from the table and write it into a parameter Next it resets the change flag Such a solution improves the efficiency of monitoring the changes made via the Web At the end the website is refreshed in order to load the current values from the database if GET a update d id2 POST id value2 POST value new sth dbh exec UPDATE dane SET SQLiteFlag 1 Value value2 WHERE TIGER ID id2 header Location SERVER REQUEST URI Finishing Work with Database Disconnecting with a database is an important element In order to do that you can use the following function dbh null At the end there is a function that views error messages During a correct operation of the device the
80. tabase It cooperates by default with the SQLite3 database however there is another way to define the communication with the PostgreSQL database in iMod Moreover there is a possibility to add another plugin to connect with the custom database Default SQLite Database Entry iMod holds a current value of parameters in the DANE table in the modbus db database The modbus db file is in the mnt ramdisk directory You can preview the database with any database software e g SQLite2009Pro Result E Table Data S Object Info Documentation Ins Add New F2 Edit Del Delete key TIGER TID TD Grupo Type ECC Une Address SchedulelD TCPAddress Name Value SQLiteFlag Comment 1 70000 Settings Di 70000 70000 TCP PORT 1502 2 70002 Settings D3 70002 70002 SCHEDULING GAP 10 3 70003 Settings D4 70003 70003 REFRESH PERIOD 4 70004 Error DS 70004 70004 ERROR 0 5 70005 Settings D6 70005 70005 VERSION 1 0 24 6 70006 Settings D 70006 70006 SAVE 0 7 100 99 IntRegOut 99 0 100 Doi 0 0 Doi A default database contains columns corresponding with the elements that a user is able to define in the iMod configuration Configuration element name SQLite database element name ID Description Offset Scale Comment Unit minval maxval data logging TIGER ID Name Offset Scale Comment Unit minval maxval data logging If you do not use the database you
81. techbase O 2012 TechBase S A Technical contact support techbase eu 12 100 iMod User s Manual ENG 13 100 Checking Firmware Version Technical support covers only the latest versions of software After the first startup please check if the current firmware version and the latest packages are installed e In order to do that you need to execute the softmgr update firmware command This command checks if a more recent version of firmware is available and it updates the firmware together with the basic packages After firmware update a reboot of the device with the reboot command is required Packages Update with NxDynamics e In order to check if there are any active software packages for the device you need to log in the NXDynamics interface pre installed 30 days trial version typing the devicelP nx into the browser URL address LISER PASSWORD LLLI ROT PASTORO CLLELLLE B DYNAMICS WW Conosci re diffrast HPE E DISCONNECTED 2012 TechBase S A Technical contact support techbase eu 13 100 iMod User s Manual ENG 14 100 e After logging in you need to open the Services tab and check if there are any available updates with the Check Updates button INDXorNAMIES ZI Ethernet GPRS Synchronize Time with ETC Real DUT RESTORE Buffer all cutouts tetes and ralz START CONSOLE Start up of system console for se START BLLHK START DHOP START FTP ETART TELMET Start Status Led Blinking DH
82. ter idz 7 Technical contact support techbase eu 42 100 iMod User s Manual ENG 43 100 Property inverse Very often there is an issue with value interpretation of the 32 bit parameters If the 32 bit parameters have incorrect value try to add bit inversion before calculating the value in such a way that the other 16 bits are at the front You can do that with the property element called inverse property name inverse value true The information on inversion of parameters can be both in the source channel and access channel element Example definition parameter type real32 gt lt id gt 5 lt id gt lt source channel channel name Modbus M1 parameter id 7 gt lt property name inverse value true gt lt source channel gt access channel channel name Modbus S1 parameter id 7 gt lt parameter gt Gap Cycle Delay Read Timeout Polling frequency parameters are linked with the modbus protocol The section below in short describes polling parameters available for modification Example source channel containing definitions of all elements related to polling on the channel source channel name Modbus M1 gt protocol name MODBUS gt lt port gt com3 19200 8E1 lt port gt lt gap gt 0 lt gap gt lt cycle gt l lt cycle gt lt delay gt 100ms lt delay gt lt read timeout gt 100ms lt read timeout gt lt source channel gt Cycle Cycle The lt cy
83. values and control a parameter in the external device supporting the modbus protocol The above configurations also contains only required elements In iMod you can easily choose a function code that will be used for polling an external device set a byte order reverse in the 32 bit parameters force write of every same value etc Further information can be found in the XML chapter Configuration Verification Connect iMod with a computer with the RS 485 serial port e g with a converter ATC 820 Download modbus slave application e g mod RSsim eth Run modbus master software e g modbus poll Run modbus slave output with register 1 simulation 0x03 function code Read and write values several times U PUNEA Video tutorial illustrating points 4 5 www youtube com watch v YsHrvpR_RS8 2012 TechBase S A Technical contact support techbase eu 37 100 iMod User s Manual ENG 38 100 Point to Multipoint Connection In the distributed networks there are often many slaves This chapter shows how to build a configuration for a point to multipoint network Source channel EH COM3 R 485 41 Modbus device 1 iMod Source channel n Ethernet TCP 3 iMod 1 Modbus device Source channel COMS RSABS 2 iMod n Modbus device Modbus TCP Many Slave Type Devices In the previous configuration there was an example of how to read parameter values from the Modbus Slave d
84. vices Configuration initsrv Activation of the packages dedicated to the NPE system uses the initsrv mechanism which enables packages activation in a proper order Startup Management of Packages During the system startup all scripts from the mnt mtd initsrv directory with names in accordance with the convention are executed If you want to exclude some of the scripts from the autostart you only need to change their name the best way is to add a prefix For example you can use the mv command mv S600apache sh S600apache sh After executing this command and rebooting the device the Apache package will not be activated Launching Order During the installation of particular applications scripts with a precise name which are used during the device startup are created in the mnt mtd initsrv directory The script name is created in the S 1 9999 package convention where the number 1 9999 indicates the order of launching the scripts It is recommended not to modify the order assigned to the packages by default How to Add Own Application to the Autostart Adding own applications which are run at the system startup is based on creating scripts in the mnt mtd initsrv directory with a specified name in accordance with the order of activation Next you need to give the rights to run with the chmod x command Following reboot of the device the script will be activated after scripts with smaller indexes and before scripts wit
85. xml successfully generated 12 01 33 890 main INFO Exit scanner 12 01 33 929 main INFO Exiting 12 01 34 262 ShutdownHook INFO Shutdown complete A way of connecting the sensors Parasite Powering DATA 1 wire sensor ou VCC Integration of the Configuration GGG ONEWIRE A After scanning the one wire bus you need to copy part of the configuration into the main configuration the MainConfig xml file from the mnt mtd iMod config directory When you join the configurations you need to reboot the iMod platform with the imod start command Transferring Source channel lt source channel name OneWire lt protocol name ONEWIRE gt port ET 8 80 0 80 z port amp gap 0 gap cycle 18 cycle lt source channel gt _ MAINCONFIG The source channel element can be completely transferred into the main configuration source channel name OneWire gt protocol name ONEWIRE gt 2012 TechBase S A Technical contact support techbase eu 47 100 iMod User s Manual ENG 48 100 lt port gt ET 0 0 0 0 lt port gt lt gap gt 0 lt gap gt lt cycle gt 10 lt cycle gt lt source channel gt Channel Name lt source channel name OneWire gt You can freely modify the channel name However you need to remember that there are also references to the channel name in the parameters where you need to change the name Port

Download Pdf Manuals

image

Related Search

Related Contents

ズームプリセットドームカメラ VCC-9800/VCC-9600 - Psn  Descarga Man. Instalación en PDF  Installation Manual Motion Activated Outdoor Floodlight  Samsung WA80D5V User Manual    Samsung WB250F Lietotāja rokasgrāmata  GT950 Proiettore LCD Manuale dell`utente Italiano  Centroid v8.22 (DOS) Mill Operator`s Manual  M-Cab 7009005 headset    

Copyright © All rights reserved.
Failed to retrieve file