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

Using your Raspberry Pi with the Edge Microserver and Modbus

Highlighted
Do1
Contributor

Using your Raspberry Pi with the Edge Microserver and Modbus

If you plan on using your Raspberry Pi with the Edge Microserver to connect to a PLC with the Modbus protocol, then you need to follow the instructions here: https://community.thingworx.com/community/developers/blog/2015/12/13/modbus-plc-simulator

But in addition to that also consider that:

1. The modbusExample.lua tries to load file transfer functionality.

2. There is something wrong with the supplied core.so file (maybe it was not compiled for ARM architecture) - you get No such file or directory

[ERROR] when running the luaResource.

To fix the 1st issue is easy... just remove the require "thingworx.shapes.filetransfer" line from modbusExample.lua.

To fix the second issue you need to find a core.so file which is compatible with the ARM Architecture of your Raspberry Pi.  In theory, the core.os file supplied as part of the TWEMS MODBUS Package_Linux_ARM.zip file located at microserver/etc/community/clibs/socket/core.so should work, but it does not.

Download the lua-socket resource:

$ sudo apt-get install lua-socket

Copy the new core.so to your microserver installation:

$ cp /usr/lib/arm-linux-gnueabihf/lua/5.1/socket/core.so /home/pi/microserver/etc/community/clibs/socket/

This should yield success.