How-To Guides
Analytics Guides
Use the Conversion Function
14min
you can use the conversion processor to convert commonly used units you have the following base conversion options timestamp > local time timestamp > utc celsius > fahrenheit fahrenheit > celsius degree > radian radian > degree degree > gon gon > degree radian > gon gon > radian user scenarios review the following scenarios for converting several tag values for these scenarios, you will simulate data coming from a plc and make the following conversions user scenario 1 you have multiple manufacturing sites across several time zones for monitoring and analysis purposes, you'd like to synchronize your data based on time measurements for all sites you will then complete the following conversion timestamp > utc use scenario 2 some of your manufacturing equipment uses fahrenheit for temperature control, while other equipment uses celsius this requires you to standardize the temperature measurements of all equipment for consistent and efficient process control you will then complete the following conversion fahrenheit > celsius use scenario 3 your manufacturing site has cnc machines, which use toolpaths defined in degrees however, some trigonometric calculations and algorithms used in cnc programming require angular measurements to be in radians you will then complete the following conversion degree > radian step 1 add a device follow the steps to connect a device docid\ nm1lqfefya dsiffitity and configure the following parameters device type simulator driver name generator enable alias topics select the checkbox step 2 add tags after connecting the device, add the following tags see add tags docid\ h5heqicxrcy3nch9kbg9i to learn more each tag will represent one of the user scenario mentioned above tag 1 (user scenario 1) name select s random value generator value type select int64 polling interval enter 5 tag name enter timestamp min value enter 50 max value enter 50 tag 2 (user scenario 2) name select s random value generator value type select int64 polling interval enter 5 tag name enter temperature min value enter 75 max value enter 75 tag 3 (user scenario 3) name select s random value generator value type select int64 polling interval enter 5 tag name enter angle min value enter 65 max value enter 65 step 3 create analytics flows you can now create the analytics flows using data from the device and tags you previously created to create the analytics flow navigate to analytics on the analytics canvas, click add processor the create a processor dialog displays select datahub subscribe in the topic field, click the search icon, select the device you previously created, and then select the alias topic for the timestamp tag click save click add processor again and select conversion in the conversion field, select timestamp to utc , and click save connect the two processors, select events , and enter a definition of timestamp for the connection repeat steps 2 8 for the temperature tag and configure the following in the datahub subscribe processor, select the alias topic for the temperature tag in the conversion processor, select a conversion of celsius > fahrenheit when you connect the two processors, select events and enter a definition of temperature for the connection repeat steps 2 8 for the angle tag and configure the following in the datahub subscribe processor, select the alias topic for the angle tag in the conversion processor, select a conversion of degree > radian when you connect the two processors, select events and enter a definition of angle for the connection on the analytics canvas, click save the configured analytics flows should look like the following step 4 view conversion data you can view data on the analytics canvas by clicking the view icon in each conversion processor conversion data for timestamp tag11 a value for the time the data was generated in utc is included in the payload conversion data for temperature tag the temperature value of 75 celsius is converted to 167 fahrenheit conversion data for angle tag the value of 65 degrees is converted to 1 1344640137963142 radian