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:


    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 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 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 file located at microserver/etc/community/clibs/socket/ should work, but it does not.


    Download the lua-socket resource:

    $ sudo apt-get install lua-socket


    Copy the new to your microserver installation:

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


    This should yield success.