background image

 

 SmartSwarm 300 Series

 

125 

 

 

 
In the Agents tab you can see run-time information (output) from the enabled Application Agents.  
 
Note that, even if an Agent has been “enabled” on the Debug Tab, it will only appear on the Agents Tab if there is 
data actually being published by that Agent. 
 

Содержание SmartSwarm 300

Страница 1: ...SmartSwarm 300 Series User Manual WWW INFOPULSAS LT info infopulsas lt ...

Страница 2: ...Ottawa IL 61350 USA Phone 815 433 5100 Fax 815 433 5105 Advantech B B SmartWorx European Headquarters Westlink Commercial Park Oranmore Co Galway Ireland Phone 353 91 792444 Fax 353 91 792445 www advantech bb com support advantech bb com Document SmartSwarm_300_R1_3416 docx ...

Страница 3: ... Configure Your Device s Connectivity to SmartWorx Hub 15 3 3 Configure the Modbus Interface 18 3 4 Configure the MQTT interface 20 3 5 Build Your Slave Maps 21 3 5 1 Discover Your Slaves 22 3 5 2 Create Import Your Slaves 23 3 5 3 Export Slave Maps 28 3 6 Configure Rules and Topics 28 3 7 Verify Your Data Flow 31 3 8 Optimize Your System 31 4 Connect Your Hardware 33 4 1 Mounting the device 33 4 ...

Страница 4: ...Card Reader 41 4 7 USB Port 41 4 8 I O Port 41 4 9 LEDs 41 5 Configure Connectivity to SmartWorx Hub 42 5 1 Step 1 Connect to Local Webserver 43 5 2 Step 2 Configure the Cellular APN details 43 5 3 Step 3 Verify the Secure Connection with SmartWorx Hub 43 5 4 Step 4 Verify That Your Device is Available on SmartWorx Hub 43 5 5 Factory Defaults 44 6 SmartSwarm 351 on SmartWorx Hub 45 6 1 Device Mana...

Страница 5: ... Adding Registers 70 9 4 6 Editing Registers 70 9 4 7 Deleting Registers 72 10 Rules and Topics 73 10 1 Introduction 73 10 2 Events WHEN 75 10 2 1 Read 76 10 2 2 Change 77 10 2 3 Delta 80 10 2 4 High Threshold 82 10 2 5 Low Threshold 84 10 2 6 High Rate 86 10 2 7 Low Rate 89 10 2 8 Scheduled 91 10 2 9 Global Read 92 10 2 10 Global Change 92 10 3 Payloads WHAT 93 10 3 1 Payload Examples 94 10 4 Top...

Страница 6: ... 4 Other Technical Parameters 111 14 Appendix 2 General Settings 112 14 1 Configurable Items 112 14 1 1 Settings 112 14 1 2 DHCP 113 14 1 3 OpenVPN 114 14 1 4 NTP Client 117 14 2 Non Configurable items 117 14 2 1 Firewall 117 15 Appendix 3 Diagnostics and Troubleshooting 119 15 1 The Local Web Interface 119 15 1 1 Home 120 15 1 2 Settings 120 15 1 3 Troubleshooting 120 15 1 4 Hub Client 122 15 1 5...

Страница 7: ...Worx Technical Support 146 LIST OF TABLES Table 1 Example Modbus Slave Datasheet for Discrete Inputs 25 Table 2 Example Excel sheet data derived from Slave Datasheet Inputs 25 Table 3 Example Modbus Slave Datasheet for Input Registers 26 Table 4 Example Excel sheet data derived from Slave Datasheet Input Registers 27 Table 5 Example Excel sheet Meta Data 27 Table 6 Power connector 34 Table 7 Ether...

Страница 8: ...Input Register and Holding Register editable fields 65 Table 22 Discrete Input and Coil editable fields 68 Table 23 Data Types and Field Values 69 Table 24 Rules and Topics fields 74 Table 25 Event Types 75 Table 26 Events and Data Types cross reference 76 Table 27 Read Event 76 Table 28 Change Event 77 Table 29 Delta Event 81 Table 30 High Threshold Event 82 Table 31 Low Threshold Event 84 Table ...

Страница 9: ...4 Type Tests 110 Table 45 Cellular Module 111 Table 46 Technical Parameters 111 Table 47 OpenVPN fields 116 Table 48 Firewall rules 118 Table 49 Excel Sheet tabs 128 Table 50 Excel sheet Address tab 129 Table 51 Supported Modbus commands 134 Table 52 Supported Data Types 135 Table 53 Examples for subscribing to different topics in a hierarchical name space 137 Table 54 Node Red fields for Gauge no...

Страница 10: ... disruption to the Modbus system in order to achieve this Using the notion of protocol eavesdropping to non intrusively extract base data from the messages being sent between the existing master and slave devices in a Modbus network it leverages the feature rich data enrichment filtering and aggregation capabilities of the SmartSwarm software stack to produce event driven semantically searchable c...

Страница 11: ...vings in data transmission and upstream processing costs if we send aggregated data instead for example the max min and mean temperature each hour 1 3 WHY FILTER DATA Aggregating data is fine of course but there are certain events that we would want to be informed of on an urgent basis Examples would include a temperature that has exceeded a threshold has an excessive rate of change or has moved b...

Страница 12: ...s organized in accordance with the following flow Connect your Hardware Configure your device s connectivity to Configure the Modbus interface Configure the MQTT interface Build your Slave Maps Configure Rules and Topics Verify your Data Flow Optimize your System ...

Страница 13: ...SmartSwarm 300 Series 13 ...

Страница 14: ...r walks through an example workflow This workflow is intended to be an example of how to get your Modbus data publishing to an MQTT server quickly without getting stuck in the details The remaining chapters will provide the necessary details ...

Страница 15: ... your device to your Modbus network as per the instructions on the quick start guide and as described in the hardware section of this manual 3 2 CONFIGURE YOUR DEVICE S CONNECTIVITY TO SMARTWORX HUB Use an Ethernet cable to connect your local laptop desktop computer to your SmartSwarm device s ETH0 port The ETH0 port of the device has IP address 192 168 1 1 The ETH0 port of the device is a DHCP se...

