Zuviel Werbung? - > Hier kostenlos beim SPS-Forum registrieren

Ergebnis 1 bis 2 von 2

Thema: Help with s7 and C# application

  1. #1
    Registriert seit
    Erhielt 0 Danke für 0 Beiträge


    Zuviel Werbung?
    -> Hier kostenlos registrieren
    Hi there,

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

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

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

    2. I recieve simple data using dc.readybytes(daveDB,29,0,32,buffer) but the resoults are like some numbers ( I believe there are bytes). What I need to do with it know ? Im trying to encode it using System.Text.Encoding.ASII.getString(buffe) 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 recieve data from PLC what I need to know ? Do I need to send any information to PLC for start recieve data ??

    Please help.

    Zitieren Zitieren Help with s7 and C# application  

  2. #2
    Registriert seit
    Erhielt 2.046 Danke für 1.627 Beiträge


    Zuviel Werbung?
    -> Hier kostenlos registrieren
    2. the library have some functions, also the function getbyte or getreal ... you have to know, what type the value have you want to get ...

    3. do never use a loop for this stuff. set a timer with 60s ... you will find some help here:

    Timer t1 = new Timer(); // make a timer
    t1.Interval = 100; // set the time, here 100ms
    t1.Tick+=new EventHandler(t1_Tick); // set the thread
    t1.Start(); // start the timer
    void t1_Tick(object sender, EventArgs e)
    // this code will be execute every timer tick
    4.you have to open the connection and send (with the right function, s.a. 2., the position) to get the data ...

    ... the libnodave library involved a .net, i think a c# sample ... just read it
    Ironie setzt Intelligenz beim Empfänger voraus.

Ähnliche Themen

  1. Antworten: 0
    Letzter Beitrag: 20.11.2009, 18:25
  2. Fremd Application starten
    Von Farinin im Forum HMI
    Antworten: 5
    Letzter Beitrag: 04.12.2008, 13:43
  3. Antworten: 0
    Letzter Beitrag: 07.02.2008, 22:48



  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein