Hi.
I have a V570 that collects temperature readings and stores those on SD card. PLC itself is connected to local network and so is RaspberryPi that is supposed to work as a web server, that on request grabs that datatable from plc, makes it into nice graph and shows it to client. The thing is that currently when my RP tries to run the test code(below), it says that it is unable to connect to PLC with that unitID. In my PLC settings I have set unitID to 0. When I run same code on my PC, it works like it is supposed to.
Thanks in advance.
using System;
using Unitronics.ComDriver;
namespace RTTest
{
class MainClass
{
static PLC plc;
public static void Main (string[] args){
Ethernet eth = new Ethernet ("192.168.1.190", 20256, EthProtocol.TCP, 3, 3000);
Console.WriteLine(eth.Connected);
try{
plc = PLCFactory.GetPLC(eth, 0);
plc.EventAbortCompleted+=new PLC.AbortCompletedDelegate(plc_EventAbortCompleted);
}catch(Exception e){
eth.Disconnect();
Console.WriteLine ("Error1:"+e.Message+"-->("+e.TargetSite+")"+e.StackTrace+"-->"+e.Source);
}
try{
Console.WriteLine(plc.Version.OPLCModel);
Console.WriteLine (plc.PlcName);
Console.WriteLine(eth.Connected);
Console.WriteLine(plc.UnitId);
}catch(Exception e){
eth.Disconnect();
Console.WriteLine ("Error2:"+e.Message+"-->("+e.TargetSite+")"+e.StackTrace);
}
Console.Read ();
}
public static void plc_EventAbortCompleted(){
Console.WriteLine ("dunno");
}
}
}