Страница 16: ...me it takes for a to be successful depends on your cellular network but you should expect it to be successful within minutes If the WAN LED is not turning on you may have entered invalid APN or network credential information for that SIM card Please verify that you are using a valid SIM card and valid cellular settings When the USR LED is on yellow your device has a secure connection to SmartWorx ...

Страница 17: ...a browser page and login to SmartWorx Hub on https hub bb smartworx com In this example we assume that a you have an account to login with SmartWorx Hub and b you are using the cloud instance of SmartWorx Hub to manage your devices ...

Страница 18: ...ck Device ID to check that your device is available to be claimed by you Assuming that it is you may then select Claim Device Your Device is now available for you to manage By selecting the Devices View Devices screen we can see that the device is available and that it is currently Online 3 3 CONFIGURE THE MODBUS INTERFACE Select the Device click the Device ID link Now you can navigate to the Modb...

Страница 19: ...SmartSwarm 300 Series 19 Now configure the Modbus Settings so that they match the actual Modbus configuration of your Modbus network Apply the changes ...

Страница 20: ...ACE Select MQTT from the list on the left hand pane and configure your MQTT interface We assume that you already have an MQTT broker that you can publish to In our example we know we have an MQTT broker available at 52 51 11 241 using the default port 1883 ...

Страница 21: ...t If you chose not to apply security settings now please remember to do so later Once you are confident that your MQTT connection settings are valid we recommend that you enable TLS and configure a trusted secure connection between the SmartSwarm device and your MQTT broker Remember to Apply your changes 3 5 BUILD YOUR SLAVE MAPS There are two main ways for you to build your Slave Maps Discover or...

Страница 22: ...period As the SmartSwarm device is a passive sniffer device the time it takes for it to learn all of the Modbus slaves and registers is outside of the control of the device It depends entirely upon how the Modbus Master is configured We recommend that you initially leave your device running on the Modbus network for a period of time maybe 10 or 15 minutes At this time the device will have learned ...

Страница 23: ... 2 CREATE IMPORT YOUR SLAVES Using the Create option you can import a pre prepared pre enriched set of Slave data in either Excel or JSON format We provide a number of aids for you to use the Create option First you can download templates directly from here using the Download Templates option At the time of writing we have templates in xls xlsx and json formats Second you can create a slave and en...

Страница 24: ...prepared slave map from a template file To create the pre prepared slave map we took the datasheet of a slave device an Emerson Liebert nFinity UPS and we populated the Template accordingly Here s an example from the Modbus Inputs section of the actual device Datasheet ...

Страница 25: ... 1 Example Modbus Slave Datasheet for Discrete Inputs We derived the following Inputs Excel sheet information from this datasheet using the provided Excel template Table 2 Example Excel sheet data derived from Slave Datasheet Inputs ...

Страница 26: ...s registers Other devices may use 10x xxx So the first IS register 10 001 corresponds to offset 0 Hence the device register 10 003 becomes our IS register 2 Here s an example of the Modbus Input Registers section of the datasheet Table 3 Example Modbus Slave Datasheet for Input Registers We derived the following Input Registers Excel sheet information from this Datasheet using the provided Excel T...

Страница 27: ...gisters Next optionally fill in the Meta data in the Excel sheet Table 5 Example Excel sheet Meta Data Now we re going to import this pre prepared Excel file into SmartWorx Hub We click on Load Map then browse to the prepared Excel file Select the file and the Slave Map will be immediately loaded ...

Страница 28: ... the file offline for example to change the Meta Data and Slave Address then re import it as a new slave All previously applied enrichment will be available immediately on your new slave When you use the export utility all of your existing slave maps will be exported into a single archive file zip which goes directly into the downloads folder defined by your browser 3 6 CONFIGURE RULES AND TOPICS ...

Страница 29: ...he registers In our example we re enriching the slave s input register data from the slave s datasheet an Emerson power monitoring UPS Don t forget to Save as you go Now we re ready to apply some Rules and Topics Select the Rules and Topics tab The first thing we notice is that the enrichment data we have previously provided has already been applied to this panel ...

Страница 30: ... on the Modbus network in the Event column You define the payload that will be published what is published when an event occurs in the Payload column You define the MQTT topic the payload will be published on how the payload is published when an event occurs in the MQTT Topic and Default Topic columns In our example we have created only one Event We want to know when the Nominal Input Frequency da...

Страница 31: ...ettings to the Device 4 You have correctly configured the MQTT interface on your SmartSwarm device so that your device can establish a connection with a valid MQTT broker a And you have applied your settings to the Device 5 You have created an Event that will actually trigger based on matching actual data conditions on your Modbus network to the Event rule you have created a And you have saved you...

Страница 32: ...egister is not only extremely data intensive across the entire system it will also have real cost associated with it We recommend that you do not enable a Read Rule for every register The IoT environment for consuming data is not intended to be a real time replica of your Modbus control network Publishing every read to every register is not only extremely data intensive across the entire system it...

Страница 33: ...ed such that the smaller flange on the holder is at the top when the unit is mounted on a DIN rail Default orientation of the CKD2 holder To insert into a DIN rail hook the lower longer flange into the DIN rail then rotate the top of the unit towards the DIN rail until it clicks into place To remove from the DIN rail lightly push the IoT gateway upwards until the top part of the CKD2 holder clears...

Страница 34: ... DC supply voltage 2 VCC Positive pole of DC supply voltage 10 to 60 V DC Table 6 Power connector The unit accepts the connection of power supplies in the range 10 V to 60 V DC Protection against reverse polarity connection is built into the device Circuit example 4 3 ETHERNET PORT ETH0 AND ETH1 Panel socket RJ45 ...

Страница 35: ...egative pole Input Output 7 8 Table 7 Ethernet Ports Ethernet cables plug directly into the sockets Always use a cable with an operational locking tab to avoid intermittent communications problems The insulation strength is up to 1 5 kV By default ETH0 is set up as a DHCP server and is intended for the connection of diagnostic devices ETH1 is set up as a DHCP client and may be used as an uplink fo...

Страница 36: ...ed you will need to attach the relevant antennae and install a data enabled SIM card before you can use cellular connections 4 4 1 ANTENNA CONNECTORS ANT DIV AND GPS If cellular communications are required main and diversity antennas must be connected to the IoT Gateway via SMA connectors on the front panel The ANT connector is used to connect the main antenna of the device A second diversity ante...

