advertisement
from the Forum department...
Problem with S7 and C# (VB) Application
Software, including programming, OS issues, etc. topic
Posted by Emil on 13 September, 2009 - 4:41 pm
Hi there,

I have to develop simple application which will connect to Simatic 300 and receive the data from it (Format data block from screen shot in configuration panel is -> DB29 and length = 32)

Im using for it library libnodave but Im new in this area of knowledge so I have few questions.

1. I made connection to PLC VIA TCP (.opensocket (102.IP))

2. I receive simple data using dc.readybytes(daveDB,29,0,32,buffer) but the results are like some numbers (I believe there are bytes). What I need to do with it know ? I'm trying to encode it using System.Text.Encoding.ASII.getString(buffer) but there is nothing in there...

3. My application has to work all the time, and in each x minutes has to check if the data are from the PLC, which is the best way to do it? Using thread and loop while() is good one ?

4. If I want to receive data from PLC what I need to know ? Do I need to send any information to PLC for start receive data ??

If you have any examples, I will be appreciate.

Regards
Emil


Posted by Ronald Nijssen on 17 December, 2009 - 11:04 pm
Emil,

If I can recommend something then I would purchase a SIMATIC NET S7-lean driver.

Configure the SIMATIC NET OPC Server in your PC and create a S7-connection between the S7-OPC Server in the PC and the PLC.

Then use the "SIMATIC NET OPC Data Control" in your VB application to talk with the OPC Server.

You will have to master OPC and S7 communication, but the VB interface of the OPC ActiveX control is very straight forward. It supports read/write as well as async event notification with almost no coding in your VB application

Kind regards
Ronald Nijssen

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2010 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.


Fortune
"But officer, I was only trying to gain enough speed so I could coast
to the nearest gas station."
Advertise here
Advertisement
our advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive