User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ......

30
ModBus Driver for iDaq User guide October 2016 Rev 01

Transcript of User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ......

Page 1: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

ModBus Driver for

iDaq

User guide

October 2016

Rev 01

Page 2: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

ModBus iDaq Component – User Guide

2

Page 3: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

TOOLS for SMART MINDS

3

Worldwide technical support and product information:

www.toolsforsmartminds.com

TOOLS for SMART MINDS Corporate headquarter

Via Padania, 16 Castel Mella 25030 Brescia (Italy)

Copyright © 2014 TOOLS for SMART MINDS. All rights reserved.

Page 4: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

ModBus iDaq Component – User Guide

4

SUMMARY Overview ............................................................................................................................................................................. 5

Introduction ........................................................................................................................................................................ 5

Requirements ..................................................................................................................................................................... 6

Minimum hardware requirements ............................................................................................................................. 6

Minimum software requirements .............................................................................................................................. 6

Installation .......................................................................................................................................................................... 7

Getting started with ModBus devices ................................................................................................................................ 9

Adding a ModBus device to the list of active devices ..................................................................................................... 9

TCP(Ethernet) communication ................................................................................................................................. 11

Serial communication ............................................................................................................................................... 11

ModBus capabilities ...................................................................................................................................................... 13

Advanced Settings ........................................................................................................................................................ 14

ModBus channel management ..................................................................................................................................... 16

Channel creation ....................................................................................................................................................... 18

Further details .................................................................................................................................................................. 30

Page 5: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

TOOLS for SMART MINDS

5

OVERVIEW iDaq supports installation of additional components to extend capabilities and features of

iDaq itself. With additional components, new types of acquisition devices, new signals

processing features, and other kinds of functionalities can be added to iDaq.

ModBus Driver is a component for iDaq that provide ModBus communication from any

standard Ethernet or serial port.

INTRODUCTION The ModBus protocol follows a master and slave architecture where a master transmits a

request to a slave and waits for the response. This architecture gives the master full control

over the flow of information, which has benefits on older multidrop serial networks.

ModBus manages the access of data simply and flexibly. Natively, ModBus supports two

data types: Boolean value and unsigned 16-bit integer; they correspond to coil and register

ModBus memory block, respectively.

ModBus for iDaq is a component for iDaq that reads and writes data with ModBus slave

devices connected through either an Ethernet or a serial connection.

ModBus component has the following features:

• Signals acquired from ModBus devices are managed by iDaq in the same way as

DAQ-mx devices.

• Read and write access.

• Driver supports both coil and register memory blocks.

• Ethernet and serial communication are supported.

• No special skills are required to acquire data from ModBus devices.

• Quick setup.

Page 6: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

ModBus iDaq Component – User Guide

6

REQUIREMENTS This section contains the list of requirements that users should know before using ModBus

component for iDaq.

M INIMUM HAR DW AR E R EQ UIR EMENT S

Ensure that your computer fulfills the following hardware requirements:

• Dual core CPU or higher.

• 2 GB RAM (4 GB is strongly recommended).

• Display resolution 1900x1080 or higher.

• Mouse or another pointing device.

• A ModBus slave device.

M INIMUM SO FTW ARE R EQ U IR EMENT S

Ensure that your computer fulfills the following software requirements:

• OS: Windows 7 or higher.

• National Instruments Drivers rel. 14.5 or higher. You can download a free copy of

DAQ-mx drivers at the following URL:

http://www.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/it/pg/1/sn/catnav:

du,n8:3478.41.181.5495,ssnav:ndr/

• iDaq 2016 Edition or higher. You can download an evaluation copy of iDaq at the

following URL:

http://www.idaq-datalogger.com

Page 7: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

TOOLS for SMART MINDS

7

INSTALLATION To install ModBus Driver for iDaq, run iDaq, open Device & Sensors tab and click on Install

button as indicated in figure below.

FIGURE 1 - INSTALLING A NEW COMPONENT FOR IDAQ

Browse your files in File Explorer and select the component file (ModBus_x.x.x.zip). Once

file is selected, iDaq will automatically install it. You can check if ModBus Driver for iDaq

component for iDaq is installed on your computer by opening the Device Option Dialog

from Device & Sensors tab. As shown in the following figures, if the installation process has

been successfully completed, ModBus, ModBusAnalogAcquisition,

