Browse files

merged quickstart and design docs and removed empty sections of docs

  • Loading branch information...
1 parent e71ccf7 commit a96782d882d400c092045b7f786bd75aaf9a94cb @djpwilk committed Feb 2, 2012
View
1 doc/overview/.linked_dirs/map
@@ -1 +0,0 @@
-sc_modbus_tcp.git\doc/overview
View
8 doc/overview/01_overview.rst
@@ -1,8 +0,0 @@
-Introduction
-============
-
-This document is the specification for the Modbus TCP Server library using XMOS.
-
-Below is a data flow diagram. The TCP interface recieves requests from Modbus clients and passes them to the Modbus library. The library checks received data and requests memory interface for the request. This data is then put in a response packet (to which the application has access) and returned back to client by the TCP interface.
-
-.. figure:: images/modbus_data_flow.png
View
100 doc/overview/02_design.rst
@@ -1,100 +0,0 @@
-Design
-======
-
-Modbus TCP library consists of 3 main components:
-
-* The TCP/IP interface
-* Modbus frame processing and
-* Data interface
-
-The TCP/IP interface is an optional thread based service which uses the TCP module. This can be a part of the user application.
-
-Modbus frame processing unit checks if the incoming frame is valid and builds appropriate responses to send back to the client.
-
-Data interface is closely related to the application specific requirements. User must define the types of data that can be read/written to.
-
-API
----
-
-** modbus_tcp_get_status **
-
-Return type: char modbus_tcp_status - returns status of Modbus TCP frame processing.
-
-+-----------------------------------------------+
-| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
-+-----------------------------------------------+
-| Res | Res | Res | Res | Res | Res |VALID| MB |
-+-----------------------------------------------+
-
-Param: -
-
-Description:
-
-Here is the bit field information about the status.
-
-Bit 0: A 'zero' at this position indicates that the TCP data received is not a Modbus frame and hence cannot be processed further. A 'one' indicates a valid Modbus frame.
-
-Bit 1: A 'zero' indicates that the frame has error in Modbus request. A 'one' indicates a valid Modbus frame. The value at this bit field is valid only if a 'one' is read at Bit 0.
-
-Bit 2 - 7: Reserved.
-
-This function must be called from the user application space.
-
-** modbus_tcp_process_frame **
-
-Return type: int response_length - returns length of response frame.
-
-Param:
-
-* char *data[] - Pointer to the TCP data received.
-* int length - Length of data received.
-
-Description:
-
-The user must pass the address and length of data received from TCP layer. This function checks if the frame received is a valid Modbus TCP frame. It then calls the memory interface function and modifies the data with response information. It returns the response frame length of Modbus processing.
-
-** is_modbus_tcp_frame **
-
-Return type: boolean
-
-Param:
-
-* char *data[] - Pointer to the TCP data received.
-
-Description:
-
-Checks if 'protocol' field of the received TCP frame matches Modbus Protocol code (zero). Return 'true' for a match or 'false' for a mismatch. This is called internally in library. Status must be updated with the return value by this function.
-
-** is_valid_request **
-
-Return type: boolean
-
-Param:
-
-* char *data[] - Pointer to the TCP data received.
-
-Description:
-
-This is called internally in library. Status must be updated with the return value by this function. Checks if other fields of the received Modbus TCP frame are valid. It checks the Function code, address and data renges, etc... Return 'true' for a valid request or 'false' for an invalid request.
-
-** memory_access **
-
-Return type: boolean - success / failure
-
-Param:
-
-* int element_index - motor number.
-* int function_code - the type of access to be performed.
-* char *m_data[] - array where the memory functions would read from / write to, based on function requested.
-* int start_address - starting address.
-* int length - starting address + length = end address.
-
-Description:
-
-Memory access functions can be taken out of the library and suit the application needs. The function parameters have all the information required to access a particular memory type.
-
-Example
--------
-
-.. figure:: images/example_app.png
-
View
5 doc/overview/03_performance.rst
@@ -1,5 +0,0 @@
-Performance
-===========
-
-To be found
-
View
3 doc/overview/04_todo.rst
@@ -1,3 +0,0 @@
-TODO
-====
-
View
6 doc/overview/Makefile
@@ -1,6 +0,0 @@
-all : xmospdf
-
-SPHINX_PROJECT_NAME=Modbus TCP Server Using XMOS Specification
-VERSION=0.1
-XDOC_DIR =../../../../../xdoc
-include $(XDOC_DIR)/Makefile.inc
View
BIN doc/overview/images/example_app.png
Deleted file not rendered
View
BIN doc/overview/images/modbus_data_flow.png
Deleted file not rendered
View
10 doc/overview/index.rst
@@ -1,10 +0,0 @@
-Modbus TCP Server Using XMOS Specification
-==========================================
-
-.. toctree::
-
- 01_overview
- 02_design
- 03_performance
- 04_todo
-
View
77 doc/quickstart_guide/01_guide.rst
@@ -1,77 +0,0 @@
-Introduction
-============
-
-This document is a Quickstart guide to help install and run the Modbus TCP Server component on an XC-2 board.
-
-Requirements
-------------
-
-* Modbus TCP Server component. This can be downloaded from https://github.com/xcore/sc_modbus_tcp
-
-* An XC-2 Ethernet Kit - http://www.xmos.com/products/development-kits/xc-2-ethernet-kit
-
-* A Modbus Client emulator to run on your PC. There is one available from SimplyModbus @ http://simplymodbus.ca/TCPclient.htm. You can install the Version 7.0 on our Windows PC.
-
-Demo
-----
-
-* Fix the XTAG into XC-2 Board. Connect the USB cable between XTAG and PC.
-
-* Find an ehternet cable and connect one end to XC-2 board and the other end to your PC.
-
-* Power up the XC-2 board with the adapter provided in the kit.
-
-* Once you have downloaded the Modbus TCP Server component, open the 'app_modbus_tcp' in XDE. You can indicate a static IP or a Dynamic IP configuration in main.xc file. Build and Run the project on XC-2 board.
-
-* In this application you can read the status of LED B by read_coil command and SET / CLEAR LED B using write_coil command.
-
-* Function codes can be found at Modbus Specification and Implementation Guide (http://www.modbus.org/specs.php).
-
-* Open the SimplyModbus from Start -> Programs -> SimplyModbus and adjust to following settings:
-
- **mode = TCP**
- **IP Address = user ip address provided in main.xc**
- **Port = 502 (Modbus Listening Port)**
-
-* Alternatively, load the read_coil configuration file from $\app_modbus_tcp\simplymodbus_config\ and click CONNECT.
-
-.. figure:: images/1.png
- :align: center
-
- SimplyModbus Configuration
-
-* Send a command as 'Read Coil' (load read_coil config from $\app_modbus_tcp\simplymodbus_config\). This will read the status of LED B. The status can be seen as SET / CLEARED bits in results column. Please note that the status of one LED is copied to all other requested quantities.
-
-.. figure:: images/2.png
- :align: center
-
- Read Coil
-
-* You can write using the WRITE interface. This can be brought up by clicking the WRITE button in simplyModbus.
-
-.. figure:: images/3.png
- :align: center
-
- Write interface in SimplyModbus
-
-* Load the write_coil config in WRITE window. Sending the command will illuminate LED B.
-
-.. figure:: images/4.png
- :align: center
-
- After 'write', read back the status of LED B
-
-* User can change appropriate values of address and data based on his application.
-
-* Any unsupported Function code or data range will result in exception response.
-
-.. figure:: images/7.png
- :align: center
-
- Illegal Function Code exception response example
-
-.. figure:: images/8.png
- :align: center
-
- Illegal Data Value exception response example
-
View
6 doc/quickstart_guide/Makefile
@@ -1,6 +0,0 @@
-all : xmospdf
-
-SPHINX_PROJECT_NAME=Modbus TCP Server Quickstart Guide
-VERSION=0.1
-XDOC_DIR =../../../xdoc
-include $(XDOC_DIR)/Makefile.inc
View
BIN doc/quickstart_guide/images/1.png
Deleted file not rendered
View
BIN doc/quickstart_guide/images/2.png
Deleted file not rendered
View
BIN doc/quickstart_guide/images/3.png
Deleted file not rendered
View
BIN doc/quickstart_guide/images/4.png
Deleted file not rendered
View
BIN doc/quickstart_guide/images/5.png
Deleted file not rendered
View
BIN doc/quickstart_guide/images/6.png
Deleted file not rendered
View
BIN doc/quickstart_guide/images/7.png
Deleted file not rendered
View
BIN doc/quickstart_guide/images/8.png
Deleted file not rendered
View
8 doc/quickstart_guide/index.rst
@@ -1,8 +0,0 @@
-Modbus TCP Server Quickstart Guide
-==================================
-
-.. toctree::
-
- 01_guide
-
-

0 comments on commit a96782d

Please sign in to comment.