cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Manufacturing Apps without KepserverEX

SOLVED
Highlighted
Level 9

Manufacturing Apps without KepserverEX

Hi,

I have been doing some research to find out how to connect "'things" to Manufacturing apps when not using KepServer.

We have a project coming up that will require an Arduino with some sensors to connect to Manufacturing apps.

I assumed, that as the modbus works so well with the RaspberryPI (Sensehat Example) that the same could be done with the Arduino. I cant find a way to do it.

Ideally I would like to connect to Kepserver and then to TWX. If you have some suggestions I would appreciate that. 
If that's not possible how easy is it to take my Arduino things communicating via REST and use those in MFG Apps?

Regards,

Bryan

 

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Manufacturing Apps without KepserverEX

Hi Bryan,

 

There's a couple different ways to get the Arduino working like the Sigma Tile does.  If it has enough power (it would surprise me if it didn't) and the Arduino can run Python, you can SSH into the sigma tile and pull the script directly off of it.  It's pretty well commented, and you can understand exactly what lines of code you need to change to change the sensors it reads from.  There'll be some extra functionality in there, but might not entirely be necessary.  You can also find the code here on github: https://github.com/ptcinc/mfg-tile

If you don't want to rip out old bits of code, the script runs off of pymodbus, and you could potentially use the sigma tile script as a guide to write your own.

 

If you don't want to go through the process of using python, there's a number of modbus libraries written in C that you can use.

 

Thanks,

 

Milan

6 REPLIES

Re: Manufacturing Apps without KepserverEX

Greetings Bryan,

 

To connect Arduino with modbus , the information required on kepware side is the ip address which modbus driver expects for the connection.

 

The second approach would be to connect Thingworx to either JAVA SDK or EMS ( which can be setup on Arduino ).

This will help in binding the Arduino thing with the remote thing and once the binding is done , you can push the data from the sensors to Thingworx which can be used in Mfg Apps.

 

Thanks,

Himesh Rajpal

Re: Manufacturing Apps without KepserverEX

Hi,

I'm aware if what kepware needs, I am looking for some sample code to get an Arduino working like the SigmaTile does with Modbus.

I am investigating it with MQTT at the moment.

Regards,

Bryan

Re: Manufacturing Apps without KepserverEX

Hi Bryan,

 

There's a couple different ways to get the Arduino working like the Sigma Tile does.  If it has enough power (it would surprise me if it didn't) and the Arduino can run Python, you can SSH into the sigma tile and pull the script directly off of it.  It's pretty well commented, and you can understand exactly what lines of code you need to change to change the sensors it reads from.  There'll be some extra functionality in there, but might not entirely be necessary.  You can also find the code here on github: https://github.com/ptcinc/mfg-tile

If you don't want to rip out old bits of code, the script runs off of pymodbus, and you could potentially use the sigma tile script as a guide to write your own.

 

If you don't want to go through the process of using python, there's a number of modbus libraries written in C that you can use.

 

Thanks,

 

Milan

Re: Manufacturing Apps without KepserverEX

Hi Milan,

Thanks for your reply, I found it quite informative and it pointed me in some new directions, I suppose the biggest issue with hardware is that there are some many ways to connect there is never going to be a one size fits all. Its easy enough for programmers / coders to poke through some libraries and magic some code to get it working, but unfortunately for us mere mortals we need to find other ways to make this happen. I eventually via google and trial and error managed to get it to send data via MQTT to KepServer. I think that for now this will work quite well. 

Hopefully at some stage the coin will drop and I will be able to create magic aswell.

Regards

Bryan

Re: Manufacturing Apps without KepserverEX

Hi @BryanK,

 

Hope you are doing good.

In regard to this post, if the previous response provided you with the guidance you were looking for, please mark it as the Accepted Solution, for the benefit of others who may have the same question.

Regards,
Himanshu

Re: Manufacturing Apps without KepserverEX

Hi,

I don't know if its a solution but i can say that its a very good suggestion. Which in the end helped me find a solution. I do have a suggestion however. if this is the incorrect place please delete. It would be great if PTC or the community could put out an introduction course covering the following. 

1. Connecting an Arduino to ThingWorx using 3 different methods. say MQTT, Rest and Modbus. (only needs to be on or 2 sensors)

2. The course should give information like what to buy.( part numbers / photos / kits, maybe even sell the kit)

3. Its very similar to the sigma tile scenario but I feel that it would expand the solution a lot more. 

 

Anyway thanks for the help.

 

Regards,

Bryan