ModBusDigitalAcquisition, ModBusAnalogGeneration, ModBusDigitalGeneration,

ModBusAnalogChannels, ModBusChannel, and ModBusDigitalChannel are listed among the

installed components. If the installation process has not been successfully completed, an

error will appear.

Page 8: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

ModBus iDaq Component – User Guide

8

FIGURE 2 - INSTALLING MODBUS DRIVER FOR IDAQ

Once installation is completed, you can start to use your ModBus devices with iDaq.

Page 9: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

TOOLS for SMART MINDS

9

GETTING STARTED WITH MODBUS DEVICES This section explains how to add, configure and use a ModBus device with iDaq.

ADDING A MODBUS DEVICE TO THE LIST OF ACTIVE DEVICES To add a new ModBus Device to the list of active devices, open the Device & Sensors tab

from the iDaq main window and select Add button, as shown in figure below.

FIGURE 3 - ADDING A NEW MODBUS IN IDAQ

A new dialog window shows the icons of available devices you can use in iDaq to acquire

data. Please note that the list of device icons may be different from the image below,

according to the number of components are installed.

FIGURE 4 – DEVICE TYPE SELECTION WINDOW

Page 10: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

ModBus iDaq Component – User Guide

10

From this window, click on ModBus Device icon and press OK button. The following

window appears.

FIGURE 5 - MODBUS DEVICE EDITOR

ModBus Device Editor shows the list of all created devices[1]. For each device, the following

details are shown:

• Device name. This name must be unique because iDaq cannot manage two devices

with the same name.

• Type. It specifies the communication type: Ethernet(TCP) or Serial

• Resource. If current ModBus device uses an Ethernet connection, this field

corresponds to the IP address of the ModBus slave. Otherwise, if current ModBus

device uses a serial connection, this field corresponds to the COM name of the

ModBus slave (i.e. COM1, COM2, COM3).

• File Path of device file, typically stored into c:\iDaq\DeviceCFG\ModBus folder.

To add an existing device, highlight its row in device table and press OK button. It will be

added to the list of active devices and the last-used settings are loaded.

To add a new ModBus device, press Add Button [2]. The following dialog appears:

FIGURE 6 - CREATING A NEW MODBUS DEVICE

As reported by the previous figure, you should type the following information:

1. New device name. Please note that the device name is used as file name and a

subset of chars only is allowed (A..Z,a..z,0..9, space and '_')

2. Communication type. It can be TCP (Ethernet connection) or serial.

After this first selection, you will be prompted to edit communication details (view sections

TCP(Ethernet) communication and Serial communication).

Page 11: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

TOOLS for SMART MINDS

11

TCP(ET HERN ET) CO MMUNI CATION

The following figure shows the TCP Communication Editor:

FIGURE 7 – TCP COMMUNICATION EDITOR

The TCP Communication Window is composed of:

1. IP Address. It is the IP address of the ModBus slave.

2. Test button. If pressed, iDaq tries to establish a ModBus connection with the specified

IP address.

SERI AL COMMUNI CATIO N

The following figure shows the Serial Communication Editor:

FIGURE 8 – SERIAL COMMUNICATION EDITOR

Referring to the previous image, the TCP Communication Window is composed of:

1. COM. It specifies the resource you want to open.

2. Baud rate. It specifies the baud rate of the ModBus slave with which you want to

communicate. The ModBus slave can be a ModBus device you create or a third-party

ModBus device. If you want to communicate with a third-party ModBus slave, check

the documentation for the ModBus slave to find its baud rate. The default is 9,600.

3. Unit ID. It specifies the identification of the ModBus slave with which you want to

communicate. The ModBus slave can be a ModBus slave you create or a third-party

ModBus slave. If you want to communicate with a third-party ModBus slave, check the

documentation for the ModBus slave to find its unit ID.

4. Serial type. It specifies the type of data transmission through serial ports:

• RTU (default) uses the Remote Terminal Unit (RTU), which is a binary data

unit, to send data.

Page 12: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

ModBus iDaq Component – User Guide

12

• ASCII uses human-readable characters to send data.

5. Parity. It specifies the parity of the ModBus slave with which you want to

communicate. The ModBus slave can be a ModBus slave you create or a third-party

ModBus slave. If you want to communicate with a third-party ModBus slave, check the

