I have been engaged in the development of configuration software, but seldom published similar articles. This project has been applied to InTouch of Wonderware. In this project, I need to enable InTouch to issue control commands to write a certain switch value of kepware, in addition, permission control is required. by viewing the InTouch help documentation, InTouch can communicate with kepware and an InTouch project has been created (Please download it from the space) for your reference!
First, a simulated project is created through InTouch: demoapp00001280, which includes three windows: Main screen, permission warning, and pump house. You can also use InTouch to configure the following user information:
Name |
Password |
Accesslevel) |
Administrator |
123 |
9999 |
Demo |
123 |
8000 |
LJ |
123 |
6000 |
Permission Implementation Instructions:
- Add the link button of the pump room to the main screen, double-click the button, and select action binding. When the condition type is left mouse or press the key, enter the script:
If ($ accesslevel> 7500) then show ("Pump Room"); else show ("permission warning"); endif; 2. in step 1, if the permission level is less than 7500, the system will automatically jump to the permission warning page. If (1 = postlogondialog () is bound to the mouse action of the logon button on this page ()) and $ accesslevel> 7500 then show ("Pump Room"); endif; this script is intended to log on again by clicking the button and jump directly to the pump room interface when the permission is greater than 7500, however, after entering the demo user, you need to press the logon interface again to automatically jump to the pump room interface. The reason for my personal analysis is: although the above script runs normally, however, you must click the logon button again to determine the value of accesslevel> 7500. The above implementation only when the user login permission is greater than 7500 can log on to the pump room interface, in order to use the next control function. Control Implementation Instructions: 1. use the kepware configuration project file test. OPF (Please download it from space resources) and configure a readable/writable switch C. d. b2. Add the I/O discrete testbool To The InTouch project and select read/write. When configuring the kepware access name, write the application name to servermain, in this way, the suitelink protocol of InTouch is bound to C. d. number of bswitches. 3. bind the following control script to the control button of the pump room: If (testbool = 0) Then testbool = 1; else testbool = 0; endif; 4. test Control successful: open test through kepware first. OPF, open the pump room window, click the control button, and use the kepware OPC quick
Check whether the value of C. D. B is switched between 0 and 1! If the permission settings are unclear, you can view the Security Information in The InTouch help document. The simulation project is rough. Please forgive me! Http://download.csdn.net/source/3371910 Resources