Страница 37: ...cked PIN code 4 4 2 1 INSERTING REPLACING A SIM CARD Before inserting or removing the SIM card disconnect the device from power supply Using a plastic opening tool or your fingernail press the SIM card into its slot until you hear a click To remove a SIM card press the SIM into the unit until you hear a click After the click release the card and it will pop out of its slot Remove the SIM card and ...

Страница 38: ...al block connectors on the front panel The insulation strength is up to 2 5 kV Attention connectors are not isolated from each other and share a common ground pin The RS 485 ground connection should be made to the RS 232 GND pin 4 5 1 WIRE RS 485 CONNECTION RS 485 connector 4 pin RS 485 Pinout Pin Signal Description Direction 1 Tx Transmit Do not connect Output ...

Страница 39: ...the Modbus network The RS 485 port provides a transmitter and a receiver If you connect the transmitter to your Modbus network you risk interfering with the Modbus communication should the transmitter ever become enabled by software On this device the transmitter is not enabled Nevertheless we recommend that you do not connect pins 1 and 2 CONNECT ONLY TO THE RECEIVER AS SHOWN ABOVE 4 5 2 RS 232 C...

Страница 40: ...th be ON in order to pass both Rx and Tx data In addition switch 3 should be ON and switch 4 OFF Connections should then be made between the data tap pin 5 and the SmartSwarm RS 232 connector pin 3 and the data tap pin 2 and the SmartSwarm RS 232 connector pin 4 No other connections are necessary The following image shows the correct configuration of DIP switches 4 5 3 WIRE RS 485 AND RS 422 CONNE...

Страница 41: ...of the data tap Advantech B B SmartWorx offers a range of such converters Please determine the most suitable combination for your application 4 6 MICROSD CARD READER The MicroSD card socket located on the rear panel of the unit is currently unused by SmartSwarm 351 4 7 USB PORT The USB port located on the front panel is currently unused by SmartSwarm 351 4 8 I O PORT The I O port located on the fr...

Страница 42: ...eady have a SmartWorx Hub account please contact your local B B representative to arrange for one to be set up You will need to provide the following information in order for an account to be set up An Administrator contact name and email address The Device ID of the SmartSwarm 351 devices you already have taken delivery of from the SmartSwarm 351 product label on each device The MAC ID of the fir...

Страница 43: ...ork operator Apply it The WAN LED will turn ON yellow when the cellular connection has been successfully established 5 3 STEP 3 VERIFY THE SECURE CONNECTION WITH SMARTWORX HUB The USR LED will turn on yellow when the device successfully makes a secure connection with SmartWorx Hub https hub bb smartworx com 5 4 STEP 4 VERIFY THAT YOUR DEVICE IS AVAILABLE ON SMARTWORX HUB In order to verify the ins...

Страница 44: ...SmartWorx Hub it will be automatically downloaded to the device during this first connection 5 5 FACTORY DEFAULTS If the unit is not connecting as expected it may be reset to Factory Defaults at any time by pressing the Reset button on the back panel of the device for more than 10 seconds ...

Страница 45: ...y offline all changes you make are queued All of your changes will be immediately applied as soon as the device comes online 6 1 DEVICE MANAGEMENT Please refer to the SmartWorx Hub user manual for more detailed information on general Device Management Find the device that you wish to manage in the View Devices screen and click on it to open the Manage Device screen ...

Страница 46: ...he SmartSwarm 351 This configuration must match the configuration of the Modbus network you re monitoring See chapter 7 MQTT Configure the MQTT interface of the SmartSwarm 351 See chapter 8 Decoder This section enables you to Build and Enrich the Slave Maps that are of interest to you This section also enables you to define the Rules you wish to create to publish data on the MQTT interface and the...

Страница 47: ...e Modbus interface please ensure that you match the Modbus Master configuration on the Modbus network you are monitoring Setting Description Port RS 232 or RS 485 The SmartSwarm 351 can only sniff on one of these physical ports at a time Baud Rate 1200 through 115200 Parity None Even or Odd Databits 8 Stopbits 1 or 2 ...

Страница 48: ...erface provided enables you to configure the MQTT Client that resides on the SmartSwarm 351 The MQTT Client will use this configuration to connect to and to communicate with an MQTT Broker Once connected the SmartSwarm 351 will publish data to the MQTT Broker The data published will be in accordance with the Rules and Topics that you will define for your Modbus environment see chapters 9 and 10 Th...

Страница 49: ...f the MQTT broker This is the address that the SmartSwarm 351 will publish MQTT Topics to Port TCP IP port used by the MQTT broker The default port for MQTT is 1883 When TLS is enabled the default port is 8883 Ensure that the port you use matches the port on the MQTT Broker ...

Страница 50: ...hat is the number of seconds that the client will persist in attempting to make an initial connection with the broker Retry Interval The number of seconds after a QoS 1 or QoS 2 message has been sent that the publisher will wait before retrying when no response is received Keep Alive The Keep Alive is a time interval used by the client to ensure the connection with the broker is kept open The clie...

Страница 51: ...o disable this option But it should be enabled for secure applications Server Root CA Cert The Root CA cert used to sign the broker s certificate If Verify Server Cert is enabled this field is required Mutual Authentication Mutual authentication means that the broker will attempt to verify the client s certificate when the SSL TLS session is established You must ensure that the Root CA cert used t...

Страница 52: ...to consider the QoS for the publishing client to broker Retain This flag determines whether the message will be saved by the broker for the specified topic as the last known good value New clients that subscribe to that topic will receive the last retained message on that topic instantly after subscribing Table 15 MQTT Interface These settings are the general MQTT connection settings For each indi...

Страница 53: ...resent this information to you o Then edit this information with any extra knowledge that you have Create or Import a Slave Map o Use your prior knowledge of the Modbus network and the slaves to pre configure the device This can be done in advance of connecting the device to a network It is possible to mix these two approaches in whatever way makes most sense for your application Here we will pres...

Страница 54: ...ries 54 The Decoder interface screen displays all the Modbus Slaves currently known by SmartWorx Hub for this device When you first use SmartWorx Hub to enrich your new SmartSwarm device the list of Slaves will be empty ...

