ModMultiSim help v3.04 - 3.3.1. Add Register

Download manual: HTML

3.3.1. Add Register

Add registers for a slave here. If ModMultiSim is serving the master or running the slave simulation (i.e. when Serve Masters or Run Slave Simulation is highlighted). you will have to disconnect and stop the simulation before you can add registers.

Slave id. Select the id number of the slave for which you want to define registers.

This panel allows you to enter details for a single register or a block of registers that share common features.

  • Quantity. The number of registers you want to define. The default is 1. If you enter a value greater than 1, you can define a block of registers. Each register in a block of registers has the same settings for Value, Name, Type, Radix, RW and Statement although some variation can be introduced to the Statement by virtue of the 'this slave register' variable, $$ (see below). Addresses in the block are numbered from the address that you enter.

  • Address. The address of the register. This is a "model address", and may be different from the address used in messages, depending on how the address mapping is configured (see Map Addresses).

  • Name. An optional name for the register. ModMultiSim displays the name, but does not use it in any other way. It is purely for your benefit, to remind you of what the register is used for.

  • Value. The initial value to be stored at this address.

  • Type. The type and size of the value to be stored at this address: type can be unsigned integer, signed integer, or floating-point and size can be 1-bit (Discrete Input/Coil), 16 or 32-bit integers, and 32 or 64-bit floats.

  • Radix. The radix to be used to display the register value. This is only used for unsigned integer values. It is disabled for 1-bit Discrete Inputs or Coils, signed ints and floating-point values, which are always displayed in decimal notation.

  • RW. ModMultiSim will allow a master to write to this address if this option is checked (reads are always allowed).

  • Statement. The statement entered in the statement field is used by ModMultiSim to calculate the value of a register and is an optional field. Note that when entering a Statement for a block of registers, it can be made specific to each register in the block by the use of 'this register' notation, $$, instead of a specific identifier such as $45. A quick guide to the language to use to enter a statement is provided in Language: Quick Start Guide followed by simulation examples. (It is described in detail in the section ModMultiSim Language.)

When you have entered or selected values for the above items, click the Add button to add the register(s). You may edit a register's settings later if necessary in the main window display.