Turn LED on and Off using a LOGO!

My end goal is this:

I want to program a counter in the Arduino IDE. this counter is activated by Sensor connected to the Siemens LOGO. and the LOGO and Arduino are connected by Ethernet

as a start I want to program this:

I have a switch connected to the LOGO input and a LED connected to the Arduino. When you flip the switch on the LOGO the LED should turn on. I Tried everything in the past week but I can’t get it working, must say I am completely new to Arduino.

this is my code:

#include <Settimino.h>
#include <Dhcp.h>
#include <Dns.h>
#include <SPI.h>
#include <Ethernet.h>

#include <EthernetClient.h>
#include <EthernetServer.h>
#include <EthernetUdp.h>

byte ip [] = { 192, 168, 200, 001 };                                       // Arduino  ip 

const int LOGOingang1 = (S7AreaDB, 1, 1024.0, 8);
const int ledPin = 5;

void setup() {
// put your setup code here, to run once:

pinMode(LOGOingang1, INPUT);
pinMode(5, OUTPUT);

void loop()
// put your main code here, to run repeatedly:


if (S7AreaDB, 1, 1024.0, 8 == LOW);
digitalWrite(5, HIGH);


I figured I may need to make some sort of a IP connection before: const int LOGOingang1 = (S7AreaDB, 1, 1024.0, 8);

but I don’t know how, any help is welcome,


Can you say what a Siemens LOGO actually is and provide a link to it.

A Siemens LOGO is a very simple and relatively cheap PLC

I will ask a modrator to move this to the
Interfacing w/ Software on the Computer
section of the forum some one might know about PLCs

const int LOGOingang1 = (S7AreaDB, 1, 1024.0, 8);

What is that nonsense?