Страница 55: ... fieldbus it immediately begins to Discover the bus It will automatically build up a Map of all Slaves and Registers that it sees You may upload this automatically discovered Modbus information from the device to SmartWorx Hub using Sync Maps See section Import a Slave Map New Map Create You may already know the slave address es you wish to enrich for rules and publish purposes Use this option to ...

Страница 56: ...he learned information into SmartWorx Hub Clicking on Sync Maps tells the device to upload its discovered maps This should be done after the application has discovered all slaves on the Modbus network and before enrichment data has been entered Any maps on the device which have already been enriched will retain their data After syncing the Slaves grid will be populated with the discovered maps As ...

Страница 57: ... on how to do this 9 2 CREATE AN EMPTY SLAVE MAP Clicking on New Map allows you to enter an empty slave map Enter a slave number between 1 and 247 and click OK The map is then displayed on the Decoder screen and may now be edited Entering a Slave number which already exists on the system will overwrite the existing map ...

Страница 58: ...d to manipulate your exported data into one of the formats required by the SmartWorx Hub import utility Click on Load Map to import existing slave maps You can import multiple maps using the Ctrl and Shift keys when selecting maps to be imported Supported formats are json xls and xlsx Please refer to Appendix 2 for more information Once imported you can edit the data in line on SmartWorx Hub as de...

Страница 59: ... Use this button when you want to deploy your edits so that they take effect on the SmartSwarm device Exit Editor Exit Slave Editor mode Note that when you exit the Editor you will be prompted to Stay on page if you have unsaved changes Please remember to Save your changes as you make them and to Push them as often as necessary Table 17 Editing Slave Maps When you exit the Editor you will be promp...

Страница 60: ...his information is then automatically used by default to define the MQTT topic on which data will be published If Meta Data is populated the custom MQTT Topic will be composed of the text from the Location Description and Name fields as entered in the Meta Data tab E g Location Description Name When considering topic design it is important that the topic hierarchy is carefully chosen to facilitate...

Страница 61: ...of the meta data fields This hierarchy is not limited to 3 levels of Location Description Name E g the text Warehouse HoldingArea Room401 can be entered into the Location field Click on a cell to enter edit mode Use the tab key to navigate between cells If the data entered is invalid the cell color will change to red Pressing the ESC key while in edit mode will restore the original value Changes a...

Страница 62: ...OLDING REGISTERS Item Map Property Description Address address Index from the register type base address Bit Offset address_offset Starting position within the register counting from the least significant bit The default is 0 which is appropriate for all non Enum Data Types An Enum Data Types is used to represent a register that is used for multiple purposes e g using individual bits or bit fields...

Страница 63: ...es a bit width of 4 bits within the register Bit Offset specifies the starting position of those 4 bits within the register Zero Value zero_value Zero calibration value for this register This is an important value in converting from the Modbus Register Value to a context aware Enriched Value The equation used to enrich the Modbus data is Enriched_Value Modbus_Register_Value Scaling Zero_Value See ...

Страница 64: ...e register value represents temperature and we want to represent the temperature in the Celsius scale we would enter Deg C here This Units field value is not used for any algorithmic purpose within the Device It will become part of the enrichment data published for this register Num Value num This field is only relevant for Enum data types The Num Value field enables us to specify a numeric value ...

Страница 65: ... Closed Num Value 1 Str Value Valve Open This Str Value field is not used for any algorithmic purpose within the Device It will become part of the enrichment data published for this register Table 21 Input Register and Holding Register editable fields 9 4 3 1 1 EXAMPLE USE OF ZERO VALUE AND SCALING Condiser an example where a Modbus slave uses a 12 bit ADC to digitize a 4 20mA loop sensor which is...

Страница 66: ... 00305 The Scaling factor is the inverse of this It can also be thought of as the One in X gradient of the graph 𝑆𝑐𝑎𝑙𝑖𝑛𝑔 1 0 00305 327 6 The Zero Value is where the graph intersects the Y axis It can also be thought of as the Enriched value that corresponds to a Raw Modbus Register value of 0 ...

Страница 67: ...in degrees Fahrenheit instead of degrees Celsius The register value ranges from 819 to 4095 corresponding to a temperature range of 32 to 50F Now the calculations are as follows 𝑆𝑙𝑜𝑝𝑒 50 32 4095 819 0 00549 The Scaling factor is the inverse of this It can also be thought of as the One in X gradient of the graph 𝑆𝑐𝑎𝑙𝑖𝑛𝑔 1 0 00549 182 ...

Страница 68: ...COILS Item Map Property Description Address address Index from register type base address Name name A description of the register function e g Pump Status Alias alias An alternate name for the register e g Heating Pump 1 Str 0 Value val0 Enriched string for a value of zero e g OFF Str 1 Value val1 Enriched string for a value of one e g ON Table 22 Discrete Input and Coil editable fields 9 4 4 DATA...

Страница 69: ...ned 32 bit floating point range 3 4E 38 to 3 4E 38 9 4 4 7 STRING Collection of Registers representing 8 bit ASCII characters The width of this field should be set to the length of the string multiplied by 8 9 4 4 8 COUNTER Combination of bits representing a roll over counter For example an 8 bit counter would range from 0 to 255 When it reaches 255 the next increment will cause it to roll over to...

Страница 70: ... INPUT REGISTERS AND HOLDING REGISTERS By default discovered Holding and Input registers will have a DataType of UINT16 when displayed The user should select the correct Data Type for each register 9 4 6 2 1 THE ENUM DATA TYPE ENUM stands for enumerated type It means that the register can have a finite set of named values When entering ENUM data types an entry must be made for each enum value i e ...

Страница 71: ... independent states at the same time Another common ENUM scenario uses the value of the whole register to encode a single state In the above screenshot Register 42 represents one state variable that can have multiple possible values The Min Max Units Num Value and Str Value fields are not used for any algorithmic purpose within the Device The data entered for these fields will become part of the e...

Страница 72: ...s are defined Register 14 uses a 2 bit width to encode 4 states to represent the current status of a control room door Register 65 Bit Offset 0 has three states Valve Open Valve Closed Valve in Transition Register 65 Bit Offset 2 has three states Valve Open Valve Closed Valve in Transition Register 14 Bit Offset 8 has four states Door Closed Door Open Door Opening Door Closing 9 4 7 DELETING REGIS...