documentation for the ModBus slave to find its parity.

• None specifies to use no parity bit. If you specify None for parity, the number

of stop bits indicating the end of a frame is 2.

• Odd specifies to use odd parity. If you specify Odd for parity, the number of

stop bits indicating the end of a frame is 1.5.

• Even specifies to use even parity. If you specify Even for parity, the number of

stop bits indicating the end of a frame is 1.5.

6. Flow control. It specifies the flow control of the ModBus slave with which you want to

communicate. The ModBus slave can be a ModBus slave you create or a third-party

ModBus slave. If you want to communicate with a third-party ModBus slave, check the

documentation for the ModBus slave to find its flow control.

• None does not use flow control. The transfer mechanism assumes buffers on

both sides of the connection to be large enough to hold all data transferred.

• XON/XOFF uses the XON and XOFF characters to perform flow control. When

the receiving buffer is almost full, the transfer mechanism controls the input

flow by sending XOFF. When the buffer receives XOFF, the transfer

mechanism controls the output flow by suspending transmission.

• RTS/CTS uses the RTS output signal and the CTS input signal to perform flow

control. When the receiving buffer is almost full, the transfer mechanism

controls the input flow by unasserting the RTS signal. When the buffer

unasserts the CTS signal, the transfer mechanism controls the output flow by

suspending the transmission.

• XON/XOFF and RTS/CTS uses the XON and XOFF characters, the RTS output

signal, and the CTS input signal to perform flow control. When the receiving

buffer is almost full, the transfer mechanism controls the input flow by

sending XOFF and unasserting the RTS signal. When the buffer receives XOFF,

the transfer mechanism controls the output flow by suspending transmission.

• DTR/DSR uses the DTR output signal and the DSR input signal to perform flow

control. When the receiving buffer is almost full, the transfer mechanism

controls the input flow by unasserting the DTR signal. When the buffer

unasserts the DSR signal, the transfer mechanism controls the output flow by

suspending the transmission.

XON/XOFF and DTR/DSR uses the XON and XOFF characters, the DTR output

signal, and the DSR input signal to perform flow control. When the receiving

buffer is almost full, the transfer mechanism controls the input flow by

sending XOFF and unasserting the DTR signal. When the buffer receives XOFF

and unasserts the DSR signal, the transfer mechanism controls the output flow

by suspending transmission.

3. Test button. If pressed, iDaq tries to establish a ModBus connection with the specified

connection setup.

Page 13: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

TOOLS for SMART MINDS

13

MODBUS CAPABILITIES As shown in the following figure, to edit settings of a ModBus device, open Device &

Sensors tab and click on the device icon, ModBus device editor will be displayed as

indicated in following figure.

FIGURE 9 – MODBUS DEVICE EDITOR

ModBus devices has several capabilities:

• Analog acquisition. It is used to create analog input channels starting from ModBus

register memory block.

• Digital acquisition. It is used to create digital input channels starting from either

register or coil ModBus memory block.

• VCC. It allows the definition of virtual channels calculated from analog real

channels.

• Analog generation. It is used to write ModBus register starting from analog output

channels.

• Digital acquisition. It is used to write ModBus register starting from digital output

channels.

Referring to the previous figure, ModBus device editor is composed of the following

elements:

1. Channel editor (Analog input). It allows the management of analog input

channels.

2. Channel editor (Digital input). It allows the management of digital input channels.

3. Virtual Channel editor. It allows the management of virtual channels.

Page 14: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

ModBus iDaq Component – User Guide

14

4. Channel Editor (Analog Output). It allows the management of analog output

channels.

5. Channel Editor (Digital Output). It allows the management of digital output

channels

6. Description.

7. Product page.

8. Advanced settings. For more details view section Advanced Settings.

9. Device reboot.

10. User guide.

Please note that channel configuration is independent from the communication type in use

(TCP or Serial).

ADVANCED SETTINGS Advanced Settings are available from the ModBus device editor.

FIGURE 10 ADVANCED SETTINGS EDITOR

As reported by the following figure, Advanced Setting editor is composed of:

1. Communication type. It can be TCP (Ethernet connection) or serial.

Communication type can be changed even after the creation of the iDaq ModBus

device.

2. Resource. It shows IP address or serial resource according to the communication

type in use.

