Professional Documents
Culture Documents
Copyright 2010, Whzan. All rights reserved. No part of this document may be reproduced or transmitted, in any form or by any means, without the prior written permission from Solcom Limited.
Prerequisites
To start this you will need the following: 1) An Allen Bradley (Modbus) PLC, in this example we are going to use a MicroLogix 1500. 2) PLC programming software, we are using RSLogix 500 from Rockwell Automation. 3) A Windows XP or later PC with internet access and connection to your device or emulator.
Whzan 2010
Page 2
Its all the normal stuff, you will have to provide a valid email as its used to activate your account. The country is needed for VAT purposes and you must accept our terms and conditions in order to proceed. There is no charge for the Beta period, or for the free trial. Once you have registered with a username and password, wait for the email to arrive with a link to activate your account.
Whzan 2010
Page 3
1) Launch the RSLogix 500 software. 2) Choose the controller type you have. In the example we have a Micrologix 1500 LSP. 3) Connect to the PLC. In the example we use RSLinx.
Whzan 2010
Page 4
4) Select Controller Channel Configuration and set the driver to Modbus RTU Slave. Set the file numbers for Coils, Contacts, Input Registers and Holding Registers. The screen would look something like the one below:
Whzan 2010
Page 5
5) Use the memory addresses contained within the files entered in step 4 in your PLC application. The screen would look like that below:
Once complete, write this program to the PLC controller and start it in run mode.
Whzan 2010
Page 6
Click on the link to download the Gateway and follow the instruction process, we havent listed every step here as its self-explanatory and may be subject to change (as is the Shop format). The installation program will be digitally signed by Solcom Limited to ensure that it has not been tampered with. The installation has two components, this is necessary so that the Gateway program can run without any person being logged in to Windows. Part 1) a Windows service program that runs in the background. It connects to the PLC and to Whzan. Periodically it checks Whzan to see if there have been any changes in Whzan data that is linked to the Gateway, if there are the PLC will be updated. It also periodically checks the PLC to see if anything has changed and will update Whzan accordingly. Being a Windows service, it will start
Whzan 2010
Page 7
when the PC powers up and normally run until it shuts down. There is nothing to see or change with the service as this is defined in the second part below. Part 2) a Gateway Manager program, this is used to tell the service what data to read/write and how that data maps to datapoints in Whzan. The manager need only run to set the system up, but you can leave it in the notification area and it will give you status updates.
Whzan 2010
Page 8
Whzan 2010
Page 9
Once you have permitted access, return back to the Gateway Manager and it will check that it has permission to access and update data within your account. Thats all of the administration done; now as you tell the Gateway Manager about new data it will be created within Whzan where you can use it in both graphics and displays.
Whzan 2010
Page 10
This brings up the screen where we get to define a Modbus Device. Note that you can have more than one device connected. So when you have added a new device use the right hand property fields to update the information about it. Ensure that the device name is appropriate as there will be a status datapoint created within Whzan.
Whzan 2010
Page 11
The initial screen format is shown below. Give the new device a name and description.
Select the required interface type (serial transmission protocol is the default) and enter your interface parameters. For this demo also make the device read/write.
Whzan 2010
Page 12
After setting up the device as described, the screen should look like this:
Notice that the tree view of the Device has two entries, from Device and to Device. These refer to data exchanges from the Device to Whzan and vice versa. Note that these disappear if you make the device read only. Right click the from Device branch and select the option to add a new numeric datapoint to get to the screen shown below:
Whzan 2010
Page 13
This brings up the screen where we get to add real datapoints mapped to the controller. Note that you can have more than one device connected. So if you add a new device use the right hand property fields to update the information about it. Ensure that the device name is appropriate as there will be a status datapoint created within Whzan. Using the properties fields update the datapoint information, the fields are described in the dialogue. Be sure to construct a naming convention before embarking as good naming will help as your system grows. For the demonstration we suggest you read an Output Holding Register with an address offset of zero (0) into a Whzan numeric datapoint called FromOHR000 and another FromOHR001 with address offset of one (1), see below:
Whzan 2010
Page 14
Notes: Some devices will use or show offsets as hexadecimal, Whzan just uses decimal. Also offsets can be shown with a real address rather than an offset, whereas Whzan will refer to the OHR as starting from 0. If you want to get individual bits from the device, the Whzan gateway permits you to select individual bits from an Ethernet word for Whzan Boolean datapoints and a bit range for Whzan numeric datapoints. So a Boolean in Whzan might come from OHR 15 bit 7 for example or a numeric come from OHR 26 bits 4 10. More than one Whzan Datapoint can use the same device address location. Finally the Gateway manager permits the application of a linear calibration to the data in the form of y = mx + c for numeric data types. It is important to set the Whzan Min and Max values to the maximum possible range because Whzan implements these limits across the system.
Whzan 2010
Page 15
Defining datapoints that are updated in the other direction uses a very similar process but using the To Device tree. For test purposes I have defined the following: Direction Whzan Datapoint Name Offset Bit(s) Scale Factor Offset 0 1 0 1 0-15 0-15 0-15 0-15 1 1 1 1 0 0 0 0
Note that with that with this arrangement anything we output will be read back.
Similarly using other registers in the Modbus device is just a matter of selecting the appropriate table. Above shows the view of our tree populated with the four datapoints.
Whzan 2010
Page 16
Whzan 2010
Page 17
Update the new mimic properties, i.e. give it a name and description then click edit. You will start off with a blank page.
Whzan 2010
Page 18
Using the Text tool, drag-out a text object. You will see the text Enter your text here, this is for fixed text items, you can change it to say FromOHR000 to keep track of the text, but we want the value displayed to come from the Device. Update the font size to 18 or so to make it clearer.
Whzan 2010
Page 19
We entered the text FromOHR000 and then clicked on the orange binding button to the right of the text field in the Text Properties section; you will see a screen like that below:
In this case we want to display the numeric datapoint the system will read from the Output Holding Register location 0 as a text string so click the String from numeric tab and select our datapoint with name ending FromOHR000 from the list using the Insert Datapoint button.
Whzan 2010
Page 20
Click OK to complete the data binding and return to the mimic editor screen. Repeat the process (or copy and paste) for FromOHR001 perhaps putting that to the right of the first text field. Remember to update the datapoint name bound to the second text object to the datapoint with name ending FromOHR001.
Whzan 2010
Page 21
Now lets add a control on the mimic to set the Whzan datapoints that will get written to the Output Holding Register locations 0 and 1. These are the datapoints ending in ToOHR000 and ToOHR001. As they are numeric we will use a slider control, these are called Widgets and can be selected with the Widget browser on the left side of the editor.
Whzan 2010
Page 22
In this case we will use a simple linear slider, select the Widget Browser, Category Sliders and click on the Linear Slider as shown below:
Click the Use Now button on the right and return to the Editor.
Whzan 2010
Page 23
The slider will be the selected drawing object on the canvas below the two text objects, so drag out a pair of sliders like this:
Whzan 2010
Page 24
Next we need to be able to set the ToDevice Datapoints from these slider values, so we select the first slider and pick the Datapoint ending ToOHR000 from the property Datapoint To Set on the right.
Whzan 2010
Page 25
Repeat for the other Slider and use the second output Datapoint name ending in ToOHR001. To ensure that we can tell the difference between Datapoints set the slider range maximum to 1000. It should look like this:
Select the Home tab (if its not selected) at the top of the screen and click on the save icon (you might want to save periodically in any case if you have a poor internet connection). Ensure nothing is selected (i.e. click on the blank canvas) and then click the View Live button top right.
Whzan 2010
Page 26
A new window will open and you will see your two sliders with a value (initially they will be 0.00) above them. Now we will go through a sequence to show that things are working. Both at zero:
Move the first slider quickly to the half way (50%) position to change the value being output to the register OHR000. The appearance will at first be this: First slider at 50%
After you release the slider (mouse up) the viewer will send an update to Whzan and the datapoint ToOHR000 will be set to 50 (depending upon your slider position accuracy). On the next refresh cycle (usually 10 seconds) the Modbus Gateway will check Whzan and discover that the value has changed. The updated value will then be written to the Modbus OHR location 0 by the Gateway. The Gateway will subsequently read the same address location and find the updated value mapped to the datapoint FromOHR000 which in turn will get updated in Whzan. The next refresh of the mimic viewer will see the update of the text field on the screen.
Whzan 2010
Page 27
This can be repeated on the second slider, but because the scale is 0 1000 the 50% mark will be 500. The settled state for both at 50% is as follows:
Finally move both sliders to 100% and wait for the input datapoints to catch up.
That covers the basic steps from setting up a PLC through to creating the first mimic with live data. Once confidence has been gained, try using more than one PLC or device, other Whzan graphic shapes and dynamic effects and Whzan Boolean datapoints.
Whzan 2010
Page 28