Страница 73: ...hat your cellular connection and cloud service would keep up with the sustained enriched data rate The Decoder interface on SmartWorx Hub enables you to first apply enrichment for your Modbus data and then to apply rules for your enriched data If you want some specific data to be published on MQTT you must add a filter rule A rule has two parts An event which determines WHEN data will be published...

Страница 74: ...ules an error message will be displayed if any required parameters for an event are missing Once rules have been saved click Push Rules to apply the rules to the device The following fields are editable in the Rules and Topics tab Item Description Event Select the event type from a dropdown menu Payload Select what to publish from a dropdown menu QOS Quality of Service Retain Instructs the broker ...

Страница 75: ...anges from the last observed value High Threshold Trigger when the enriched register value goes above a threshold Low Threshold Trigger when the enriched register value goes below a threshold Delta Trigger when the enriched register value changes by a specified amount from the last published value High Rate Trigger when the rate of change of the enriched register value increases by more than a spe...

Страница 76: ...NT16 UINT32 INT32 FLOAT32 Each event type is discussed in more detail in the following sections 10 2 1 READ Trigger a publish when a register has been read or written by the Modbus master This event is applicable to any register type and any data type For a counter it returns the raw value of the register not the accumulated value Inputs Coils Input Registers Holding Registers ENUM Numeric STRING ...

Страница 77: ...No further configuration is required 10 2 2 CHANGE Trigger a publish when an enriched register value changes This event is applicable to any register type and any data type Inputs Coils Input Registers Holding Registers ENUM Numeric STRING COUNTER Change Table 28 Change Event ...

Страница 78: ...hows a register that usually has a numeric value of 100 but with occasional deviations The red annotations show when MQTT publishes will be triggered assuming that a Change rule is applied with Change by 0 Note that we get only 13 MQTT messages as opposed to 68 if we had used a Read rule For analog data it probably does not make sense to create a Change rule with Change by 0 as process noise will ...

Страница 79: ...diagram above the green bars represent the 10 change that is dynamically calculated after each new sample is received An MQTT publish will be triggered only if the next sample value lies outside of the allowed range represented by the green bar For the Change event type only a percentage or relative change can be specified That means the actual change in value required to trigger an event will var...

Страница 80: ... A change from 2 to 3 represents a 50 change and so on A change from 10 to 11 represents a 10 change which is not greater than 10 The value of 11 does not trigger a publish As the enriched register value increases further the absolute change of 1 becomes smaller in percentage terms No further MQTT publishes are triggered For a slave waveform like this you probably want to specify an absolute chang...

Страница 81: ...1 Like the Change event you can enter a Change by value after selecting the Delta event type on a register The MQTT publish will only be triggered if the enriched register value has changed by greater than or equal to this value compared to the last time it was published The following example shows a register that ramps monotonically from 0 incrementing by 1 on each Modbus master access The red an...

Страница 82: ... register you must enter two fields The Threshold field specifies the value above which the register must increase in order to trigger an MQTT publish The Hysteresis field allows you to prevent multiple MQTT publishes due to process noise Once the register has crossed the Threshold value in the positive increasing direction it must cross the value Threshold Hysteresis in the negative direction bef...

Страница 83: ... High Threshold rule is applied with Threshold 40 and Hysteresis 5 The red dots show samples which are above the Threshold The red callouts show when MQTT publishes will be triggered Note how only two MQTT messages are published One when the value changes from below the threshold to above One when the value changes from above the threshold to below minus the hysteresis The default value of the Hys...

Страница 84: ...elow a fixed threshold This event is only applicable to Input Registers and Holding Registers not Discrete Inputs and Coils It is applicable to numeric data types only It is not applicable to a counter A counter is a rollover data type and so we have no record of its true accumulated value on which to base the threshold Inputs Coils Input Registers Holding Registers ENUM Numeric STRING COUNTER Low...

Страница 85: ... Hysteresis in the positive direction before it is considered to have re crossed NOTE This rule is STATEFUL For example when the Low Threshold is crossed in either direction an MQTT publish will be triggered But if the register remains below or above the threshold no further messages will be published An MQTT publish will occur only on state transmissions The following rules are STATEFUL High Thre...

Страница 86: ...creasing A drop in value is taken as a rollover Therefore for an 8 bit counter range 0 255 a change in value from 254 to 253 is an increase of 255 not a decrease of 1 This event is only applicable to Input Registers and Holding Registers not Discrete Inputs and Coils It is only applicable to numeric data types and the counter data type Note a counter is always increasing A drop in value is taken a...

Страница 87: ...rate of change remains below or above the threshold no further messages will be published An MQTT publish will only occur on state transitions The following rules are STATEFUL High Threshold Low Threshold High Rate Low Rate The following example shows a register that follows a sinusoidal waveform The Modbus Master is polling the register every 200ms Assume that a High Rate rule is applied with Cha...

Страница 88: ...mit is specified in units per second the system does not have to wait 1 second before deciding whether or not to publish Whenever two consecutive samples are received be they separated in time by less than or more than 1 second the instantaneous rate of change is calculated If the actual rate of change is greater than the programmed threshold the MQTT publish will be triggered In the following exa...

Страница 89: ...hreshold timing jitter and or process noise may lead to multiple MQTT publishes due to repeated state transitions 10 2 7 LOW RATE Trigger when the enriched register value has changed at a rate less than a certain rate Note a counter is always increasing A drop in value is taken as a rollover Therefore for an 8 bit counter range 0 255 a change in value from 254 to 253 is an increase of 255 and not ...

Страница 90: ...second NOTE This rule is STATEFUL i e When the Rate Threshold is crossed in either direction an MQTT publish will be triggered But if the rate of change remains below or above the threshold no further messages will be published An MQTT publish will only occur on state transitions The following rules are STATEFUL High Threshold Low Threshold High Rate Low Rate The following example shows the same r...

Страница 91: ... equivalent for Rate Hysteresis This means that if the rate of change of a register happens to coincide with the selected Rate Threshold timing jitter and or process noise may lead to multiple MQTT publishes due to repeated state transitions 10 2 8 SCHEDULED This event type allows you to specify an interval at which the data will be published on MQTT and the time within that interval when the publ...

