TOP Contributors

  1. MIKROE (2779 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139563 times)
  2. FAT32 Library (72041 times)
  3. Network Ethernet Library (57254 times)
  4. USB Device Library (47615 times)
  5. Network WiFi Library (43219 times)
  6. FT800 Library (42559 times)
  7. GSM click (29930 times)
  8. mikroSDK (28292 times)
  9. PID Library (26930 times)
  10. microSD click (26309 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Example

Serial Modbus Master

Rating:

4

Author: Simon Platten

Last Updated: 2014-09-17

Package Version: 1.0.0.0

Example: 1.0.0.0

Category: Communication

Downloaded: 5177 times

Followed by: 1 user

License: MIT license  

This project demonstrates a Modbus Master implementation, it has been developed and tested for a P18F45K22 using an EasyPic v7 for testing and written in mikcroC.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Serial Modbus Master" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Serial Modbus Master" changes.

Do you want to report abuse regarding "Serial Modbus Master".

  • Information
  • Comments (3)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Example Blog

Modbus Slave Simulator Configuration

Modbus Slave Simulator Configuration

How to configure the Calta Computer Systems Limited modbus simulation tool as a slave project for use with this modbus master.

View full image
Modbus Slave Simulator responding to Master

Modbus Slave Simulator responding to Master

Screen show shows responses to Master implementation.

View full image

02/08/2012 Uploaded version 1.00.  In this demo the master has been set-up to request the following I/O from a single slave:

Discrete outputs (Coils) x 8 starting at 1
Discrete inputs (Status Inputs) x 8 starting at 1
Holding Registers (16 bit analogue registers) x 2 starting at 1
Input Registers (16 bit analogue input registers) x 1 starting at 1

Supported functions:
01 Read coils
02 Read status inputs
03 Read holding registers
04 Read input registers
05 Force single coil
06 Preset single register
15 Force multiple coils
16 Preset multiple registers

To simulate the write operations, PORT D has been configured as input with buttons 1 to 4 performing the following:

Button 1, writes to a single coil to address 1 (Function 05)
Button 2, writes to 7 coils, starting at address 1 (Function 15), the value written is b111101
Button 3, writes to a single holding register to address 1 (Function 06), value 0xcaca
Button 4, writes to 2 holding registers, starting at address 1 (Function 16), values 0x04d2 and 0x162e.

Summary of usage:
RAM used 1480 bytes 97.7%
ROM used 7454 bytes 22.7%

For Modbus Slave embedded implementation:

http://www.libstock.com/projects/view/355/modbus-slave

ALSO FROM THIS AUTHOR

WiFi HTTP Demo Example v2.3

5

This is a variation on the MikroElektronika WiFi HTTP Demo project. I posted only because 'dejan.odabasic' of the mikroElektronika team suggested sharing it.

[Learn More]

Generic Linked List

0

This small project demonstrates how to use my generic linked list structure. Included in this project is a very small LED scanner, each LED is a node in the linked list.

[Learn More]

Modbus Common Gateway Interface (CGI)

2

This is a modbus CGI which can be used with any Windows web-server. I used Apache 2.2 to develop and test this. It allows you to send requests to a modbus network using HTTP get requests.

[Learn More]