Sign in to follow this  
Followers 0
Guest GAEvakYD

Acces Siemens S7-315 by VB

5 posts in this topic

Hi, I would like to ask for some information how to take on an problem i have. I received an order to make an PLC program that will generate a lot of testdate. It's a program to test some engines for some hours. One test devided in 8 steps. All steps contains 300 timings of 13 REAL values. So that will be 13*300= 3900 registers per step, that will give me 8*3900=31200 register to read out for one test cylcy. Above the PLC program i must program an application in VB to display some information of the test process and read out all the 31200 registers. After that there must be generated an CSV file with all the testinformation. The whole process has the following requirements: -PLC 315 2DP. -Connection by CP5611 card for MPI or Profibus -HMI application made in VB 6.0 So i searched for some hours/days for the best option i've to load that bulk of data. The following options i found: -Use Siemens OPC server and use the ActiveX control made by Siemens to read out the values on the OPC server. -Use the last version of Prodave and acces the data directly on the port. The first option i tried out but the ActiveX control made by siemens doesn't work fine. I can't read out data of my own OPC server, the component will not change the node. Siemens has entered an example test OPC server. When i tried to enter my own OPC server (by browse, so it's a valid OPC server found on the local machine)the OPC Server name doesn't changed from teh default name. . Otherwise i would like to know if it's possible in OPC to receive data on event instead by a update rate. You will understand i doesn't want to update the testdata on a defined updaterate. I would like to update the data when a boolean register is changed to TRUE, so i know the test is complete. The second option is to use Siemens Prodave and program directly to the port. The only problem is that i could not test that program before i buy it. I only have the 5.0 release, and that one doesn't support Windows 2000 or later. I can't find a trial version of it on the internet and Siemens themself doesn't answer their email. If some of you can help me to make the choice or has some interesting hints, i would be very very happy. May be some of you could answer my question of the event based option in Siemens OPC. Greets,

Share this post


Link to post
Share on other sites
I recomend using a CP 341-1 and exploring the native TCP/UDP options. I've done the PLC end of this in the past and interfaced with a java app and a c++ app using only windows COM objects and socket connections. Using the Passive Fetch/Write mode you don't even have to have the PLC running to read/write data. I've attached a (somewhat buggy) VB Fetch/Write example and I'll follow with a quick post with a send/recieve VB demo. fchwrtdemo.zip

Share this post


Link to post
Share on other sites
Here's the Send/Recieve demo. This requires some code in the PLC and lets the PLC control the communication as opposed the Fetch/Write where no PLC code is needed but the Application needs to control the comunication. SendRecvDemo.ZIP

Share this post


Link to post
Share on other sites
Here's a link to the S7 CP 343-1 Manual Look on page 7 (A-7) for links to other useful manuals.

Share this post


Link to post
Share on other sites
Were are using VB6.0 on Siemens S7 318 via ethernet with 343-1 card in the PLC. Parijat has a S7 driver (ActiveX). It comes with a demo and we connected right away with S7. The demo has a few bugs in it but the read portion worked ok. Lance

Share this post


Link to post
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
Sign in to follow this  
Followers 0