Страница 92: ... description in the Read section 10 2 10 GLOBAL CHANGE Trigger a publish when the value of any register of the selected Type changes This event is applicable to any register type and any data type For a counter it returns the raw value of the register not the accumulated value Inputs Coils Input Registers Holding Registers ENUM Numeric STRING COUNTER Change Table 35 Global Change Event Note that w...

Страница 93: ...one register In the case of a Global Read or Global Change rule a single Modbus transaction may read or write more than one register Every register that meets the Read or Change criteria will be published Not all payload selections are available for all event types as the following table explains Event Default Slave HR IR IS CS Range Read Change Delta High Threshold Low Threshold High Rate Low Rat...

Страница 94: ...e see the published JSON schema below A sample of payload published from this rule might look like this model state HR value_from RESPONSE published_on HI ON name HR_1 min 0 address_offset 0 max 100 zero_value 0 num_value 101 000000 scaling 1 alias Water Temperature state VALIDATED var_pct 16 000000 at 2016 07 14T19 29 22 089Z address 1 units Deg C new_value true new_read true meta description Sla...

Страница 95: ...ter it will not appear in the payload The published data will be in json format A sample of payload published from this rule assuming there are 3 Holding Registers for this Slave might look like this model state HR value_from RESPONSE published_on HI ON name HR_1 min 0 address_offset 0 max 100 zero_value 0 num_value 103 000000 scaling 1 alias Water Temperature state VALIDATED var_pct 17 000000 at ...

Страница 96: ...ss 3 units new_value false new_read true meta description Slave_1 value_byte_order SNo name Power_Meter installation_date 14 07 2016 location Test_Rack address DEVID 6500004 PORTID 1 SLAVEID 10 SWMID 0 manufacturer NA type ModbusSlave id 10_HR_1_HI 10 3 1 3 THE SLAVE PAYLOAD With this rule if the enriched value of Register 1 goes above 100 all registers from this Modbus slave will be published The...

Страница 97: ...name HR_1 min 0 address_offset 0 max 100 zero_value 0 num_value 113 000000 scaling 1 alias Water Temperature state VALIDATED var_pct 31 000000 at 2016 07 14T19 36 29 127Z address 1 units Deg C new_value true new_read true value_from RESPONSE published_on HI ON name HR_2 min 10 address_offset 0 max 40 zero_value 0 num_value 23104 000000 scaling 1 alias Air Temperature state VALIDATED var_pct 0 at 2...

Страница 98: ...puts and 2 Input Registers one of them is an ENUM with 3 enumerated associated values model state CS published_on HI OFF name CoilExample str_value OutsideBounds num_value 0 value_from RESPONSE alias This is a Coil Example state VALIDATED var_pct 0 new_read false address 1 new_value false at 2016 07 15T15 11 00 373Z HR value_from RESPONSE published_on HI OFF name HR_1 min 0 address_offset 0 max 10...

Страница 99: ...nits Deg C new_value true new_read true value_from RESPONSE published_on HI OFF name HR_2 min 10 address_offset 0 max 40 zero_value 0 num_value 115 000000 scaling 1 alias Air Temperature state VALIDATED var_pct 8 000000 at 2016 07 15T15 16 51 407Z address 2 units Deg C new_value true new_read true value_from RESPONSE published_on HI OFF name HR_3 min 0 address_offset 0 max 90 zero_value 0 num_valu...

Страница 100: ... 13 value_from RESPONSE alias Batt_Inputs state VALIDATED var_pct 18 000000 new_read false address 55 new_value false at 2016 07 15T15 14 37 395Z published_on HI OFF name Num Battery Outputs address_offset 4 num_value 2 value_from RESPONSE alias Batt_Outputs state VALIDATED var_pct 0 new_read false address 55 new_value false at 2016 07 15T15 14 37 395Z published_on HI OFF name Num Indicator Output...

Страница 101: ...pe ModbusSlave id 10_HR_1_HI 10 3 1 4 THE RANGE PAYLOAD With this rule if the value of Register 1 goes above 100 the data for the registers between address 2 and 3 will be published If there has not been any actual data seen on Modbus for a register in this range it will not appear in the payload The num_value in the payload for each of the holding registers in this range will be the actual value ...

Страница 102: ...Power_Meter installation_date 14 07 2016 location Test_Rack address DEVID 6500004 PORTID 1 SLAVEID 10 SWMID 0 manufacturer NA type ModbusSlave id 10_HR_1_HI 10 4 TOPICS HOW After we have decided what data we want to publish we can choose a topic on which to publish this data Clients can then subscribe to this topic in order to see the data Two independent topic spaces can be supported simultaneous...

Страница 103: ...0 4 1 CUSTOM TOPIC SPACE For every rule in the Rules and Topics tab the MQTT Topic field is completely customizable Any string may be entered A forward slash will indicate a new level in the topic hierarchy For any newly created rule the MQTT Topic is pre filled with strings from the Meta tab for that slave in the order Location Description Name For example given the following slave meta data the ...

Страница 104: ...ice_ID Port_ID Slave_ID RegisterType Event For example a typical topic string is 0 700000 1 1 HR SCHEDULING Field Description Swarm_ID Always 0 for devices which are not part of a Swarm Device_ID The serial number of the device as printed on the hardware label If the Device ID in SmartWorx Hub appears as 203 01 6200799 then the Device_ID field is just the last 7 digits 6200799 Port_ID 0 RS 232 1 R...

Страница 105: ...pic space in two important respects 1 Publishes on the default topic space are always SERIALIZED at the register level i e If the Payload selection is more than one register then there will be one MQTT message published on the custom topic but multiple MQTT messages published on the default topic 2 Every publish on the default topic space is accompanied by another message containing meta data for ...

Страница 106: ...0 Series 106 SLAVEID 1 SWMID 0 description Warehouse heaters installation_date 29 03 2016 location Test Rack manufacturer Carlo Gavazzi name EM24 product_code EM24 DIN AV9 3 X IS X value_byte_order SWord version 1 0 ...

Страница 107: ... your MQTT interface is configured to the correct settings The settings you select must match those of the MQTT broker you wish to publish to We recommend that you use non secure settings until you have verified connectivity Then enable a fully secure connection e g Initially get some test data published on a public MQTT broker without enabling TLS to secure the transport layer Once you have verif...