3. Timeout. It specifies the read/write operation timeout and it is expressed in

milliseconds.

4. Delay between consecutives reads. It specifies if the iDaq component must wait

for a specific time between two consecutive read request. Default value is 0.

5. Reconnect in case of error. If enabled, ModBus device tries reconnection in case of

communication error.

6. Reconnection attempts. It specifies the number of consecutives reconnection

attempts. Overcome this value, ModBus device returns an error and stops.

Page 15: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

TOOLS for SMART MINDS

15

7. Communication editor. It shows the communication editor according to the

communication type in use (TCP or Serial). For more details, view sections

TCP(Ethernet) communication and Serial communication.

Page 16: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

ModBus iDaq Component – User Guide

16

MODBUS CHANNEL MANAGEMENT At first use, the lists of analog/digital input/output channels are empty. Channels must be

created starting from registers and coils of the ModBus slave. Each channel is related to a

specific memory elements:

• Input Register. It is used to define analog and digital input channels.

• Coils. It is used to define digital input and digital output channels.

• Holding Register. It is used to define analog and digital output channels.

The following figure shows the Channel Editor for analog input channels; editors of other

channel lists are similar.

FIGURE 11 - CHANNEL EDITOR (ANALOG INPUT)

Referring to the previous figure, the Channel Editor is composed of the following elements:

1. Channel list. It is the list of defined channels. For each channel, physical

resource, ModBus address and channel type are reported.

2. Add single channel button. Use this button to add a single channel. For more

details, view the section

Page 17: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

TOOLS for SMART MINDS

17

3. Channel creation.

4. Quick channel creation procedure. This button allows the creation of more

channels starting from a specific ModBus address. This procedure allows you

to create more channels in one shot.

5. Edit button. Use this button to edit the channel highlighted in the list.

6. Remove button. Use this button to delete the channel highlighted in the list.

7. Remove All button. Use this button to delete all the channels in the list.

Page 18: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

ModBus iDaq Component – User Guide

18

CHANN EL CR EATION

As reported before, ModBus driver supports two different ways to create channels:

1. Single channel creation.

2. Quick channel creation.

S I N G L E C H A N N E L C R E A T I O N – A N A L O G I N P U T

To create a single analog input channel, press Add single channel button from the Channel

Editor (Analog Input Capability). The following window will appear.

FIGURE 12 ADD SINGLE CHANNEL PROCEDURE

Elements in this window are:

1. Channel name.

2. Min value. It is the minimum expected value.

3. Max value. It is the maximum expected value.

4. Unit.

5. Register Address. It specifies the ModBus input register address used to

created current channel (data read from this address will be used to define

values of the current analog input channel).

6. Read Mode:

• 2 Byes: both register bytes are used to build the analog signal.

• 1 Byte High. The high byte only is used to build the analog signal.

• 1 Byte Low. The low byte only is used to build the analog signal.

7. LSB/MSB (Most significant byte/Less significant byte). Data acquired with

ModBus are unsigned 16 bit values. If LSB, is used, read bytes are swapped;

vice versa, if MSB is used, byte order remains unchanged.

8. Rescale data. If enabled, data is processed as follow: Data x Multiplier /

Divider. This can be useful to direct convert read data into a physical quantity.

9. Multiplier. It is used only if Rescale data is enabled.

10. Divider. It is used only if Rescale data is enabled.

Page 19: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

TOOLS for SMART MINDS

19

11. Test button. Use this button to test the channel.

12. Group. Use this to assign a group for the channel.

13. Signal processing units. Use this button to define the chain of signal processing

units for the channel.

After confirmation, a single channel is created and it is added to the channel list of the

Channel Editor (Analog Input Capability)

Q U I C K C R E A T I O N - A N A L O G I N P U T

This mode allows the creation of more channels starting from a specific ModBus address.

This procedure allows you to create more analog input channels in one shot. To create

channels in this way, press the Quick channel creation button from the Channel Editor. The

following window will appear.

FIGURE 13 QUICK CHANNEL CREATION

Elements in this window are:

1. Base Name. it is the base name used to build channels names.

2. Min value. It is the minimum expected value.

3. Max value. It is the maximum expected value.

4. Unit.

5. Register Address. It specifies the ModBus input register address used to

created current channel (data read from this address will be used to define

values of the current analog input channel).

6. Number of channels. It specifies the number of channels to be created.

7. Address preview. It shows the preview of used addresses.

8. Read Mode:

• 2 Byes: both register bytes are used to build the analog signal.

• 1 Byte High. The high byte only is used to build the analog signal.

Page 20: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

ModBus iDaq Component – User Guide

20

• 1 Byte Low. The low byte only is used to build the analog signal.

9. LSB/MSB (Most significant byte/Less significant byte). Data acquired with

ModBus are unsigned 16 bit values. If LSB, is used, read bytes are swapped;

vice versa, if MSB is used, byte order remains unchanged.

10. Rescale data. If enabled, data is processed as follow: Data x Multiplier /

Divider. This can be useful to direct convert read data into a physical quantity.

11. Multiplier. It is used only if Rescale data is enabled.

12. Divider. It is used only if Rescale data is enabled.

13. Test button. Use this button to test channels.

If you specify 5 as number of channels, 15 as register address, and Channel as channel base,

the following five channels will be created:

• Channel _0 – index: 15

• Channel _1 – index: 16

• Channel _2 – index: 17

• Channel _3 – index: 18

• Channel _4 – index: 19

Page 21: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

TOOLS for SMART MINDS

21

S I N G L E C H A N N E L C R E A T I O N – D I G I T A L I N P U T

To create a single digital input channel, press Add single channel button from the Channel

Editor (Digital Input Capability). The following window will appear.

FIGURE 14 ADD SINGLE CHANNEL PROCEDURE

Elements in this window are:

1. Channel name.

2. Memory Zone. It specifies the memory block used to defined current digital

channel:

• Register (Input register)

• Coil

3. Bit number. It is available only if Register Memory block is selected. As a

register is a 16-bit value, this field specified which bit corresponds to current

digital channel.

4. Register/Coil Address. It specifies the ModBus input register address or the

coil address according to the selected Memory Block.

5. Read Mode:

• 2 Byes. Both register bytes are used to build the digital channel. If 2

Bytes is selected, Bit number may refer to any bit from 0 to 15.

• 1 Byte High. The highest byte only is used to build the digital channel.

If 1 Byte High is selected, Bit number may refer to any bit from 0 to 7

• 1 Byte Low. The lowest byte only is used to build channel signal. If 1

Byte Low is selected, Bit number may refer to any bit from 0 to 7.

6. LSB/MSB (Most significant byte/Less significant byte). Data acquired with

ModBus are unsigned 16 bit values. If LSB, is used, read bytes are swapped;

vice versa, if MSB is used, byte order remains unchanged.

7. Test button. Use this button to test current channel.

8. Group. Use this to assign a group for the channel.

Page 22: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

ModBus iDaq Component – User Guide

22

After confirmation, a single channel is created and it is added to the channel list of the

Channel Editor (Digital Input Capability)

Q U I C K C R E A T I O N - D I G I T A L I N P U T

This mode allows the creation of more channels starting from a specific ModBus address.

This procedure allows you to create more channels in one shot. To create channels in this

way, press the Quick channel creation button from the Channel Editor. The following

window will appear.

FIGURE 15 QUICK CHANNEL PROCEDURE

Elements in this window are:

1. Base Name. it is the base name used to build channels names.

2. Register/Coil Address. It specifies the ModBus input register address or the

coil address according to the selected Memory Block.

3. Memory Block. It specifies the memory block used to defined current digital

channel:

• Register (Input register)

• Coil

4. Number of channels. It specifies the number of channels to be created.

5. Address preview. It shows the preview of used addresses.

6. Read Mode:

• 2 Byes. Both register bytes are used to build the digital channel.

• 1 Byte High. The high byte only is used to build the digital channel.

• 1 Byte Low. The low byte only is used to build channel signal.

7. LSB/MSB (Most significant byte/Less significant byte). Data acquired with

ModBus are unsigned 16 bit values. If LSB, is used, read bytes are swapped;

vice versa, if MSB is used, byte order remains unchanged.

8. Test button. Use this button to test current channel.

Page 23: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

TOOLS for SMART MINDS

23

If you specify 5 as number of channels, 15 as address, Register as memory block, and

Channel as channel base, the following five channels will be created:

• Channel _0 – register address 15 - bit: 0

• Channel _1 – register address 15 – bit: 1

