Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Use the Edge MicroServer (EMS) to simulate an engine with vibration sensors.
The Edge MicroServer (EMS) facilitates connectivity from Edge devices to ThingWorx Foundation.
It’s often easier, though, to start development with simulated Edge values rather than hooking up sensors.
This guide will show you how to simulate vibration values of an engine using the EMS.
NOTE: The estimated time to complete all parts of this guide is 30 minutes.
MotorCo manufactures, sells, and services commercial motors.
Recently, MotorCo has been developing a new motor, and they already have a working prototype.
However, they’ve noticed that the motor has a chance to FAIL CATASTROPHICALLY if it’s not properly serviced to replace lost grease on a key moving part.
In order to prevent this type of failure in the field, MotorCo has decided to instrument their motors with sensors which record vibration.
The hope is that these sensors can detect certain vibrations which indicate required maintenance before a failure occurs.
In this guide, you’ll begin this monitoring process by using ThingWorx Foundation to monitor and record vibration data from the prototype motor. In particular, you will learn how to provision Thing Properties and Values from an EMS, as well as how to permanently store these values for analysis in an Info Table Property.
These types of modifications to an EMS can be extremely helpful for the automotive segment in particular. For instance, each car that comes off the factory line could have custom, auto-generated EMS scripting that would dynamically create Foundation information for each car in the fleet. This could be a massive time-savings versus manually generating Thing Properties directly within Foundation.
Because the motor is still in the process of being instrumented with sensors, you’ll get all the functionality in-place beforehand by constructing a motor simulator using the Edge MicroServer (EMS).
In the previous Use the Edge MicroServer (EMS) to Connect to ThingWorx guide, you installed the EMS on a Windows PC, configured it to talk to ThingWorx Foundation, and then created an EdgeThing on Foundation to complete the connectivity.
This guide assumes that you have already completed that Windows EMS guide and have an active EMS connection to the EdgeThing.
Perform the following steps to modify this connection to increase the task rate of the EMS, which we'll use in the following steps to update Properties more quickly.
The final code of config.lua should be the following
Note that the EMS may have slightly modified your config.lua file, such as adding a data_security_key line. Leave these EMS-generated modifications alone.
scripts.log_level = "WARN" scripts.script_resource_ssl = false scripts.script_resource_authenticate = false scripts.EdgeThing = { file = "thing.lua", template = "YourEdgeThingTemplate", scanRate = 1000, taskRate = 1000, sw_update_dir = "C:\\CDEMO_EMS\\updates" }
Click here to view Part 2 of this guide.