Skip to main content

Use Dtools' MIOT Plugin to Connect

Use the MIOT function in Kinco DTools software to connect to the M-IoT platform

Premise

  1. The user must have at least one Kinco FUTURE / GREEN / MASS series screen, and the screen must be connected to the Internet (Ethernet / WiFi / 4G network).The touch screen model selected in this case is M2100E;
  2. The user's computer has installed the software Kinco DTools V4.2 or above, and can use it normally;
  3. The user already has an account with management rights for the Kinco M-IoT platform.

Config Flowchart

Steps

1. Create model

  • Name, model:refers to device related information
  • Number of modules:Here it refers to the number of acquisition terminals of a device.Generally, it is 1. If it is a large device, multiple acquisition terminals report the same device data, then this is the number of acquisition terminals

2. Dtools opens the MIOT module

After Dtools 4.2, in the Internet of Things, the docking support of MIOT has been added.

3. Basic Settings

  • Server
    • Deployment type:Cloud deployment-shared
    • Domain name, port:Default, no need to change
    • Password:MQTT connection password (see the example below)
    • Heartbeat cycle, online idle time:Default, no need to change
  • Model
    • Organization:Organization Code (see the example below)
    • Username:Username for log in the M-IoT platform (user email address)
    • Password:Password for log in the M-IoT platform
    • Model:Select the model you created
      • Enter the correct Organization Code, User Name and Password, click the Obtain button, and the Model List will pop up.
      • Choose the right model
    • Device number:0 (only when creating model, when module number is greater than 1, it needs to be set according to the actual acquisition module number)
  • Certificate authentication:The default is consistent with the legend
  • Personal settings:After clicking on the name in the lower left corner, the menu My will appear
    • Open MQTT connection information
      • Password:MQTT connection password
      • Organization:Organization code

4. Create template

Click Create Template, and in Topic Publish, 5 Topics are automatically generated, and in Topic Subscription, 1 Topic is automatically generated.

5. Topic publish config

5.1 Topic:m3c/dau/evt/boot

  • Device is ready (connect to MQTT successful)
  • Device register to the platform + device online notify
  • Parameters (fixed parameters)
    • dn:%2 (%2 refers to the SN of the HMI)
    • mk: model number (model number selected in miot basic settings)
    • un: module number, usually 0
    • mach_no: device number ( The number of the actual device. If it is not empty, the platform will automatically generate the device!!

Note:Since %C is used in the message, there must be content in the parameter list.Otherwise, during operation, the reported data will have format errors, resulting in errors.

5.2 Topic:m3c/dau/evt/mach

  • Environment parameter data submit
    • Data change sensitive settings as environment parameters
    • The settings for the instructions that need to be sent are environment parameters
  • Send when data changes (only send changed data)
  • parameter
    • dn:%2 (%2 refers to the SN of the HMI)
    • mach_sts:Fixed parameter, must exist.Indicates the operating status of the device
    • Parameter list contents

set_t and mach_sts are environment parameters that are sent when they are changed. When the parameters are changed, only the changed parameters are submitted

5.3 Topic:m3c/dau/evt/sync

  • Run parameter data submit
    • Monitoring data of device during running
    • For data that is not sensitive to timeliness (production, running time, etc.)
  • Periodic sending
    • Recommended 6000 * 100ms = 10 minutes
    • Send all data (do not check Send only changed data)
  • parameter
    • dn:%2 (%2 refers to the SN of the HMI)
    • Parameter list contents

5.4 Topic:m3c/dau/evt/errs

  • Fault occurs, device alarm
  • Send when data changes (only send changed data)
  • parameter
    • dn:%2 (%2 refers to the SN of the HMI)
    • parameter list
      • Parameter name convention: err + 1 starts with a number
      • Bit Data
      • Meaning of error written in description
      • 0 means normal
      • 1 means fault

5.5 Topic:m3c/dau/ack/conf

  • Confirmation return message of sending parameters (return to tell the platform that the message has been received successfully)
  • Address Trigger Send
    • OFF -> ON (auto reset)
      • When the data changes from 0 to 1, the data is sent, and after sending, the data changes back to 0
    • Address bit:In topic subscription, it is used to store the address bit of req
  • Parameters (3 fixed)
    • dn:%2 (%2 refers to the SN of the HMI)
    • rid: parameter of the same name received in topic subscription (content sent by the platform is returned to the platform)
      • Same name
      • Same address bits
      • Same data type
    • cmd: the parameter with the same name received in the topic subscription (the content sent by the platform is returned to the platform)
      • Same name
      • Same address bits
      • Same data type

6. Topic subscription config

6.1 Subscribe to topic:m3c/das/cmd/conf/dau:%2

  • Subscribe to the message content and specify the format of the received data
  • Subscribe to data, and data distribution is initiated on the platform
  • Receive parameters (3 fixed parameters + N environment parameters)
    • rid: the ID of the task being sent (needs to be returned to the original value in ack)
      • Used in ack return
    • cmd: the type of task being sent (needs to be returned in ack with the original value)
      • Used in ack return
    • req: fixed value 1
      • The storage type is bit, the default is 0
      • The platform sends a fixed value of 1. After the content is overwritten, OFF -> ON(0 -> 1), triggering the submission of ack. After the data is submitted, it resets to 0
      • As the trigger condition of ack
    • Environment parameters: The single content of the parameter with the same name is written and overwritten. The content of the environment parameters not send by the platform will not be written and overwritten.

7. Sync to the cloud

  • After clicking the 'Cloud Sync' button, select 'Synchronize to MIOT', and the corresponding model data will be directly synchronized to the cloud.
  • Sync to Cloud Error Analysis
    • The device does not exist in the model
      • Inspection items (general)
        • mach_sts must be present in the environment parameters of module 0
        • Parameters are not allowed to end with __diff
        • System reserved words:iot_sts, ts, dn, req, rid, root, time, timestamp
        • Parameters can only be environment parameters or run parameters.(the two are mutually exclusive)
        • Only environment parameters can be sent
    • The model has online device
    • Check item
      • The above general checks
      • The same parameter does not allow type changes (number ←→ text)
        • During development
          • Delete all devices under this model
          • Sync to the cloud again, force overwrite
        • Officially running (need to keep the current device data)
          • Add new parameters (e.g.:original parameters + _01)
          • Synchronize again
            • The original parameter data is retained and no longer reported.
            • New parameters are reported normally

8. Sample Download

Click to download sample (DTools4.2)