• Channel _2 – register address 15 – bit: 2

• Channel _3 – register address 15 – bit: 3

• Channel _4 – register address 15 – bit: 4

If you specify 5 as number of channels, 15 as address, Coil as memory block, and Channel as

channel base, the following five digital input channels will be created:

• Channel _0 – coil address 15

• Channel _1 – coil address 16

• Channel _2 – coil address 17

• Channel _3 – coil address 18

• Channel _4 – coil address 19

Page 24: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

ModBus iDaq Component – User Guide

24

S I N G L E C H A N N E L C R E A T I O N – A N A L O G O U T P U T

To create a single analog output channel, press Add single channel button from the

Channel Editor (Analog Output Capability). The following window will appear.

FIGURE 16 ADD SINGLE CHANNEL PROCEDURE

Elements in this window are:

1. Channel name.

2. Min value. It is the minimum expected value.

3. Max value. It is the maximum expected value.

4. Unit.

5. Register Address. It specifies the ModBus holding register address used to

create the current channel (data of current analog output channel will be

written in the correspondent register address).

6. Read Mode:

• 2 Byes: both register bytes will be written.

• 1 Byte High. The high byte only will be written.

• 1 Byte Low. The low byte only will be written.

7. LSB/MSB (Most significant byte/Less significant byte). ModBus register data

are unsigned 16 bit values. If LSB is used, bytes are swapped before writing

them in the register; vice versa, if MSB is used, byte order remains unchanged.

8. Rescale data. If enabled, data is processed as follow: Data x Multiplier /

Divider before writing it to the register. This can be useful to direct convert a

physical quantity into register data.

9. Multiplier. It is used only if Rescale data is enabled.

10. Divider. It is used only if Rescale data is enabled.

11. Test value. It is the value used for the channel test procedure.

12. Test button. Use this button to test current channel.

13. Group. Use this to assign a group for the channel.

Page 25: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

TOOLS for SMART MINDS

25

After confirmation, a single channel is created and it is added to the channel list of the

Channel Editor (Analog Output Capability)

Q U I C K C R E A T I O N - A N A L O G O U T P U T

This mode allows the creation of more channels starting from a specific ModBus address.

This procedure allows you to create more channels in one shot. To create channels in this

way, press the Quick channel creation button from the Channel Editor. The following

window will appear.

FIGURE 17 ADD SINGLE CHANNEL PROCEDURE

Elements in this window are:

1. Base Name. it is the base name used to build channels names

2. Min value. It is the minimum expected value.

3. Max value. It is the maximum expected value.

4. Unit.

5. Register Address. It specifies the ModBus holding register address used to

created current channel (data of current analog output channel will be written

in the correspondent register address).

6. Number of channels. It specifies the number of channels to be created.

7. Address preview. It shows the preview of used addresses.

8. Read Mode:

• 2 Byes: both register bytes will be written.

• 1 Byte High. The high byte only will be written.

• 1 Byte Low. The low byte only will be written.

9. LSB/MSB (Most significant byte/Less significant byte). ModBus register data

are unsigned 16 bit values. If LSB, is used, bytes are swapped before writing

them in the register; vice versa, if MSB is used, byte order remains unchanged.

Page 26: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

ModBus iDaq Component – User Guide

26

10. Rescale data. If enabled, data is processed as follow: Data x Multiplier /

Divider before writing it to the register. This can be useful to direct convert a

physical quantity into register data.

11. Multiplier. It is used only if Rescale data is enabled.

12. Divider. It is used only if Rescale data is enabled.

13. Test value. It is the value used for the channel test procedure.

14. Test button. Use this button to test current channel.

If you specify 5 as number of channels, 15 as register address, and Channel as channel base,

the following five analog output channels will be created:

• Channel _0 – index: 15

• Channel _1 – index: 16

• Channel _2 – index: 17

• Channel _3 – index: 18

• Channel _4 – index: 19

Page 27: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

TOOLS for SMART MINDS

27

S I N G L E C H A N N E L C R E A T I O N – D I G I T A L O U T P U T

To create a single digital output channel, press Add single channel button from the Channel

Editor (Digital Output Capability). The following window will appear.

FIGURE 18 ADD SINGLE CHANNEL PROCEDURE

Elements in this window are:

1. Channel name.

2. Memory Zone. It specifies the memory block used to defined current digital

