Podcast
Questions and Answers
When was Modbus originally published?
When was Modbus originally published?
- 1979 (correct)
- 1990
- 1985
- 1970
What is the typical application of Modbus?
What is the typical application of Modbus?
- Automotive diagnostics
- Aerospace communications
- Industrial automation (correct)
- Consumer electronics
What protocols are embedded in TBox?
What protocols are embedded in TBox?
- ASCII only
- RTU only
- TCP only
- RTU, TCP and ASCII (correct)
What is the station address range for Modbus?
What is the station address range for Modbus?
What is the broadcast address for Modbus?
What is the broadcast address for Modbus?
When using address 255, what response will occur?
When using address 255, what response will occur?
What is the default TCP port used when TBox RTU is configured as a Modbus TCP slave?
What is the default TCP port used when TBox RTU is configured as a Modbus TCP slave?
How is 'Modbus Address' defined?
How is 'Modbus Address' defined?
What is the bit range of a standard Modbus address?
What is the bit range of a standard Modbus address?
What is the numeric range of a Modbus address?
What is the numeric range of a Modbus address?
In TBox, how are data points presented?
In TBox, how are data points presented?
What should be checked in RTU Properties for Modbus TCP?
What should be checked in RTU Properties for Modbus TCP?
If using Modbus over serial ports, what configuration parameters should be checked to suit the master device?
If using Modbus over serial ports, what configuration parameters should be checked to suit the master device?
What is the maximum number of Modbus TCP slaves that can be handled in parallel on IP communication?
What is the maximum number of Modbus TCP slaves that can be handled in parallel on IP communication?
What controls when Modbus transactions occur on a Modbus device?
What controls when Modbus transactions occur on a Modbus device?
Which trigger will execute all Modbus transactions of this Modbus device one time when the trigger changes from 0 to 1?
Which trigger will execute all Modbus transactions of this Modbus device one time when the trigger changes from 0 to 1?
Which trigger will execute all Modbus transactions of this Modbus device continually while a trigger is active?
Which trigger will execute all Modbus transactions of this Modbus device continually while a trigger is active?
What is the purpose of the 'Packet reception delay' setting?
What is the purpose of the 'Packet reception delay' setting?
What type of connection is RS232?
What type of connection is RS232?
What setting is recommended to increase data throughput and save bandwidth of TCP/IP networks?
What setting is recommended to increase data throughput and save bandwidth of TCP/IP networks?
Flashcards
What is Modbus?
What is Modbus?
A communication protocol used in industrial automation for transferring data. It's efficient, robust and easy to configure.
Modbus slave functionality in TBox RTU
Modbus slave functionality in TBox RTU
A built-in feature of TBox RTU that allows communication via Modbus RTU (serial ports) or Modbus TCP (Ethernet ports) without special configuration.
Modbus Station Address
Modbus Station Address
The identification of each Modbus slave in a network, ranging from 1 to 254. Address 0 is a broadcast address, and address 255 is typically used in Modbus-TCP protocol.
Modbus TCP Port
Modbus TCP Port
Signup and view all the flashcards
Modbus Address
Modbus Address
Signup and view all the flashcards
Modbus Device
Modbus Device
Signup and view all the flashcards
Modbus Transaction
Modbus Transaction
Signup and view all the flashcards
Modbus Device Trigger
Modbus Device Trigger
Signup and view all the flashcards
Packet Reception Delay
Packet Reception Delay
Signup and view all the flashcards
Inter Frame Gap (IFG)
Inter Frame Gap (IFG)
Signup and view all the flashcards
Rx Timeout
Rx Timeout
Signup and view all the flashcards
Keep Socket Open
Keep Socket Open
Signup and view all the flashcards
Enable Advanced Modbus Mapping
Enable Advanced Modbus Mapping
Signup and view all the flashcards
Study Notes
Overview
- Modbus is a communication protocol created by Modicon in 1979, now Schneider Electric
- Modbus is used for industrial automation applications because it transfers data efficiently
- The application note provides a generic workflow for configuring TBox RTU with Modbus slave and master functionalities
- Methodologies apply to all TBox RTU models, using TBox MS as an example
Modbus Slave
- All Modbus protocols (RTU, TCP, ASCII) exist within TBox
- Modbus slave is a built-in functionality of the TBox RTU
- Communication to TBox RTU is possible via Modbus RTU (on serial ports) and Modbus TCP (on Ethernet ports) without configuration
- TWinSoft communicates with TBox in Modbus without any configuration
Station Address
- The 'Station Address' identifies each Modbus slave on the network (serial or TCP/IP)
- Each Modbus slave must have a unique station address in a multi-drop network
- The range of Modbus station addresses is 1 to 254
- Address 0 is the broadcast address which receives no answer from the slave
- Address 255 gives a normal reply, from any address, and is used in Modbus-TCP protocol
- The station address of TBox RTU is configured in the RTU Properties window
TCP Port
- TBox RTU acts as a TCP server listening for incoming TCP connections on port 502 from the TCP client (Modbus TCP master) when configured as a Modbus TCP slave over a TCP/IP network.
- The port number can be changed via RTU Properties->Advanced
- A global reset will restore the default Modbus TCP slave port to 502
Modbus Address
- 'Modbus Address' refers to the addressing of data points in the Modbus protocol
- Data points are presented as tags within TBox
- When a new tag is created, a specific Modbus Address can be assigned to the data point on the tag properties window
- The default assigned Modbus address can also be used for each created tag to prevent duplicated Modbus addresses
- Modbus addresses use 16 bits, enabling numbers between 0 and 65535
- Modbus addresses can be identical for digital and analog tags because the protocol uses different functions for access
- A 32-bit variable uses 2 x Modbus addresses
Configuration Procedure
- Since Modbus slave is built into TBox, there is nothing to configure
- Still, the way TBox is configured needs to be known to access it
- Check the 'Station Address' in RTU Properties
- If Modbus TCP is used, check the TCP port in RTU Properties->Advanced->Ports page
- With serial ports, check the configuration Type (RS232/485), Baudrate, Data bits, Parity, Stop bits, and Protocol (Modbus RTU/Modbus ASCII)
- Establish the connection between the master device and TBox via Ethernet or serial
- Use TBox Modbus simulators for testing or troubleshooting
Modbus Master
- Modbus master does not assign any dedicated station address
- Any device can be a master device on a serial Modbus bus with strictly one master device
- When Modbus protocol extends to TCP/IP network, the IP address identifies each device
- To access a slave, the station address used can be 255
- If Modbus routing to access a device behind TBox is required, the real station address must be addressed
Modbus Device
- External Modbus slave devices are treated as I/O when TBox RTU is a Modbus master
- I/O is managed in the Resources category
- A Modbus Device is a physical module connected to the TBox RTU via serial or Ethernet connection
- Add a Modbus slave device by selecting Resources->I/O, right clicking Add an I/O Card and selecting Modbus Device
Modbus Transactions
- In TBox Modbus configuration, one 'Modbus Transaction' means one specific communication that TBox RTU (as Modbus master) will execute as per one ‘Modbus Device’
- A Modbus Device can be configured with multiple Modbus Transactions
- TBox RTU executes communications sequentially (one after each other) to this Modbus Device
- Communications can read or write one or more data points from or to the Modbus device, either digital or analog
- Multiple, successive Modbus addresses can be read/write in one transaction
- To add a Modbus transaction, select Modbus Transactions, and double click Add a Modbus Transaction
Polling Management Principles
- Modbus communication is processed on different communication ports (RS232, RS485, Ethernet) simultaneously
- Only one Modbus transaction is under process at a time on a serial port
- On IP communication (Ethernet, GPRS, 3G, 4G), up to 64 Modbus TCP slaves can be handled in parallel, with transactions on each device carried out sequentially
- Modbus transactions of a Modbus device are completed sequentially, since Modbus is designed as a half-duplex protocol
- The configurable trigger controls the start/stop of the external Modbus device
Trigger
- The trigger of Modbus Device controls the Modbus polling
- The trigger is mapped to a tag so the polling is controlled by the value of the trigger tag
- The tag assignment is found in the dialog of Modbus Device configuration
- Methods to use the trigger include positive edge: all Modbus transactions of the Modbus device are executed once when Trigger changes from 0 to 1.
- Negative edge: all Modbus transactions of this remote device are executed once when Trigger changes from 1 to 0
- High state: all Modbus transactions are executed permanently if Trigger=1
- Low state: all Modbus transactions are executed permanently if Trigger=0
- When the trigger works in edge mode, the trigger value will be restored automatically after all the Modbus transactions of the Modbus device have been executed, with or without error
- With a 'negative edge' trigger and the trigger changes from 1 to 0, all Modbus transactions of the device execute once, then the trigger is restored to 1 automatically
Useful Hints – Diagnostics
- Assign tags to Cycle count, Status and Communication error diagnostics items to use them in the logic
- Cycle count increments by 1 when all transactions of a device end
- It monitors if Modbus transactions are executed normally
- If a permanent level is used, the change in cycle count can be detected
- Status and Communication errors are evaluated after each Modbus transaction
- This is used to diagnose if Modbus communication is healthy
Useful Hints - Timing
- TBox RTU uses 3 timing parameters to control the Modbus polling process:
- Packet reception delay is the maximum time the master waits for a complete packet from the slave
- IFG (Inter Frame Gap) is the time the master RTU must wait before its next Modbus query to the slave device
- Rx Timeout is the longest time the master RTU waits for the response from a slave
- These 3 parameters are found in the Advanced tab page of the properties window of a serial or Ethernet port
Master Configuration Procedure
- Define the Modbus master configuration of TBox RTU, including:
- The quantity of external Modbus slave devices that need to poll
- The data types and ranges needed to read or write in each Modbus slave device
- Whether each Modbus slave device uses a serial or Ethernet connection
- If using a serial port, identify if RS232 or RS485 is required
- The RS232 port of TBox RTU connects to one external device given it is a point-to-point connection
- The RS485 port of TBox RTU connects to multiple slave devices as it’s a multiple-drop communication bus
- Configure the Baudrate, data bits, parity, and stop bits on the TBox RTU
- With Ethernet, make sure how many devices need polling and their IP addresses
- TBox RUT cannot have the same subnets on different Ethernet ports
- Add a Modbus Device based on requirement and configure the communication port
- Check the TCP port, and adapt it in RTU properties -> Advanced -> TCP ports
Troubleshooting
- The diagnostic tags can be used, as well as other utilities like Wireshark and Modbus simulator
Special Notes – Keep Socket Open
- With the TBox RTU as a Modbus TCP master, 'Keep socket open' should be enabled to increase data throughput
- This saves bandwidth on the TCP/IP network
- The option is located in RTU Properties->Advanced->Modbus Transactions window
- When enabled, the socket stays open until there are no activities on this socket in 30s
- When disabled, the socket closes after every transaction so a new socket opens in the next transaction
- Some Modbus slave devices do not like frequent socket open/close actions over Ethernet ports, so enabling Keep socket open is a better choice
Illegal Data Address
- When TBox RTU is a Modbus slave and the polled data address (tag) does not exist, an exception code returns, following the Modbus protocol standard
- With 'Enable Advanced Modbus Mapping' checked, TBox RTU will fill the non-existent addresses with 0, instead of returning the exception code
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.