Adding a Device on the Modbus Serial IOScanner. Schneider Electric Modicon M258
Reklam
Reklam
Serial Line Configuration
Adding a Device on the Modbus Serial IOScanner
Introduction
This section describes how to add a device on the Modbus IOScanner.
Adding a Device on the Modbus IOScanner
To add a device on the Modbus IOScanner, select the Generic Modbus Slave in the Hardware
Catalog, drag it to the Devices tree, and drop it on the Modbus_IOScanner node of the Devices tree.
For more information on adding a device to your project, refer to:
• Using the Drag-and-drop Method
• Using the Contextual Menu or Plus Button
NOTE: The variable for the exchange is automatically created in the %IWx and %QWx of the Modbus
Serial Master I/O Mapping tab.
Configuring a Device Added on the Modbus IOScanner
To configure the device added on the Modbus IOScanner, proceed as follows:
Step
1
Action
In the Devices tree, double-click Generic Modbus Slave.
Result: The configuration window is displayed.
224
2
3
Enter a Slave Address value for your device (choose a value from 1 to 247).
Choose a value for the Response Timeout (in ms).
To configure the Modbus Channels, proceed as follows:
EIO0000004135 09/2020
Step
1
Action
Click the Modbus Slave Channel tab:
Serial Line Configuration
2 Click the Add Channel button:
EIO0000004135 09/2020
225
Serial Line Configuration
Step
3
4
Action
Configure an exchange:
In the field Channel, you can add the following values:
Channel: Enter a name for your channel.
Access Type: Choose the exchange type: Read or Write or Read/Write multiple requests
Trigger: Choose the trigger of the exchange. It can be CYCLIC with the period defined in Cycle Time
(ms) field, started by a RISING EDGE on a boolean variable (this boolean variable is then created in the Modbus Master I/O Mapping tab), or by the Application.
Comment: Add a comment about this channel.
In the field READ Register (if your channel is Read or Read/Write one), you can configure the %MW to be read on the Modbus slave. Those are mapped on %IW (see Modbus Master I/O Mapping tab):
Offset: Offset of the %MW to read. 0 means that the first object that is read is %MW0 .
Length: Number of %MW to be read. For example, if 'Offset' = 2 and 'Length' = 3, the channel reads
%MW2, %MW3 and %MW4 .
Error Handling: choose the behavior of the related %IW in case of loss of communication.
In the field WRITE Register (if your channel is Write or Read/Write one), you can configure the %MW to be written to the Modbus slave. Those are mapped on %QW (see Modbus Master I/O Mapping tab):
Offset: Offset of the %MW to write. 0 means that the first object that is written is %MW0 .
Length: Number of %MW to be written. For example, if 'Offset' = 2 and 'Length' = 3, the channel writes
%MW2, %MW3 and %MW4 .
Click OK to validate the configuration of this channel.
NOTE: You can also:
Click the Delete button to remove a channel.
Click the Edit button to change the parameters of a channel.
226
EIO0000004135 09/2020
Step
1
To configure your Modbus Initialization Value, proceed as follows:
Action
Click the Modbus Slave Init tab:
Serial Line Configuration
2 Click New to create a new initialization value:
3
The Initialization Value window contains the following parameters:
Access Type: Enter the exchange type: Write requests
Register Offset: Register number of register to be initialized.
Length: Number of %MW to be read. For example, if 'Offset' = 2 and 'Length' = 3, the channel reads
%MW2, %MW3 and %MW4 .
Initialization Value: Value the registers are initialized with.
Comment: Add a comment about this channel.
Click OK to create a new Initialization Value.
NOTE: You can also:
Click Move up or Move down to change the position of a value in the list.
Click Delete to remove a value in the list.
Click Edit to change the parameters of a value.
EIO0000004135 09/2020
227
Serial Line Configuration
Step
1
To configure your Modbus Master I/O Mapping, proceed as follows:
Action
Click the Modbus Master I/O Mapping tab:
2
3
Double-click in a cell of the Variable column to open a text field.
Enter the name of a variable or click the browse button [...] and chose a variable with the Input Assistant.
For more information on I/O mapping, refer to EcoStruxure Machine Expert Programming Guide.
Access Types
This table describes the different access types available:
Function
Read Coils
Read Discrete Inputs
Read Holding Registers (default setting for the channel configuration)
Read Input Registers
Write Single Coil
4
5
2
3
Function Code
1
Availability
ModbusChannel
ModbusChannel
ModbusChannel
Write Single Register
Write Multiple Coils
6
15
Write Multiple Registers (default setting for the slave initialization)
16
Read/Write Multiple Registers 23
ModbusChannel
ModbusChannel
Initialization Value
ModbusChannel
Initialization Value
ModbusChannel
Initialization Value
ModbusChannel
Initialization Value
ModbusChannel
228
EIO0000004135 09/2020
İndir
Reklam