Get MBLogic at SourceForge.net. Fast, secure and Free Open Source 
	software downloads

Help Topics

Topic Details for General

Help - Creating an Application


Overview:

The system can be used in a variety of applications. This section will present an example using all the components together to control a simple machine.


Create the Application:

Allocate the System Data Table Memory:

The communications, soft logic, and HMI systems connect with each other using the system data table. before creating a new application it is necessary to allocate space in the system data table for data that needs to be read from or written to field devices, communications fault monitoring addresses, and for data that needs to be exchanged between the soft logic system and the HMI (this also goes through the system data table).

A good layout for the system data table will make configuration of the rest of the system easier. The soft logic system has its own data table and addressing system, so you can change the arrangement of data in the system data table without affecting the soft logic program or the HMI (their configurations can be adjusted to suit).

Enable the System Servers:

In order to be able to interact with the system, we need to enable the basic system servers. We will want the following features available to us:

Information on creating a configuration is located in the section on "Communications". A sample configuration is also provided with the system.

Configure Communications with Field IO:

A normal application will require communicating with field IO such as valves, sensors, drives, etc. These field devices are normally servers ("slaves"). The system create a separate client connection for each field device server. Each client connection can execute multiple commands in sequence. This permits communications with each field device to take place in parallel, rather than communicating with each one at a time. This means that a slow or faulty field device will not hold up communications with other field devices.

When a client connection executes a "read" command, it will read data from a field device (remote address) and store it in the local system data table. When a client connection executes a "write" command, it will read data from the local system data table and write it to the remote field device. The HMI and soft logic systems will have access to this data through the system data table.

Information on creating a configuration is located in the section on "Communications". A sample configuration is also provided with the system.

Each field device server (slave) that you wish to communicate with requires its own client connection configuration.

Write the Soft Logic Program:

The soft logic (PLC) program determines what your machine or process will do. The system uses conventional PLC type instructions operating on a conventional data table. The soft logic data table is separate from the system data table.

See the help sections on "Soft Logic" for more information on programming, addressing, and the instruction set.

Configure the Soft Logic IO:

Since the system and soft logic data tables are separate, it is necessary to copy data between them in order for the soft logic program to have access to the field devices or HMI. This also permits the soft logic addresses to be in a different order and spacing from that used in the system data table.

The transfer of data between the system and soft logic addresses is controlled by a configuration file. The soft logic "IO" system can read and write to and from any addresses in the system and soft logic data table. See the help sections on "Soft Logic" for more information on soft logic IO configuration.

Write the HMI Web Page:

The HMI system is web based. An HMI "screen" is just a web page. See the help sections on "HMI" for more information on HMI pages.

The system is designed to communicate with multiple HMI web pages simultaneously. These can be multiple copies of the same web page, or copies of different web pages. This means that a machine or process can have multiple HMI panels if desired.

Create the HMI Server Configuration:

When the HMI client (web page) communicates with the server, it requests information in "tag label" addresses, rather than the Modbus addresses used by the system data table. The HMI server must translate between the "tag" names used by the HMI client and the numerical addresses used by the system data table. For example, "PB1" may be stored in coil address "100", and "PB2" may be stored in coil address 25. Tag labels are associated with system data table addresses by means of a configuration file. See the help sections on "HMI" for more information on HMI configuration.

Load the Configurations and Programs:

Once the configurations, program, and web page(s) have been created, they need to be loaded into the system. The communications configuration can only be changed by stopping and restarting the entire system. The other (soft logic configuration and program, HMI configuration, HMI web pages) can (except for a few items) be reloaded while the system is running.

Debugging and Troubleshooting:

The current configurations can be viewed using the status system web interface. The status system also allows any address (or set of addresses) to be inspected while the system is running. For more information on using the status system consult the on line help pages included with the status system.