Simulation Define (simu_network.def)

The operations of SimuPlatform can be set in the simu_network.def file. This file should be put in the same folder as the SimuPlatform.rtdll file.

All the names and value of settings in the simu_network.def file are case insensitive.

All settings are set in the format: name = value

Section Separators

Settings can be defined under one of the following sections, or at the beginning of the file.

Name

Description

Valid Values

[Master x]

The info of master x.

x:0-1

[Axis x]

The info of axis x.

x:0-127

[Master x]:

When configuring more than one master, use the [Master x] section (where x is the master number) to separate the parameter settings to apply to each master.

If there is only one master, there is no need to designate any master sections, as the defined parameter settings will apply to the one master.

All parameters under the [Master x] section and before the next master section will apply only to master x. All parameters at the beginning of the file before any master sections will apply to all masters (unless the master overwrites that parameter inside its own section).

To use multiple masters, the NumOfMaster and NumOfInterrupt parameters in the Module.ini file must be configured appropriately. See Module.ini for additional information.

[Axis x]:

When the UserDef setting for a master is set to 1, use the [Axis x] section (where x is the axis number) to separate the parameter settings to apply to each axis.

If there is only one master and there are no master sections, the axis sections can be defined anywhere after the line UserDef = 1.

If there are multiple masters, the axis sections can be defined anywhere after the line UserDef = 1 within each master section. Each axis section will belong to the master section that contains it.

Axis numbers start from 0 for each master. For example, if there are two masters with two axes each, [Axis 0] and [Axis 1] sections should be defined inside both master sections.

Master Settings

The following table contains the settings that apply to the master, and their valid values.

Name

Description

Valid Values

Default

CommCycle

Communication period.

8000: 8ms 4000: 4ms 3000: 3ms 2000: 2ms 1000: 1ms 500: 500us 250: 250us 125: 125us

1000

NumOfAxes

Number of axes will be assigned.

0-128

N/A

StartAxis

The start axis index.

0-127

N/A

PrintLog

Print setting and statistics log after communication is stopped.

0: Off 1: On

0

MessageLevel

Specify the level that determines which messages will be printed to RTXServerConsole. This setting will override the one set in Modules.ini.

0: Error Level. Only error message. 1: Warning Level. Error message and warning message. 2: Setting Level. Error message, warning message, and setting message. 3: Debug Level. Error message, warning message, setting message, and debug message.

0

UserDef

Define the network information.

0:Off 1:On

0

CommCycle:

Set the communication period of SimuPlatform in units of us.

Example:
   CommCycle = 250

NumOfAxes:

Specify the number of axes will be assigned to this SimuPlatform. If not specified, all the usable axes will be assigned to this SimuPlatform.

Example:
    NumOfAxes = 16

StartAxis:

Specify the start axis index of SimuPlatform when assign axes automatically. If not specified, axes will be assigned from the first usable axis.

Example:
    StartAxis = 4

PrintLog:

Print the SimuPlatform setting and statistics log to console after communication is stopped.

Example:
    PrintLog = 1

MessageLevel:

Set the message level that will determine which messages will be printed to RTXServerConsole. This setting will override the one set in Modules.ini.

  • 0: Error level. Only error message.

  • 1: Warning level. Error message and warning message.

  • 2: Setting Level. Error message, warning message, and setting message.

  • 3: Debug level. Error message, warning message, setting message, and debug message.

Example:
    MessageLevel = 1

UserDef:

Define one or more axes as virtual axes and specify their information. The specified axis information is valid only when UserDef is set to 1. If UserDef is not set or is set to 0, SimuPlatform will set all unassigned axes as virtual axes. To avoid setting all axes to virtual axes when using two or more platforms, define SimuPlatform last in the Modules.ini file (see Enabling SimuPlatform).

Axis Settings

The following table contains the settings that apply to an axis, and their valid values. To activate these settings, set UserDef to 1.

When defining a virtual axis using the [Axis x] section, the right side of the Index key specifies the axis index that the virtual axis is reserved for, whereas the x in [Axis x] as a section name is unrelated to the axis index.

IO data can be used as the source of the Position/Velocity/Torque/ServoOnState/AlarmCode/AlarmState/HomeSwitchState/PositiveLimitSwitchState/NegativeLimitSwitchState feedback for virtual axes.

And it can also copy Position/Velocity/Torque/ClearAlarm command for virtual axes to IO data.

Name

Description

Valid Values

Default

Index

Specify the axis index for the axis.

0-127

N/A

PosFb

Specify the IO used as the position feedback of the axis.

IoType;IoAddr;IoSize

N/A

VelFb

Specify the IO used as the velocity feedback of the axis.

IoType;IoAddr;IoSize

N/A

TrqFb

Specify the IO used as the torque feedback of the axis.

IoType;IoAddr;IoSize

N/A

SrvOnFb

Specify the IO bit used as the servo on state feedback of the axis.

IoType;IoAddr;IoBit

N/A

AlmCode

Specify the IO used as the alarm code of the axis.

IoType;IoAddr;IoSize

N/A

AlmFb

Specify the IO bit used as the alarm state feedback of the axis.

IoType;IoAddr;IoBit

N/A

HSFb

Specify the IO bit used as the home switch state feedback of the axis.

IoType;IoAddr;IoBit

N/A

LSPFb

Specify the IO bit used as the positive limit switch state feedback of the axis.

IoType;IoAddr;IoBit

N/A

LSNFb

Specify the IO bit used as the negative limit switch state feedback of the axis.

IoType;IoAddr;IoBit

N/A

PosCmd

Specify the IO used as the position command of the axis.

IoType;IoAddr;IoSize

N/A

VelCmd

Specify the IO used as the velocity command of the axis.

IoType;IoAddr;IoSize

N/A

TrqCmd

Specify the IO used as the torque command of the axis.

IoType;IoAddr;IoSize

N/A

SrvOnCmd

Specify the IO bit used as the servo on command of axis.

IoType;IoAddr;IoBit

N/A

AlmCLR

Specify the IO bit used as the clear alarm command of axis.

IoType;IoAddr;IoBit

N/A

Copy destinations of the command and the Sources of feedback:

PosFb/VelFb/TrqFb/AlmCode/PosCmd/VelCmd/TrqCmd= IoType;IoAddr;IoSize

IoType: Specify the type of IO. 0: Input, 1: OutputIoAddr: Specify the IO address.IoSize: Specify the IO length.

SrvOnFb/AlmFb/HSFb/LSPFb/LSNFb/SrvOnCmd/AlmCLR = IoType;IoAddr;IoBit

IoType: Specify the type of IO. 0: Input, 1: OutputIoAddr: Specify the IO address.IoBit: Specify the IO bit.

If the copy destinations of command are not specified, no data is copied to the IO. In this case, virtual axis commands are not physically output to the outside world.

If the sources of thefeedback are not specified, the simulator module generates the feedback. That feedback is a direct copy of the command value. In this case, for the motion module that controls the virtual axis (e.g., CoreMotion.rtdll), the virtual axis behaves as an axis that tracks perfectly without deviation.

Example:
    UserDef = 1
    [Axis 0]
    Index = 3
    PosFb = 0;0;4
    VelFb = 0;4;4
    TrqFb = 0;8;4
    PosCmd = 1;12;4

    [Axis 1]
    Index = 6

In the above example, the 4 bytes from the 0th byte of the IO input are used as position feedback for Axis 0. In addition, the position command of Axis0 is copied for the 4 bytes from the 12th byte of the IO output.

Promisc:

When this setting is enabled, if there is an actual axis index equal to the axis index of this virtual axis, this virtual axis is not ignored by the presence of the actual axis index, allowing both to coexist.

When an actual axis and a virtual axis coexist, the destination and source of the directives set for the virtual axis have the following effects.

Copy destinations of the command: As with a regular virtual axis, the command is output to the IO of the copy destination. At the same time, the actual axis is controlled by that command..

Sources of the feedback: The PDO is preferred for servo feedback values, over sources of the feedback. If a Feedback PDO does not exist and a Feedback Source is set, the value obtained from the source of the feedback of the virtual axis is copied to the feedback of the servo.

If there is no actual axis index equal to the axis index of this virtual axis, the Promisc definition has no particular effect.

Note: This setting should normally not be made unless there is a special use or explicit purpose for it.

Example:
    UserDef = 1
    [Axis 0]
    Promisc = 1
    Index = 3
    LSPFb = 0;12;0
    [Axis 1]
    Index = 6

In the above example, bit 0 of the 12th byte of the IO input is used as the source for the position positive limit switch for axis 3.

If axis index 3 controlled by the servo exists and DigitalInput is not mapped to the servo’s PDO, then axis index 3 uses the IO input as the source for limit switch detection events and homing.