Jump to content

hullumajahull

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by hullumajahull

  1. 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");
    		}
    	}
    }
    
  2. I am trying to display a graph on webpage. I use Highgraph libraries to draw it. But highgraph needs a table in javascript to get the information about how graph looks, its labels and its values and such. It works perfectly, when I run it on my computer but if it is displayed by plc it doesn't work.

    In general, the compiler doesn't check the Java script code but only the HTML part.

    What exactly are you trying to do? 

  3. Hi

    I have Unitronics V570 controlling my home's central heating system and I would like to make a webpage, that I can visit on my computer to see values from controller. But the thing is that I want to have a line graph to show temperatures from the past measurements. I have no clue on how to do so, because as far as I understand, you can't get values from data table(which probably will be stored on SD card) to your webpage, you can only get things like MIs and MBs and such. Only way I have figured out to get said graphs is to download data table from controller to computer and then do some magic, but that is not the solution I am looking for.

     

    Other question I have is how to connect Arduino board to PLC in a way, that I can get values from PLC's MIs to Arduino.I want to have remote temperature controller in other room with small screen. Can I somehow send serial values from PLC to Arduino or do I need CanBUS module for my Arduino?

     

    Thanks in advance.

×
×
  • Create New...