channel:

• Register (Input register)

• Coil

3. Bit number. It is available only if Register Memory block is selected. As a

register is a 16-bit value, this field specified which bit corresponds to current

digital line.

4. Register/Coil Address. It specifies the ModBus holding register address or the

coil address according to the selected Memory Block.

5. Read Mode:

• 2 Byes. Both register bytes may be written. If 2 Bytes is selected, Bit

number may refer to any bit from 0 to 15.

• 1 Byte High. The highest byte only may be written. If 1 Byte High is

selected, Bit number may refer to any bit from 0 to 7

• 1 Byte Low. The lowest byte only may be written. If 1 Byte Low is

selected, Bit number may refer to any bit from 0 to 7.

6. LSB/MSB (Most significant byte/Less significant byte). ModBus register data

are unsigned 16 bit values. If LSB, is used, bytes are swapped before writing

them in the register; vice versa, if MSB is used, byte order remains unchanged.

7. Test value. It is the value used for the channel test procedure.

8. Test button. Use this button to test current channel.

9. Group. Use this to assign a group for the channel.

Page 28: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

ModBus iDaq Component – User Guide

28

After confirmation, a single channel is created and it is added to the channel list of the

Channel Editor (Digital Output Capability)

Q U I C K C R E A T I O N - D I G I T A L O U T P U T

This mode allows the creation of more digital output channels starting from a specific

ModBus address. This procedure allows you to create more channels in one shot. To create

channels in this way, press the Quick channel creation button from the Channel Editor. The

following window will appear.

FIGURE 19 ADD SINGLE CHANNEL PROCEDURE

Elements in this window are:

1. Base Name. it is the base name used to build channels names.

2. Register/Coil Address. It specifies the ModBus input register address or the

coil address according to the selected Memory Block.

3. Memory Block. It specifies the memory block used to defined current digital

channel:

• Register (Input register)

• Coil

4. Number of channels. It specifies the number of channels to be created.

5. Address preview. It shows the preview of used addresses.

6. Read Mode:

• 2 Byes. Both register bytes may be written. If 2 Bytes is selected, Bit

number may refer to any bit from 0 to 15.

• 1 Byte High. The highest byte only may be written. If 1 Byte High is

selected, Bit number may refer to any bit from 0 to 7

• 1 Byte Low. The lowest byte only may be written. If 1 Byte Low is

selected, Bit number may refer to any bit from 0 to 7.

Page 29: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

TOOLS for SMART MINDS

29

7. LSB/MSB (Most significant byte/Less significant byte). ModBus register data

are unsigned 16 bit values. If LSB, is used, bytes are swapped before writing

them in the register; vice versa, if MSB is used, byte order remains unchanged.

8. Test value. It is the value used for the channel test procedure.

9. Test button. Use this button to test current channel.

If you specify 5 as number of channels, 15 as address, Register as memory block, and

Channel as channel base, the following five digital output channels will be created:

• Channel _0 – register address 15 - bit: 0

• Channel _1 – register address 15 – bit: 1

• Channel _2 – register address 15 – bit: 2

• Channel _3 – register address 15 – bit: 3

• Channel _4 – register address 15 – bit: 4

If you specify 5 as number of channels, 15 as address, Coil as memory block, and Channel as

channel base, the following five digital output channels will be created:

• Channel _0 – coil address 15

• Channel _1 – coil address 16

• Channel _2 – coil address 17

• Channel _3 – coil address 18

• Channel _4 – coil address 19

Page 30: User guide - idaq-datalogger.com User Guide.pdf · ModBus iDaq Component – User Guide 4 ... mechanism controls the output flow by suspending transmission. ... to perform flow control.

ModBus iDaq Component – User Guide

30

FURTHER DETAILS iDaq product page: http://www.idaq-datalogger.com/idaq.php

iDaq ADD-ON Store http://www.idaq-datalogger.com/addons.php

Support: http://www.idaq-datalogger.com/support.php

ModBus Driver for iDaq User Guide:

http://idaq-datalogger.com/_documents/ModBus User Guide.pdf

Getting stated with ModBus Driver for iDaq:

http://idaq-datalogger.com/_documents/Getting Started with ModBus.pdf

Introduction to ModBus http://www.ni.com/white-paper/7675/en/

ModBus organization website http://www.modbus.org/