Knowledge Base
Welcome to OPAL-RT’s Knowledge Base
OPAL-RT offers a repository of support information for optimal use of its technology.
Please note that OPAL-RT knowledge base is not fully optimized for mobile platforms.
For optimal experience, use a desktop computer.
Reference Number: AA-02120// Views: AA-02120// Created: 2023-01-06 00:39:36// Last Updated: 2023-01-09 23:31:31 HowTo How to verify HYPERSIM's Modbus slave connection through third party software acting as Modbus master (HYPERSIM v2019.1+) How to verify HYPERSIM's Modbus slave connection through third party software acting as Modbus master To implement a Modbus slave communication in HYPERSIM, the I/O interface configuration tool provides an easy tool to manage the 'bridge' between the software and external hardware through the real-time simulator. If you are not familiar with I/O Interface Configuration tool in HYPERSIM, please go through the following article: https://www.opal-rt.com/support-knowledge-base/?article=AA-01778 This article deals with the following standard registers used in Modbus: We will configure the interface to over TCP/IP using an ethernet physical link. The workflow is shown as follows: First we will design the Modbus slave model in HYPERSIM (you can also download the HYPERSIM project attached at the end of this page). While in I/O interface configuration, add a "Modbus Slave" by right clicking on "Modbus Slave>Add" After opening the Modbus slaves, we can configure the Mode to be either TCP or RTU, for this example, we will select TCP. Next, we need the network interface card name used to specify the communication point between the master and the slave. In this case, since the modbus master is on the local host PC connected to the slave model running on the target, therefore, it will be IP address of the target which is usually equivalent to eth0. To see which port NIC you are connected to, please refer to the link below: https://www.opal-rt.com/support-knowledge-base/?article=AA-01070. Take note of the TCP port number as well.
After specifying the above information, click on "Apply" and "Ok" . After configuring and assigning the Modbus slave for the target model, we can execute the model. Now, we will use an application called qModMaster (downloadable here: https://sourceforge.net/projects/qmodmaster/) to act as the external Modbus master. After downloading qModMaster, we can run the program and click on Options > Modbus TCP settings. and enter in your target simulator IP address and port number.
Now for master control, we first take note of the variable which is being controlled for that specific register (single coil in this case) so we can visualize the change in ScopeView
Similarly, we change the value to 25 for the holding register Address 50 and observe the change in ScopeView
|