Home / FactoryTalk Optix / Optix for Edge
Description
Getting to know how to store your IoT sensor data from MQTT source into a SQL database with FactoryTalk Optix.
The .NET C# library from HiveMQ has been used here to create a custom application with runtime NetLogic.
Contributed by Xavier Florensa – YouTube – LinkedIn – GitHub
Transcript
(00:01) hi everybody in this video I will show you how to transmit data from a iot application through mqtt and store in a database in Factory talk Optics so let’s see the demonstration let’s here we have our mobile phone with this iot application with two variables when to record in SQL here we have the database that G and two um Trends as soon as I change the value with the slider on this Vol we can see how it change we can also change the other value and see it’s value here this is quite fast from my mobile phone
(01:08) and this is the evolution of the two variables so let’s see how this is done we have here [Music] the application this is based on a demo prepared by rogell automation on its Factory Optics repository done by luati and where uh you are simulating the data source uh with a random code and I have just used this code and I have substitute the random part we can see here on the code have substitute the random part of
(02:14) the database with uh real mqtt and [Music] input if you want to use the mqt library I was I have applied the library by hmq you have to load this on your code you have you have to learn how to do this in another video I did in the past to talking about an mqtt client with a mq library Inn net and in um C Factory talk Optics you can do it uh you can find the link to the video on the description and you also have how to use this library with a quick start from the
(03:18) hi mq uh GitHub web page and you can also download this code on the link on the comments and well this how we this done let’s see if it’s still working because this demo the mobile phone is limited and this is the once again yes I have it [Music] here different values and have recorded all the [Music] evolution and this is all thank you very much I hope you enjoy it
Tutorial List
- Optix as a Headless Data Gateway
- Using the NetLogic VariableSynchronizer
- Configuring OPC UA Server in FT Optix
- Configuring OPC UA Client in FT Optix
- Extending View SE with FactoryTalk Linx OPC UA Connector
- MQTT Embedded Broker
- MQTT Client Publisher and Subscriber
- Optix with Multiple MQTT Subscriptions
- MQTT to SQL with FT Optix
- FT Optix Datalogger to MQTT
