ModbusIP Master TLM
  SoftPLC    Font size:      

Usage

Installation

The TLM is named mbipmast.tlm.so and is found as part of the standard SoftPLC 4.x installation in the /SoftPLC/tlm directory. To use it you merely have to enable it in NexGen's PLC | MODULES editor. Then you must edit the xml file MODBUS.XML which is the TLM's configuration file. There is an application specific editor for this MODBUS.XML file within NexGen. It is easy to edit the configuration file from the PLC | MODULES editor. Simply click on the Configure button after selecting and enabling Use in the same row as the MBIPMAST TLM.

Editor Usage

Add button will insert a new element within the selected element. First select the element you wish to insert into.

Delete button will deleted the selected element. It is only enabled when you are allowed to delete the selected element.

Move Up button will move the selected element up in the current containment list.

Fetch, Send, Load, and Save all have the same meaning as they do in the NexGen Module editor. You can see the helpfile for that editor by going to that editor and clicking on Help.

Use Send to transfer the configuration down to the SoftPLC. The next step is to cycle power on the SoftPLC for the changes to take place. As an alternative to cycling power, you may enter "Remote Program" mode using NexGen, then select "Remote Program" a second time. This psuedo transition from Remote Program to Remote Program is a signal to the TLM that it should reload its configuration file. This way you can reconfigure without cycling power, although it does require you enter "Remote Program" mode (twice!).

With a (or multiple) TealwareDrop present, using Save or Send, the configuration editor will run a verification check on the address references used in all modules. If any overlaps are found, the error will be shown; otherwise the editor will then automatically generate Slave elements with Modbus requests as appropriate for all the modules. These elements cannot be edited, and any changes that may be needed should be made by editing the actual module element or its address component. For more information on TealwareDrop elements and their components, see the Configuration page.

Manually Configuring Tealware Racks

Tealware Module Selection Dialog

Clicking Add with a Rack element selected will show the Module Selection dialog, which is used to assign Tealware modules to specific slots in a Rack.

The Select Module Type box allows you to choose which types of modules you want to view when choosing what to add.

The Select Module box shows a list of all modules of the selected type with descriptions.

Configure Values displays the input and/or output areas for the module, as well as a table to configure the CDM data for the module (if present). Default values are supplied by the configuration tool and are automatically incremented as modules are added, but these values can be changed manually at any point. Values for digital addresses are word references, while analog addresses are input as an offset from word 0 in the file given by the ModbusTLM element.

Ok will add the selected module to the Rack, while Cancel will take no action and close the dialog.

Note
The auto-increment functionality works based on the digInStart, regInStart, digOutStart, and regOutStart attributes of the ModbusTLM element. These indicate the file (for analog) and starting word addresses (for discrete). Default values will be present in any new configuration file (and may be changed manually if desired), but attempting to build a TealwareDrop element without these attributes present will disrupt the functionality. These attributes have no effect on the TCPServer or UDPServer elements.
Note
This utility will only work with version 2.0 of the Tealware firmware drivers.

Auto-Configuring Tealware Racks

Auto-Configuring Tealware Drops

The configuration editor also provides a network discovery utility that can detect what Racks and modules are present in a Tealware Drop. Selecting the desired TealwareDrop element and right-clicking on it will show the menu options for the network utilities: Auto-detect installed modules, BOOTP Protocol, and Set IP Address. The first option looks on the network at the IP Address specified for the selected Drop and (if successful) discovers what is present. The components for the TealwareDrop are then added and configured using the auto-increment functionality to assign addresses for the modules, while the CDM data must be manually entered. If you want to specify specific address references for any modules, you can manually change the values after running the auto-configure.
The second menu option will open a new dialog window that will use the BOOTP Protocol to configure the selected TealwareDrop with an IP Address The dialog window also contains its own set of instructions for help in configuring the TealwareDrop for BOOTP.
The third option will open another dialog window that will allow you to manually set the permanent IP Address, Subnet Mask, and Default Gateway for the TealwareDrop.

Set Permanent IP Configuration

Optionally, you may also check the Use BOOTP option and allow the TealwareDrop's IP Address to be configured automatically via BOOTP protocol

Right-clicking with the ModbusTLM root element selected will bring up an option to Discover/Configure all Tealware Drops. This performs the same function as for an individual element, but will find and add any TealwareDrop elements as well as their components.

Note
This utility will only work with version 2.0 of the Tealware firmware drivers.

Configuring a TCP or UDP Server

Configuring a TCP/UDP Server

A TCP Server (or UDP Server) is configured simply by adding the desired Slave elements and Modbus requests to the Slave. Clicking the Add button with a Slave selected will bring up a list of requests to choose from as shown in the image above. The request must then be manually configured by setting the refNum and the attributes of the toBlock or fromBlock.

Ladder Instructions

This TLM implements a few ladder instructions which are useful for diagnostics and fault situations.


MBM_GETFAULTMAP

This instruction can be used to fetch a bitmap of up to 128 Servers, which is the maximum number of Servers supported by this TLM. The bitmap is copied into the Map: parameter which must be a block of 8 words. If a Server is in the not Present and not Responding state, then its corresponding bit will be set, else not.

This is a permissive instruction and it will evaulate to false when all the bits in the bitmap are zero, meaning no faults, all Servers operating fine. If any Server is in the Not Responding state, then its corresponding bit will be set in the bitmap and the instruction will evaluate to true. If it is your desire to stop the control when a Server fails, then something like the following rung of logic will fault SoftPLC when any Server fails, since turning on bit S11/6 will initiate a fault shutdown:


ParameterMeaning
Map:A block address of 8 words which will receive a bitmap of all the configured Servers. We suggest using a block address in a 'B' datatable file so that the bit numbers ascend from zero accross word boundaries, thus corresponding to Servers in the configuration file. The first listed Server in the configuration file is 0, the second is 1, etc.


MBM_GETSTATUS

This instruction can be used to fetch 5 status words for each Server in a range of Servers. The range of Servers can be any number but must be contiguous as defined within the configuration file. The 5 status words for each Server fetched will be contiguous within the Result block parameter, and their meaning is as follows: (Meanings are for a single specific Server)


Word IndexStatus Counter Meaning
0average response time in msecs
1TCP: no. times the slave timed out or responded with an exception
UDP: no. retried requests
2no. of times TLM saw an exception
3set to modbus commmand code of any that is answered with an exception
4set to the modbus exception code, or 0 if no exception but rather a timeout occurred


This instruction can be used to monitor the health, performance, and connection integrity of any or all Servers.


ParameterMeaning
Result:A block address of 640 (=5*128) words which will receive a number of groups of 5 words, depending on how many Servers are requested. The pattern of 5 words is repeated one after another according to the Status Counter table above.
ServerIndexThe starting index of the first Server of interest within the list of Servers given in the configuration file.
ServerCountThe number of contiguous Servers of interest within the list of Servers given in the configuration file. In the example rung above, there will be 11 Servers fetched starting at Server 0.


MBM_CLEARSTATUS

This instruction clears the 5 status words (to zero) for each Server in a range of Servers. The range of Servers can be any number but must be contiguous as defined within the configuration file. The 5 status words for each Server cleared will be contiguous within the Result block parameter, and their meaning is as given in MBM_GETSTATUS

This instruction can be used to get a fresh start, say after power cycling your slaves or modifying the cabling, when you might want to erase the history of previous problems.


ParameterMeaning
ServerIndexThe starting index of the first Server of interest within the list of Servers given in the configuration file.
ServerCountThe number of contiguous Servers of interest within the list of Servers given in the configuration file. In the example rung above, there will be 11 Servers cleared starting at Server 0.