-Menü

Beiträge anzeigen

Dieser Abschnitt erlaubt es Ihnen, alle Beiträge anzusehen, die von diesem Mitglied geschrieben wurden. Beachten Sie, dass Sie nur Beiträge sehen können, die in Teilen des Forums geschrieben wurden, auf die Sie aktuell Zugriff haben.

Beiträge anzeigen-Menü

Beiträge - david

#1
You can use FB_WritePersistentData to save the persistent date when you want.
https://infosys.beckhoff.com/content/1033/tcplclib_tc2_utilities/27021597799291531.html?id=5635085685218319233
#2
Because of all the problems with the weather blocks: not supported, no free accounts, especially change of data, or only json...
I decided it would be much easier to use node-red to get the weather data and to send it to the PLC via spidercontrol web variables.
There are several nodes for different weather providers (openweathermap, darksky...)
Attached an example node-red flow where I get the weather data from DarkSky and send it to my Phoenix Contact plc. I keep using the Oscat_Yahoo struct inside the PLC (set as PDD), so in the plc I only had to disable the Yahoo weather function block call.

[gelöscht durch Administrator]
#3
I wanted to have an easy, fast and secure acces to the webvisit visualisation at home from my mobile.
I dit it with the aid of apache reverse proxy running on a raspberry pi.
https://github.com/daviddhauwe/webs
#4
Modulentwicklung / Energy datalogger emoncms.org
25. September 2018, 21:04:19
Hi, I found the DLOG blocks very usefull. I made one for emoncms.org, a datalogging and visualisation system (including app) for energy consumption from openenergymonitor.org. Unfortunatelly not free any more to use their servers, but you can install the software on a raspberry pi.
I also made a UDINT logger block. Exports from pcworx are included.

[gelöscht durch Administrator]
#5
I had a quick look at the protocol description, it does not seem to difficult to implement, one just needs time... On the other hand, how data is send is not defined, so we should find a way how to implement this generic format in the plc.
#6
Modulentwicklung / Re: Situation Wetter Bausteine
30. November 2017, 22:01:17
Since this morning, yahoo weather is again not working.
I changed HTTP_GET.MODE from 2 -> 0 (http/1.0) and it works again...

#7
Hi peewit, some time ago, I also found out that yahoo changed something, wich makes it does not work any more since 1 september.
I modified the FB to do the call in 3 times:
Zitat von: david in 28. September 2017, 20:43:36
#8
Can any body of the developpers explain how is the development of the source code organised for the different platforms?
For each FB, there is code that is identical, some have minor changes, some is completely different. How is this maintained? Is it a pure manual job, is there some kind of sourc code control system involved? Is there some conversion tool?
How is the documentation done?
I am interessed because I face the same problem: I need to convert/develop a specific library for pcworx and twincat.

Any help is apreciated
#9
Modulentwicklung / Re: Situation Wetter Bausteine
28. September 2017, 20:43:36
Again, Yahoo Weather is not working correct any more. Since the last modification, the request was split in 2 parts. Since 1 september, part 2 is about 4500 bytes, giving a network buffer overflow.
I've split it up in 3 parts (pcworx export attached)
Teil 1: http://query.yahooapis.com/v1/public/yql?q=select%20units,wind,atmosphere,astronomy,location%20from%20weather.forecast%20where%20woeid=551801%20and%20u=%27c%27
Teil 2: http://query.yahooapis.com/v1/public/yql?q=select%20item.lat,item.long,item.condition%20from%20weather.forecast%20where%20woeid=551801%20and%20u=%27c%
Teil 3: http://query.yahooapis.com/v1/public/yql?q=select%20item.forecast%20from%20weather.forecast%20where%20woeid=551801%20and%20u=%27c%27

[gelöscht durch Administrator]
#10
Bisst du sicher dass es kein DNS problem ist? Probiere mall mit die ip adress vom NAS.
#11
I've added Dutch translations for days and months. Also Belgian official hollidays in Dutch, French and German.
Attatched the export files for pcworx.
Following types must be changed to ARRAY [1..4]: oscat_MONTHS, oscat_MONTHS3, oscat_WEEKDAYS, oscat_WEEKDAYS2   
oscat_LOCATION_ELEMENTS   : ARRAY [1..7] OF INT;

[gelöscht durch Administrator]
#12
Thanks!

I created Dutch translations for yahoo and world weather, pcworx export attached.

[gelöscht durch Administrator]
#13
The night calculation is true for one scan on startup of the plc.
The night calculation must be moved after the 'run once per day' calculations
#14
I agree that a new release of the netlib would be a good sign.
"wir als kleines team": it would be good to have this team described on the 'impressum'
Also an idea: how can somebody cooperate/share improvements: the best would be that there is a procedure describing how this can be done.

For the rest: nothing but thanks for the massive work that oscat has done to create this library!

David

#15
oscat.lib fuer PC WorX/MULTIPROG / Re: Date_Add
30. Januar 2014, 11:22:52
Mit negative Täge geht's nicht auf PcWorx, da DATE_ADD UDINT ist (kein DATE datatyp)
Hier meine Lösung:

day := D + W * 7;
IF day >= 0 THEN
    DATE_ADD := IDATE + INT_TO_UDINT(day) * UDINT#86400;
ELSE
    DATE_ADD := IDATE - INT_TO_UDINT(ABS(day)) * UDINT#86400;
END_IF;
yr := Y + YEAR_OF_DATE(DATE_ADD);
mo := M + MONTH_OF_DATE(DATE_ADD);
dm := DAY_OF_MONTH(DATE_ADD);
WHILE mo > 12 DO
   mo := mo - 12;
   yr := yr + 1;
END_WHILE;
WHILE mo < 1 DO
   mo := mo + 12;
   yr := yr - 1;
END_WHILE;
DATE_ADD := SET_DATE(yr, mo, dm);