CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Sat Oct 19, 2019 3:43 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Tue Jul 30, 2019 4:06 pm 
Offline
User avatar

Joined: Wed Mar 09, 2016 1:20 pm
Posts: 33
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


Top
   
PostPosted: Tue Jul 30, 2019 5:59 pm 
Offline
Frequent User
Frequent User

Joined: Thu Mar 17, 2016 1:24 pm
Posts: 188
check this example:
https://store.codesys.com/http-client-example.html

_________________
Make CODESYS great again


Top
   
PostPosted: Wed Jul 31, 2019 8:56 am 
Offline
User avatar

Joined: Wed Mar 09, 2016 1:20 pm
Posts: 33
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)


Top
   
PostPosted: Wed Jul 31, 2019 3:09 pm 
Offline
Frequent User
Frequent User

Joined: Thu Mar 17, 2016 1:24 pm
Posts: 188
fleaplc wrote:
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).

_________________
Make CODESYS great again


Top
   
PostPosted: Fri Aug 02, 2019 10:07 am 
Offline
User avatar

Joined: Wed Mar 09, 2016 1:20 pm
Posts: 33
I've tested using Control Win3. I get TCP read error every time


Top
   
PostPosted: Fri Aug 02, 2019 10:30 am 
Offline
Frequent User
Frequent User

Joined: Thu Mar 17, 2016 1:24 pm
Posts: 188
For me it works without problems...
You need to check your network settings, maybe you have problem with routing of packets.

Attachment:
02-08-2019 12-29-19.png


You do not have the required permissions to view the files attached to this post.

_________________
Make CODESYS great again


Top
   
PostPosted: Thu Aug 08, 2019 10:29 am 
Offline
User avatar

Joined: Wed Mar 09, 2016 1:20 pm
Posts: 33
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:
Attachment:
CODESYSControlService_2pIaZ1r1D8.png


I've expected something like this (as if I get the "save as" page from web browser) it isn't?
Code:
<!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;
   


You do not have the required permissions to view the files attached to this post.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 7 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited