Jonas Posted February 28, 2012 Report Posted February 28, 2012 Hello, I have a Project with V350-35-T2 at my university. The idea of the project is to develop web app which shows unitronics PLC's data in graphs, charts in one web page. There were no questions if I could use advanced web server with SD card. However, PLC contains written usable program and I can‘t rewrite it all to the webserver template, so : 1. Is there any way to create advanced webserver without rewriting all existing program to the advanced server template? 2. Are there any some kind of tools or ways easily to copy existing PLC program to webserver template? Furthermore, I am using simple web service on V350 PLC at the moment. I need to read it's data once in 3-10seconds to SQL db.. I easily connect to its *.html file as example 'http://10.2.2.56:1233/001.html'. In that *.html source code all the data is generated with JavaScript , for example '...var V =new Array('0','0','0')...' so I can read that data with PHP functions and then place it to SQL.. Could You tell me: 3. Is there an easier way to read that data to SQL? 4. Is it possible that PLC without SD card has got some *.XML directory where I could easily connect and read all dynamic data written? I looking for the reply and thanks for your patience.
MVP 2014 Simon Posted February 28, 2012 MVP 2014 Report Posted February 28, 2012 There is an easy way to take your existing program and add it into the webserver app. It is called export/import subroutine and export/Import Displays. These commands are in the "Project" menu and also in the right-click menu when you are browsing subroutines and HMI Displays respectively. There are a few points to watch: 1. The Main Routine can't be exported. TO get around this I usually just create a new subruitine called "copy of main", then use "select all" to select all the nets in the Main Rutine, and copy/paste to the Copy of Main routine. This can then be exported and the process reversed in the new project. 2. Named configurations don't always transfer (for example Modbus or SMS configurations). This is probably only if they are from the Main Roiutine, as the initial copy option suggested above causes the name to change, being appended with a number in brackets (eg Modbus _1 becomes Modbus_1(1) ) 3. If there are HMI or Subroutine calls in the program, check these are properly linked after the export. They may need re-linking. 3. Check that the operands (MB, MI, etc) you use in your program don;t overlap the operands used in the Webserver app. If they do, change them in your program *before* importing the code, otherwise you will end up with a confusing mess. I hope this helps.
DonM Posted March 9, 2012 Report Posted March 9, 2012 3. Is there an easier way to read that data to SQL? I think the best way to do this is to use the UniOPC Server (downloadable from Unitronics website) and an OPC Client which writes data to an SQL server. Google: "OPC Client" OPC Best regards, Don.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now