ModSlaveSim help v3.04 - 4.1. Introduction to programming simulations

Download manual: HTML

4.1. Introduction to programming simulations

In ModSlaveSim statements are used to calculate the values of registers . They calculate values for their respective registers on every cycle - i.e. at the period you enter for the Run Interval (section Edit Run Interval). A set of these statements can be used to program ModSlaveSim to simulate a Modbus device and its environment as it changes over time.

The Programming Simulations section is intended to illustrate how ModSlaveSim can be programmed to produce a simulation to test a master. It contains complete programs for simulations, and program templates for techniques to be used in a simulation. These programs are listed in tables in each example simulation section. The Programming Simulations section starts with a quick guide to the language to aid understanding of the examples.

Each example simulation section contains the name of the file to load in order to run the simulation, along with simple things to notice and try out.

The Techniques section is provided primarily as reference material - if you know the type of technique to use, you can use the techniques section to see how to implement it in ModSlaveSim.

For your own simulations, remember you can enter a statement when you add a new slave register, (section Add Register), or you can add the statement later (Edit Register Statement ).