Navigation:  Setup >

 

MODBUS SETUP

 

Previous pageReturn to chapter overviewNext page

 

 

The Modbus Setup  is very important part of the program.  All other forms and data collection processes use the names assigned in this form.  The data being transmitted and received are put into this form before other forms are updated.  You can always view the data in this form to see the latest value received.

 

 

clip0175

Define your Modbus receive sensors in this grid.

 

 

The RTU, Word and Bit must be in the correct order (lowest to highest).  If you are polling RTU 1, then the word column must be in order from lowest to highest.  If a sensor is assigned as a status sensor, the bits must be in order also (lowest to highest).

 

The lowest to highest ordering starts with the RTU, then Word, then Bits.

 

 

 

 

RECEIVE COLUMNS

 

 

Column1:  This is the row column that tells you how many sensors are entered into the system.  The rows are entered automatically when you add a row.

 

Column 2: Enter the type of Modbus communications you want.  The two types are RUG6 and RUG9.  The main difference between these protocols is an offset of 1 in the Modbus address.  The RUG9 follows the standard Modbus protocol.  This program uses types 3, 6 and 16 Modbus messages for reading and writing data.  Events supports up to 10 serial ports.  It has been tested with the blue heat add on board which supplied ports 6, 7, 8, & 9.  The software worked well with any of these ports as well as ports 1 and 2.  Be sure to use the same configuration for each row.  (RUG9,Com1).

 

Column 3: This is a name for your sensors, which is used by the parts of Events.  Each name in the receive and transmit arrays must be unique or different.  Try to use names representing your sensors.  The data shown above was imported from a RUG9 file.  The R- was added to the existing sensor's name.

 

Column 4: Data polled from the master RTU is entered in this column.  This data is converted into engineering units using the multiplier and format.  If the raw data is not in final form, you can take this value as an input in the defined grid.  The defined grid allows you to create an equation or lookup table using any data in the receive grid.

 

Column 5, 6, 7: RTU, Word, Bit make up the modbus address.  The RTUs, Words and Bits need to be in the correct order (lowest to highest).  The program will try to catch any errors in these rows.  The multiplier and format are used to format the data with the selected number of decimal places.  The data displayed on your forms will be in the format selected.

 

Column 8: Format defines the number of decimal places shown in the data column.  This usually corresponds to the multiplier used.  If the multiplier is 0.1 then the format would be 0.0.

 

Column 9: sType is either an integer or status.  The modbus format sends data as integers.  Status sensors use one word that is divided into 16 status bits.  Each bit can be assigned as a sensor.  Events take care of the bit manipulations.  If the bit is on the data value will be one (1).  If the bit is off the data value will be zero (0).

 

 

 

EDITING MODBUS SETUP VALUES

 

 

If you have the setup user privileges, you can editEditing  Modbus Setup  the Modbus setup parameters.  To go into the edit mode, click on the Red button

 

Click on the Edit button (red square) or select the Edit | Edit Values menu item or press F9.  The forms tool bar will be shown.

 

 

clip0176

Modbus Setup edit menu

 

 

 

Using the Add to Commands

 

 

The add to commands are an easy way to set up your files (data logging), statistics and alarms.  Select the sensor(s) in the Modbus Grid and then select the menu item.  The sensors will be entered into your grids.

 

Using this method automates the entry of data into these files

 

First select the rows or cells you want to be included in the files tab of the files and alarm form.  Then select Add to Files List.  The select sensors will input into the files grid with default file names and data logging.

 

The best way to use the add to commands is to group status sensors together and add them to the grids you want.  Then group the integer values by selecting sensors that should be stored with each other.  Add Hourly sensors together, add Daily sensors, add OnMin sensors, add Alarm sensors, add Status sensors together.  That way they will be in the grids together for easier viewing.

 

 

clip0177

Modbus form in edit mode, toolbar is shown.  Selected sensors in black.

 

 

clip0178

Modbus toolbar

 

 

Each column can be edited in this mode.  The columns with buttons showing provide default values for that column.  You can type these in or use the combo boxes.  If you type the value in, be sure to type it exactly like the combo box entry.  Case makes a difference.

 

 

EDITING BUTTONS

 

clip0178

Editing toolbar with check, add, insert and delete buttons.

 

 

Check Button: This button checks for errors in your setup.  It checks for name duplicates, communication port differences, RTU, Word, and Bit ordering and other error.  Press this button to see if you have errors in your setup.

 

Add Button: The add button adds a row to the end of the grid.  Add as many rows as needed.

 

Insert Button:  The insert button inserts a row just above the current row.  This is to add sensors that belong in the middle of the grid.

 

Delete Button: The delete button deletes the current row in the grid.  The current row is where the cursor is located or column is selected.

 

 

 

 

TRANSMIT MODBUS SETUP

 

 

The transmit gridModbus Transmit Setup  is where you enter the names and values for data that is sent to the RTUs.  The order the RTU, Word and Bits are the same as the receive grid, from lowest to highest.  The type assigned is also very important.

 

 

 

clip0001_3

The transmit grid showing set points and status numbers being sent to the master RTU.

 

 

The transmit column information is nearly the same as the receive grid.  The transmit grid does not have a format column since the data sent is always an integer.

 

Type: The type is either status or integer.  Status rows require a bit assignment.  Integer values are from –32768 to 32767.  The type does effect the data value transmitted to the remote RTU.

 

 

STATUS SENSORS: Status sensors use the 16 bits in one word.  Each of the bits can be assigned to a different sensor.  The program changes the integer value based on the bit status.  If the bit is on, then the data value will turn that bit on in the word.  If all the bits are off, the data value will be 0.

 

INTEGER SENSORS: Integer assignments normally have a multiplier.  The data value transmitted is an integer value.  The multiplier times the set point equals the data value.  If your set point control has a value of 45.7 and the multiplier is 10, the value sent to the RTU is 457.  If the multiplier is one, the value sent would be 45.

 

BOOT UP: When you close EVENTS and reopen it, the data values in the transmit grid are written to the master RTU.  It your set points are incorrect, you can make a change in this grid and then write all the transmit values by selecting the Edit | Send TX menu item to write the transmit values.

 

 

Note: The transmit values are not resent to the master RTU unless you select the menu item to send them.  Individual transmit values are sent when you enter and exit a set point controls or press a bit button control.