KingSCADA Quick Start Manual – How to collect data from devices 

KingSCADA Quick Start Manual – How to collect data from devices IOServer is a data collection application that can collect data from hardware devices like PLCs, Modules, Instruments, etc. It can also collect data from other 3rd‐party applications through an OPC interface. Fig.1 IOServer Application IOServer can be installed with KingSCADA, and the installation package can be downloaded from our website (www.icpdas‐usa.com). After installing KingSCADA, you can find the IOServer folder in the “Start Menu” on your system. See Fig. 2. Fig.2 Find IOServer in Start Menu 1/12
Create a new project using IOServer Step1: Create new IOServer in IOServer Open the IOServer program by clicking on Start Menu‐> KingSCADA ‐> IOServer ‐> KingIOServer. Create a new project by clicking on the “New” button found on the tool bar. Drivers that were not installed along with IOServer can be set up here by clicking on the “DriverSetUp” button on the tool bar. “Monitor” is used to monitor the data collection status while IOServer is running. See Fig.3. Fig.3 IOServer Development Environment Create a new IOServer by filling in the settings as: (See Fig.4) Name: “IOServer1”; Location: “C:\Program Files\KingSCADA\My Projects\”; Type: “IOServer From Driver”. Click OK. Fig.4 IOServer Development Environment Note: 1. After creating the new IOServer project, click "Project‐'IOServer1'" in the Device Tree on the left of the interface to check its properties. 2. To modify these properties by right clicking "Project‐'IOServer1'" and selecting "Edit". See Fig.5. Fig.5 IOServer Project Properties Step2: Create new channel in IOServer 2/12
Right click "Project‐'IOServer1'" and select "New Channel..." to create a new channel as Fig. 6 shown. Fig.6 Create New Channel‐1 Fig.7 Create New Channel‐2 Fig.8 Create New Channel‐3 1.
2.
3.
4.
Enter "Channel1" as the Channel Name. See Fig.7; Click the “Device Driver” drop down list and select "ModbusMaster" for example. See Fig.8; The Channel Type is “IOServer From Driver”. Follow the steps to set channel connection timeout, serial port settings, and click “FINISH” as shown in Fig.9, Fig.10, and Fig.11. Fig.9 Create New Channel‐4 Fig.10 Create New Channel‐5 Fig.11 Create New Channel‐6 Note1: 1. After creating the channel, click "Channel1" in the Device Tree to check its properties. 2. To modify these properties by right clicking on "Channel1" and selecting "Edit". Note2: Not all drivers are installed together with IOServer, contact with our technical support to get the drivers that are required, and install the drivers through "DriverSetup" by clicking the button on the toolbar as shown in Fig.3. 1. Open the “Driver Setup For IOServer” window by clicking on the button “DriverSetup” on the toolbar of the IOServer development environment; See Fig.12. 2. Select the driver (*.dll) file on the hard drive, click Open to add this file in to Driver Setup tool, the information of this driver can be shown in the table of “Drivers included in the diver file.” See Fig.13. 3. Click Install to setup this file 4. Click OK to close this tool 3/12
5. “Uninstall” can be used to uninstall a selected driver in the “Driver list in IOServer” table. Fig.12 Driver Setup For IOServer Window Fig.13 Choose the Driver File (*.dll) to Install Step3: Create a new device in the Channel Right click "Channel1" and select "New Device..." to create a new device. See Fig. 14. 1. Enter "Device1" as the Device Name. See Fig.15. 2. Click the drop down list of "Device Series" and select "ModbusTCP." See Fig.15. 3. The “Device Address” of ModbusTCP should be formatted as “Host IP”+ “:” + “Port Number”+ space +”Unit Number”, enter “192.168.1.85:502 1” as shown in Fig.16. 4. Follow the steps to set Recovery Interval and Recovery Time as shown in Fig.17, and click “FINISH” as shown in Fig.18. Fig.14 Create New Device‐1 Fig.15 Create New Device‐2 Fig.16 Create New Device‐3 Note: 1. After creating the device, click "Device1" in the Device Tree to see its properties. 4/12
2. To modify these properties by right clicking on "Device1" and selecting "Edit". Fig.17 Create New Device‐4 Fig.18 Create New Device‐5 Step4: Create a datablock Right click "Device1", and select "New Block..." to create a data block, or right click on the tab titled "Channel1.Device1" and select "New Block...” See Fig.19. 1. Create a new data block, and fill in the settings as follows: (See Fig.20) Block Name: DB0; Register: 4; Fig.19 Create New Data Block‐1 Datatype: BYTE; Address From: 1~100 (Start from 1); Collect Interval: 1000ms. 2. Create one more data block, and fill in the settings as follows: (See Fig.21) Block Name: DB1; Register: 1; Datatype: BYTE; Address From: 1~100 (Start from 1); Collect Interval: 500ms. Fig.20 Create New Data Block‐2 Note: To modify the settings of the data block by double clicking its row in the table of “Channel1.Device1”. Additional: Create a channel named “Channel2” using the simulator driver and use different port from "Channel1". See Fig.22 and Fig.23. Fig.21 Create New Data Block‐3
5/12
Fig.22 Create a Simulator Channel‐1 Fig.23 Create a Simulator Channel‐2
1. Create a device for "Channel2", enter "Simulator1" as the device name, and choose "Simulate PLC" for the "Device Series". See Fig.24. 2. Enter any number as the device address. See Fig.25. Fig.24 Create a Simulator Device‐1 Fig.25 Create a Simulator Device‐2 3. Create a data block named “DB0”, and select the “INCREA” register with data type “SHORT”. Define the address range from 0~100. Register “INCREA” can simulate values increasing automatically from 0 to the number entered in the box of register address. For example, register “INCREA100” can automatically increase from 0 to 100. See Fig.26. 4. Create a data block named “DB1”, and select the “RADOM” register with data type “SHORT”. Define the address range as 0 to 100. Register “RADOM” can simulate values changing randomly in the range of 0 to the number entered in the box of register address. For example, register “RADOM100” can randomly change in the range of 0 ~100. See Fig.27. 6/12
Fig.26 Create a Data Block‐1 Fig.27 Create a Data Block‐2 An IOServer project has now been created. Close the development environment and minimize it in the taskbar as shown in Fig. 28. Fig.28 IOServer Minimized in Taskbar Create a new project in KingSCADA to connect with IOServer Step1: Create a new project in KingSCADA Open KMaker to create a new project named "CollectDataFromIOServer". Note: Refer to the details in <KingSCADA_Quick_Start_Manual‐1>. Step2: Create a IOServer connection in the project Click "IOServer" in the Solution Explorer, and then click on "New" at the top left corner of the Content Display Area, or right click the Content Display Area to popup the configuration window ‐ “New IOServer”. See Fig.29. 1. Enter a name ‐ "ConnectWithIOServer1"; 2. Fill in the IP Address and Port consistent with IOServer, enter "127.0.0.1" as IP Address, and enter “12380” as Port; Fig.30 Create IOServer Connection in KingSCADA 3. Click "OK" to finish the configuration. See Fig.31. Note: 1. Check "Auto start IOServer Project" to start the IOServer project automatically when the system boots up. 2. Check "Use Double‐IOServer Hotstandby" to configure the hot standby IOServer. Fig.31 Configure IOServer Connection 7/12
Step3: Create I/O tags Expand "Database" and click "Tag Dictionary", and use the “New” button at the top left of the “Content Display Area”, or right click any tag in the list to create new tag. Create an I/O integer tag named "Temperature1". 1. Enter tag name “Temperature1”, and select Data Type “IOInt32” in the drop‐list. See Fig.32. 2. In General page, settings for this tag can be changed as needed. For example, set the Max Value to limit the maximum value of “Temperature1.” See Fig.33. Fig.32 I/O Tag “Temperature1” Settings‐1 Fig.33 I/O Tag “Temperature1” Settings‐2 3. In the IO page, choose access name by clicking the button “…”, and select the device “Simulator1” in the list of the IOServer connection shown in Fig.35, and click OK; Choose Data Block “DB0” by clicking from the drop‐down list as shown in Fig.36; Select Item “INCREA”, and enter “100” as the address of the INCREA register for this tag, so that tag “Temperature1” will increase from 0 to 100 automatically in runtime; Select Data type as “Short”, and enter “100” as the Max Raw Value, to give a limit of the value it will get from the device, also it can be used for scaling the real value and the tag’s value. Click OK to finish the definition. See Fig.37. Fig.34 I/O Tag “Temperature1” Settings‐3 Fig.35 I/O Tag “Temperature1” Settings‐4 8/12
Fig.36 I/O Tag “Temperature1” Settings‐5 Fig.35 I/O Tag “Temperature1” Settings‐6 Fig.37 I/O Tag “Temperature1” Settings‐5 Fig.38 I/O Tag “Pressure1” Settings Create another I/O integer tag named "Pressure1". Follow the same steps as you did when you created tag “Temperatrue1”, but change the data block to be “DB1”, and Item to be “RADOM100”, and click OK. Create a discrete I/O tag named "Switch". Choose “Device1” in the list of the IOServer connection shown in Fig.35 and click OK. Select data block “DB1” and select register “1” as the Item, add the register address “00001”. Click OK. See Fig.40. Fig.39 I/O Tag “Switch” Settings‐1
9/12
Fig.40 I/O Tag “Switch” Settings‐2
Step4: Create a picture to display the value of the I/O tags Create a picture named "TemperatureAndPressure." See Fig.41. Fig.41 Create a Picture in KMaker Fig.42 Select a Genius from the Library After creating the picture, click the button
on the toolbar in Graphy Editor, and select a genius named “PressureMeter” under the folder of “Meter” in the genius library, and click OK. See Fig.42. Select the genius on the picture, and click on the “Links” tab on the right side of the Graphy Editor. Click the button “…” on the right of the link “RotationAngle”, and select tag “Pressure1”. Click OK. See Fig.43. Insert another genius named “Temperature Gauge” under the folder of “Sign” in the genius library. Select the genius on the picture, and click on the “Links” tab on the right side of the Graphy Editor. Click the button “…” on the right of the link “Value”, and select tag “Temperature1”. Click OK. See Fig.44. Fig.43 Configure the Genius on the Picture‐1
Fig.44 Configure the Genius on the Picture‐2
10/12
Insert a text “Pressure: # Pa” on the picture, and double click it. Add an “AnalogOutPut” animation, and select the tag “\\local\Pressure1” as the expression of the animation. See Fig.45. Fig.45 Configure the Animation of Text‐1 Insert the text “Temperature: # °C” on the picture, and double click it. Add an “AnalogOutPut” animation, and select the tag “\\local\Temperature1” as the expression of the animation. See Fig.46. Fig.46 Configure the Animation of Text‐2 Step5: Save and run the project To save the changes to the picture in Graphy Editor, click on the “Save” icon on the tool bar, then go to KMaker. Set the picture as the default picture in the View Setting in the KMaker solution explorer. See Fig.47. To start IOServer, simply open IOServer, and click on the Start button on the tool bar to start collecting data from devices. See Fig.48. Fig. 47 View Setting (Main Picture Setting)
11/12
Fig. 48 Start IOServer Collection
Run the project by clicking button on the tool bar in KMaker or in Graphy Editor.
Additional1: Run IOMonitor to Supervise the Collection Status After KingSCADA and IOServer running, open IOMonitor by clicking button “Monitor” on the tool bar in IOServer, and the information of the devices and data blocks can be seen as a table shown in Fig.49. Fig. 49 IOMonitor Display‐1 Click “Start” on the tool bar, and the collection performance information will be shown at the bottom of the window. See Fig.50. Fig. 50 IOMonitor Display‐2 Additional: Create IOServer from OPCServer To create a IOServer collecting data from devices or applications through OPC, select IOServer type as “IOServer From OPC”. See Fig.51. Follow the step, and select an OPC server on local PC or on a network PC. See Fig.52. Fig.51 IOServer from OPCServer‐1
Fig.52 IOServer from OPCServer‐2
12/12