diff --git a/Modbus-CAPL/include/CAPL/MakeConfig.can b/Modbus-CAPL/include/CAPL/MakeConfig.can index 362402f..8d0459b 100644 --- a/Modbus-CAPL/include/CAPL/MakeConfig.can +++ b/Modbus-CAPL/include/CAPL/MakeConfig.can @@ -20,7 +20,7 @@ variables file f; // The file we are writing to struct device gIpsSorted[long]; // The final array with the devices - dword gScanCurr, gScanLast; // The first and last IP address as dword + dword gScanCurr, gScanLast; // The first and last IP address as dword word ADi, ADn, ADl; // Some variables for AnalyzeDevices() (event driven, so global) byte ggMaxTransmissionCount; // temp var for gMaxTransmissionCount diff --git a/README.md b/README.md new file mode 100644 index 0000000..7d0786b --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# Modbus-TCP in Vector CANoe +In my Bachelor thesis I integrated the [Modbus-TCP](http://www.anybus.de/technologie/modbustcp.shtml) protocol into [Vector CANoe](http://vector.com/vi_canoe_de.html). + +Further information can be found in my Thesis. + +# Usage + +## Make Config +The `Modbus-CAPL/MakeConfig.cfg` configuration scans the network for Modbus nodes and reads their properties. Afterwards config files for CANoe are written. + +You can configure the scan as well as the results in `Modbus-CAPL/include/CAPL/MakeConfig.can`. + +## ModbusNet +The `Modbus-CAPL/ModbusNet.cfg` configuration cyclically polls the Modbus nodes and maps their states (analog/digital IO, serial busses,...) onto system variables in CANoe. It also sends changes in the sysvars to the Modbus nodes. + +The implemented Modbus protocol layer can use TCP or UDP. + +## Device Information + +Modbus-TCP is only a de-facto standard. Thus, the manufacturers of the Modbus nodes are free to implement additional features or to remove "normal" features. It is also common, that the memory addresses for IO vary from manufacturer to manufacturer. + +Because of this it is neccessary to configure the supported devices which is done in `Modbus-CAPL\include\CAPL\include\DeviceInformation.cin`. Currently, *Wago 750-881* and *B&R X20BC0087* are supported. Being optimistic that each vendor uses the same addresses for all of its models, only a distinction by vendors is currently implemented, but it can be easily adjusted to also distinguish by models. Additionally, the plugged in modules have to be mapped onto the number of digital and analog IO channels. + +# Todo + + * Instead of using the CANoe 8.5 TCP and UDP sockets, it may be more straight-forward to use the CANoe 9 `on ethernetPacket` event. diff --git a/Thesis.pdf b/Thesis.pdf new file mode 100644 index 0000000..553f174 Binary files /dev/null and b/Thesis.pdf differ