Jump to content

V350-35-T2 data export SQL


Recommended Posts

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. :)

Link to comment
Share on other sites

  • MVP 2014

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.

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.