
Modsim32 is a Modbus slave simulation application. It will be used to provide data values that will be read by the Windows Modbus Master application.
This is a free .NET library which is used in the Modbus Master application and implements the Modbus protocol. It significantly reduces the amount of program code that has to be written.
Microsoft Visual Studio Community IDE is the software that will be used to develop the Windows Modbus Master application. It is completely FREE for individual use.
The learning strategy of the quick start section will be to build a very basic program first, get it working and then explain how it works.
Modsim32 is configured as a Modbus TCP/IP Server. The Modbus Master application will read data from Modsim32.
Visual Studio Community 2017 is briefly introduced and the first project is created and run!
Objects called Windows controls are placed on the main form in the application. Selected properties of the controls are then changed.
The code that runs the application is inserted and the completed application is run.
Windows forms programming involves the understanding of properties, methods and events. This lecture gives a basic and brief overview of the meaning of these terms and their usage.
A look at the code that creates the EasyModbus object and forms the initial connection to the server.
A look at the code that performs the actual read of the holding register and displays the value returned.
The Timer object is added to the form in the application. It's properties are then set so that the timer "ticks" every 3 seconds.
The appropriate code is then added to the Tick event handler and the application is run. Testing is done by changing the value of the target holding register in Modsim32.
The Read Input Register Command is implemented in Code and tested.
Two label objects are added to identify the holding as well as the input register values being read.
The Read Input Status Command is implemented in Code and tested.
The Read Coil Status Command is implemented in Code and tested.
Since the Timer object runs the reading of the Modbus data, there is no longer a need for the original Button that was used. It is therefore removed.
The Write Single Register Command is implemented in Code and tested.
The Write Single Coil Command is implemented in Code and tested.
Virtual Serial Port is started and configured. Modsim32 is then disconnected from the TCP/IP network and connected to COM5 created by Virtual Serial Port.
The Modbus Master is modified to communicate serially. It is connected to the COM4 port created by Virtual Serial Port. It is then run and tested using Modsim32.
A release version is created.
A text box object is programmed to change colour when the input status changes.
A progress bar object is programmed to change fill based on the value in the input register.
If you design and implement projects in the area of Process Automation or SCADA, you will know from your experience that "one size does not fit all" when it comes to data acquisition and Human Machine Interfaces (HMIs). There is always some type of customization to be done. Always some feature that the standard HMI software does not offer.
And sometimes, using a very expensive HMI with all sorts of bells and whistles for a small project can just be overkill. There are times when you just need a very simple application that acquires a few data points from a Modbus network and displays them on a computer screen.
These are the reasons for this course!
I teach you how to use FREE TOOLS with some basic programming to create your own Modbus Master application and Human Machine Interface.
If you apply yourself in this course and execute all that I ask you to do, then at the end, you would have a finished Windows Modbus Application that you can customize to your heart's content!
This is the start of your journey into a whole new area of Process Automation / SCADA and one that is increasingly in very high demand!
Looking forward to seeing you on the inside!