read string from a web site (https)

Runtime
fleaplc
2019-07-30
2019-08-08
  • fleaplc

    fleaplc - 2019-07-30

    Is there a FB (OSCAT maybe?) I can use to read the content of a web page (https)?.
    I need to extract some value from a website
    Thanks
    Flea

     
  • fleaplc

    fleaplc - 2019-07-31

    thanks for suggestion, I've tried with the sample from 3s but it cannot make it work..all the times I get error.. Does anyone use it recently? (ps. I've tested with http and https both)

     
  • e.kislov

    e.kislov - 2019-07-31

    fleaplc hat geschrieben:
    thanks for suggestion, I've tried with the sample from 3s but it cannot make it work..all the times I get error.. Does anyone use it recently? (ps. I've tested with http and https both)

    How you tested it, maybe in simulation? It does not work this way, you should use real PLC or CODESYS Control Win V3 (soft-plc).

     
  • fleaplc

    fleaplc - 2019-08-02

    I've tested using Control Win3. I get TCP read error every time

     
  • e.kislov

    e.kislov - 2019-08-02

    For me it works without problems...
    You need to check your network settings, maybe you have problem with routing of packets.

    IMG: 02

     
  • fleaplc

    fleaplc - 2019-08-08

    Hi Kislov,
    you're right, it was an issue on my connection, Now I can get the done from FB. Just one question: I've like to get in string format the content of web page but I get only this:

    I've expected something like this (as if I get the "save as" page from web browser) it isn't?

    <!DOCTYPE html>
    <html lang="de"><head>
    <title>Online-measurement of the mains frequency</title>
    <meta charset="utf-8">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta name="description" content="Measurement of the utility frequency (line/grid frequency) of the european grid">
    <meta name="author" content="Thomas Gobmaier">
    <meta name="keywords" content="line frequency, grid frequency, mains frequency, power frequency, 50 Hz, 50Hz, UCTE, ENTSO, ENTSO-E, PRIMARY CONTROL">
    <link rel="apple-touch-icon" sizes="76x76" href="https://www.mainsfrequency.com/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="https://www.mainsfrequency.com/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="https://www.mainsfrequency.com/favicon-16x16.png">
    <link rel="manifest" href="https://www.mainsfrequency.com/site.webmanifest">
    <link rel="mask-icon" href="https://www.mainsfrequency.com/safari-pinned-tab.svg" color="#5bbad5">
    <meta name="msapplication-TileColor" content="#da532c">
    <meta name="theme-color" content="#ffffff">
    <link href="Online-measurement%20of%20the%20mains%20frequency_files/webstyle_3.css" rel="stylesheet" type="text/css" media="screen">
    <!--[if IE]><script type="text/javascript" src="./excanvas.min.js"></script><![endif]-->
    <script type="text/javascript" async="" src="Online-measurement%20of%20the%20mains%20frequency_files/ga.js"></script><script language="JavaScript" type="text/javascript">    
        var req=0;    
        var url0 = "https://netzfrequenzmessung.de:9080/frequenz01.xml";
       var pfeil_pos=1;   
        var frequenz = 0.0;
        var frequenzAlt= 50.2;
        var frequenzDelta= 0.0;
        var frequenzPos= 50.2;   
       var masse=5.0;
       var feder=75;
       var daempfung=3.0;
       var beschl=0;
       var geschwindigkeit=0;
       var frequenzLinPol=50.2;
       var phasenwinkel = 0.0;
       var phasenwinkelAlt = 0.0;
       var phasenwinkelDelta = 0.0;
       var RL=0.0;
       var RLAlt= 0.0;
        var RLDelta= 0.0;
        var RLPos= 0.0;
       var pfeil_RL=1;
       var gf, gm, gms;   
       var ergebnis ="ab";
       var sperr=false;
       
       var Winkel = -0.001;   
       var phasenwinkeltext = "  0";
       var size=20;
       
    

    IMG: CODESYSControlService_2pIaZ1r1D8.png

     

Log in to post a comment.