Страница 108: ...SmartSwarm 300 Series 108 8 Verify the MQTT Topic that your events will be published on Section 10 Topics HOW Appendix 3 Table 40 Verify your Data Flow ...

Страница 109: ...NDIX 1 HARDWARE RATINGS 13 1 ENVIRONMENTAL IoT Gateway SmartSwarm 300 Temperature range Operating Storage 40 to 75 deg C 40 to 85 deg C Cold start 35 deg C 40 deg C Data transfers via mobile network are available immediately Data transfers via mobile network are available approximately in five minutes after the start of the device Everything else is functional immediately Humidity Operating Storag...

Страница 110: ...d AM modulated IEC 61000 4 3 Enclosure 20 V m crit A 80 2700 MHz Fast transient EN 61000 4 4 Signal ports Power ports Ethernet ports 2 kV crit A 2 kV crit A 2 kV crit A Surge EN 61000 4 5 Ethernet ports Power ports I O ports 2 kV crit B shielded cable 0 5 kV crit B 1kV LtoL crit A 2kV LtoGND crit A RF conducted EN 61000 4 6 All ports 10 V m crit A 0 15 80 MHz Radiated emission EN 55022 Enclosure C...

Страница 111: ...4 kbps UL CS bit rate 64 kbps DL 64 kbps UL W CDMA FDD standard Supported frequencies 900 2100 MHz GPRS EDGE parameters Bit rate 237 kbps DL 59 2 kbps UL GPRS multislot class 10 CS 1 to 4 EDGE multislot class 12 CS 1 to 4 MCS 1 to 9 Supported frequencies 900 1800 1900 MHz Supported GPRS EDGE power classes EGSM 900 Class 4 33 dBm GSM 1800 1900 Class 1 30 dBm EDGE 900 Class E2 27 dBm EDGE 1800 1900 ...

Страница 112: ...ation of the ETH ports and the Cellular interface of your device By default ETH0 has a static IP address of 192 168 1 1 By default ETH0 runs a DHCP server which will serves a DHCP address to a connecting device This means that you should configure your desktop laptop to take an IP address automatically when you connect it to ETH0 of the SmartSwarm device There is a local web server for local confi...

Страница 113: ...ocally on your device Changing network settings from SmartWorx Hub can result in breaking the working secure connection your device has to SmartWorx Hub Please ensure you are applying appropriate network settings to your device or that you have a contingency plan e g local device access is available in the event that you unintentionally cause the secure connection to drop 14 1 2 DHCP The DHCP sett...

Страница 114: ...ect ETH0 of the device into a LAN port that is also serving DHCP addresses 14 1 3 OPENVPN You may configure up to 2 OpenVPN tunnels to run on your device This may be useful if you need the ability to reach the local web server on the device remotely for example The user interface enables you to configure an OpenVPN tunnel to an OpenVPN server ...

Страница 115: ...igger the number the more debug messages are written into the OpenVPN message log We recommend that you use 0 here LZO Compression Enable or Disable compression on the OpenVPN client server connection If compression is enabled on the server it must also be enabled on the device Enabled by default Client Mode Enabled or Disabled Enabled by default Must be enabled if the Tunnel is enabled CA Certifi...

Страница 116: ... genrsa out MyDevicePrivate key 2048 You now have the Key required Next you need to generate a Certificate Signing Request Here s an example again this is only one of many possible examples openssl req new sha256 key MyDevicePrivate key out CertificateRequest csr Country Name your 2 letter country code State or Province Name your province name Locality Name your location name Organization Name you...

Страница 117: ... built in Firewall on your SmartSwarm device This firewall cannot be re configured by the user The default Firewall policy is to drop all input and forward requests and to accept all output requests The following Firewall exception rules are then applied to the policy for incoming requests Interface DHCP server ICMP ping HTTP SSH Forward to internet ETH0 ETH1 Cellular ...

Страница 118: ... Table 48 Firewall rules Note that some Firewall exception rules will be applied automatically depending upon whether you have configured OpenVPN For example the Tunnel interface will only exist when you have enabled an OpenVPN tunnel ...

Страница 119: ...shooting problems in collaboration with the Advantech B B SmartWorx technical support team 15 1 THE LOCAL WEB INTERFACE There is an embedded web server which provides a local interface on ETH0 By default ETH0 of the device is configured with IP address 192 168 1 1 subnet 255 255 255 0 ETH0 is configured as a DHCP server This means that if you physically connect ETH0 to your laptop desktop the devi...

Страница 120: ... assume that the DHCP server that serves this address will also provide a route to the internet If this is not the case you may need to re configure your ETH1 interface 15 1 3 TROUBLESHOOTING The Troubleshooting tab gives you the ability to see the actual internal device status of a number of key interfaces processes and settings This interface gives you a drop down list of commands that you can t...

Страница 121: ...SmartSwarm 300 Series 121 ...

Страница 122: ...t to hub bb smartworx com using https on port 443 If for example you have a hosted instance of SmartWorx Hub you can change your devices settings to connect to your hosted instance instead 15 1 5 CELLULAR Use the Cellular tab to get some cellular integrity diagnostics from your device Using this tab you can get Signal Strength System Information Signal Information Card Status ...

Страница 123: ...es from one of the debug logs available To see the logs you must turn on follow mode and Execute 15 1 7 MODBUS The Modbus Tab will draw a graph of the Modbus Slaves that this Device knows about This is a graphical representation of the Slave Maps currently residing on this device Note that this representation will include any Slave devices that were known on this device even if they are not curren...

Страница 124: ... 1 8 DEBUG AND AGENTS It s best to use the Debug and Agents Tabs in conjunction with each other In the Debug Tab you can see some static debug information and you can select which Agent s you wish to see run time information from ...

Страница 125: ...nts tab you can see run time information output from the enabled Application Agents Note that even if an Agent has been enabled on the Debug Tab it will only appear on the Agents Tab if there is data actually being published by that Agent ...

Страница 126: ...ebugging you enable the more the performance of your device will degrade We recommend that you only use the Debug interface if necessary in collaboration with the Advantech B B SmartWorx technical support personnel 15 1 9 TSED The Time Series Event Detection Agent is treated differently than the other Application Agents This is the agent that will detect when complex trigger events occur i e when ...

