Skip to content

A modbus master implementation using Scala. Modbus is one of the protocols on which the sensors provide data

Notifications You must be signed in to change notification settings

InternityFoundation/scala-modbus-starter-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scala-modbus-starter-kit

A modbus master implementation using Scala. This repo contains an example as to how to make a Modbus Master that can read the data from slaves and prints it.

Steps for running this kit:

  1. If you have a Modbus Slave then goto Step 7

  2. Download ModbusPal : Modbus Slave Simulator from here

  3. Execute the Modbus Pal Jar using command.

    `java -jar ModbusPal.jar`
    
  4. It would look something like this .

modbuswindow

  1. Change the port to 5002 and make a modbus slave with id 1 just like in the screenshot below.

image

  1. Click on the eye icon and a new window will appear . These represents the value in the register. You can change it accrodingly to check your Modbus master implementation.

image

  1. Configure some environment variables. Here they are initialized with the default values feel free to change them. export MODBUS_HOST="localhost" export MODBUS_PORT=5002 export MODBUS_STARTING_REGISTER=0 export MODBUS_MEASUREMENTS=5 MODBUS_SLAVEID=1

  2. Run the app using this command.

    ./run.sh

You will be getting an output something like this :

image

I hope you enjoyed it ! Feel free to use it as per your needs .

If you have time , please visit Internity Foundation or our Blog

We are all in for a social cause so that we can bridge the gaps in our Education system.

Feel free to reach us out on twitter : @internity_learn

Maintainers: @shiv4nsh Shivansh

About

A modbus master implementation using Scala. Modbus is one of the protocols on which the sensors provide data

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published