Страница 127: ...ata enrichment process If you see data streaming through the TSED interface you will know that your complex Events are triggering successfully and there will be data published to the MQTT interface NOTE you will only see TSED as an available Agent when complex events are being triggered ...

Страница 128: ...e sheet follows the structure of the Slave Map page on SmartWorx Hub See section entitled Editing Slaves for more information on entry fields The notation in the Excel sheet corresponds to the notation on the SmartWorx Hub editor tabs like this Excel Sheet Tab SmartWorx Hub Tab Notes meta Meta Meta data for this Modbus Slave address none Provides information about the Modbus Slave e g the Modbus S...

Страница 129: ...hich can be found on the device label PORTID 0 when interface is RS 232 1 when interface is RS 485 SLAVEID The number of the slave 1 247 SWMID This is always 0 Table 50 Excel sheet Address tab Example of the Meta Tab Example of the HR Holding Registers Tab Example of the IR Input Registers Tab ...

Страница 130: ...ample of the CS Coils Tab Example of the IS Discrete Inputs Tab After completing the sheet save the sheet with an appropriate filename e g map 2 xlsx This file can now be imported into SmartWorx Hub by clicking the Load Maps link ...

Страница 131: ...ta address DEVID 7000000 PORTID 1 SLAVEID 1 SWMID 0 description installation_date location manufacturer name product_code value_byte_order SNo version state CS HR IR IS type ModbusSlave To add a Holding register to the map insert the following under the HR section To add another register repeat the section separated by a comma HR address 500 address_offset 0 name Motor Frequency datatype UINT16 le...

Страница 132: ...p insert the following under the CS section To add another register repeat the section separated by a comma CS address 24 name Coil Example alias JN1 state VALIDATED available_values OFF ON To add a Discrete Input to the map insert the following under the IS section To add another register repeat the section separated by a comma IS address 30 name Input Example alias IP1 state VALIDATED available_...

Страница 133: ... managed by The Modbus Organization The standard is available for free download from http modbus org specs php Download the Modbus Serial Line Protocol and Implementation Guide Modbus_over_serial_line_V1_02 pdf and the MODBUS Protocol Specification Modbus_Application_Protocol_V1_1b3 pdf Modbus is a simple request response protocol in which a master device sends a message asking for a particular sl...

Страница 134: ...martSwarm 351 as Holding Register 5 might appear in other manufacturers data as register 40 006 or 400 006 SmartSwarm 351 decodes information exchanged using the following Modbus commands Function Code Description 01 Read Coil Status 02 Read Input Status 03 Read Holding registers 04 Read Input registers 05 Force Single Coil 06 Preset Single register 15 Force multiple Coils 16 Preset multiple regis...

Страница 135: ...acked Boolean i e 16 discrete Booleans held in a single 16 bit register 16 bit Integer signed unsigned 16 bit Counter 32 bit Integer signed unsigned single 32 bit or 2x16 bit registers 32 bit Counter single 32 bit or 2x 16 bit registers 32 bit Float single 32 bit or 2x 16 bit registers 32 bit Packed Boolean single 32 bit or 2x 16 bit registers Multi register text Table 52 Supported Data Types Smar...

Страница 136: ...ndwidth are limited The publish subscribe communication model MQTT uses an intermediate middleware server to keep track of all of the subscriptions in use from connected devices When it receives a message the server also referred to as a broker analyses the topic information contained in the message and simply forwards the message to any and all applications with a matching topic subscription Whil...

Страница 137: ...re is no limit to the levels of depth number of slash separated strings in a topic tree There is no limit to the length of any particular level name in the tree but again this will impact data usage There may be any number of root nodes that is any number of topic trees Topic Description MyCo Galway building A Warehouse Data relating to the warehouse in building A located in Galway for my company ...

Страница 138: ...ary MQTT is a widely adopted lightweight open protocol which provides a transport layer in IoT architectures Using Publish Subscribe methodology it decouples the users of data from the producers of that data This allows extremely flexible and scalable data exchange architectures systems to be constructed which use semantic principles to move the users focus away from how to move the data between s...

Страница 139: ...ode RED a dashboard can be quickly created to display your MQTT data In this example we will set up two rules publishing to two different topics This will result in an MQTT payload in the following format id Oranmore Pump P1 SP model meta address DEVID 70000000 P ORTID 1 SLAVEID 5 SWMID 0 description Pump installation_date 2 9 03 2016 location Oranmore manufacturer name P1 product_code value_byte_...

Страница 140: ...ab Add the following nodes and connect as per diagram below Topics is a switch node which gives multiple outputs based on rules Add two rules as per the diagram below and click OK In this example two different topics are being published so we add an equal rule for each topic This means that if Rule 1 is matched the payload will be output on output 1 Matches for Rule 2 will be output on output 2 ...

Страница 141: ...SmartSwarm 300 Series 141 SP and PC are JSON nodes which transform the input into a JSON object ...

Страница 142: ...ty as an input to another node In this case num_value is the payload property that we want The template will depend on the Register type and in the case of multiple registers the index of the register within the register array In this case the desired register is HR and it is the register at index 0 ...

Страница 143: ...k Ok Field Description Tab Menu under which the control will be displayed Name Title of the control on the page Group Controls can be grouped on the page in a vertical row Order The order the control is displayed in the vertical row Template This will always be value which is the input value from the connected node Min This is the minimum value specified during enrichment for the register Max This...

Страница 144: ...ontrol Field Description Tab Menu under which the control will be displayed Name Title of the control on the page Group Controls can be grouped on the page in a vertical row Order The order the control is displayed in the vertical row Old After Period of time after which oldest data will be removed from the chart No Data Message to be displayed when no data has been received Interpolate Type of gr...

Страница 145: ...controls on the page All the nodes are now configured and connected and are deployed by clicking Deploy The message Successfully deployed will be displayed Open a new tab in the browser and add the node RED server address ui to the address bar The dashboard should now be displayed ...

Страница 146: ...SmartSwarm 300 Series 146 ADVANTECH B B SMARTWORX TECHNICAL SUPPORT Phone 1 800 346 3119 Monday Friday 7 a m to 5 30 p m CST Fax 815 433 5109 Email support advantech bb com Web www advantech bb com ...

Отзывы: