-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 - jzhvymetal

#1
Modulentwicklung / Re: OSCAT und SQL
18. März 2014, 19:58:40
wmoulton,

I updated my post for version 1.30.  Use link below for the updated code.

http://www.oscat.de/community/index.php/topic,1784.0.html

#2
Codesys 2 / Re: OSCAT Network 121 for CoDeSys V3
18. März 2014, 19:56:16
Updated Network Library 1.30



[gelöscht durch Administrator]
#4
Codesys 2 / OSCAT Network 130 for CoDeSys V3
20. Juni 2012, 03:11:19
Attached is a version of the OSCAT 121 Network and the required OSCAT BASIC 3.33

Made changes to use newer version 3 library SysSocket and SysFile.  All code was tested on CoDesys SoftPLC and Schneider Electric PLC with ehternet and file systems and using SoMachine software.


IP_CONTROL
1. Had to Set option for local address reuse in all network cases
  SysSockSetOption(socket, SOCKET_SOL, SOCKET_SO_REUSEADDR, ADR(dint_true), SIZEOF(dint_true));
2. Had to change NETWORK_BUFFER_LONG_SIZE : UINT := 1999; //Changed from 3999 else socket would not work when reading
3. If PORT is zero use port specified by IP_C.C_PORT.
4. CoDeSys has a bug that does not release the ports on a warm or cold reset.  What this means if you do a reset any function blocks that require binding to the socket to stay open will no longer work.  As of now the only way to clear the port is to recycle the power on the PLC. 


TN_FRAMEWORK
1.  Always Used Port 23. Changed to only use 23 if no port passed via IP_C.PORT

STRING_TO_URL
1.  Moved VAR_TEMP varible to VAR

WORLD_WEATHER_ICON_OSCAT
1.  Put [] around dat intial values

YAHOO_WEATHER_ICON_OSCAT
1.  Put [] around dat intial values

MB_SERVER
Need to reset the socket after the receive data timed out.  Since there is no code to detect that the Socket is still open you must force the socket closed and wait for the next connection.

Case 10:
IP_C.R_OBSERVE := TRUE; (* keine Empfangsueberwachung *)

and

IF ENABLE = FALSE OR t.Q THEN
    ip_state := BYTE#4; (* Abmelden *)
   state := 00;
   IP_C.C_ENABLE := FALSE;
END_IF;


/////////NEED TO FIX//////////////////
FTP_CLIENT
1.  Always Used Port 21. Changed to only use 21 if no port as specified in passed URL


[gelöscht durch Administrator]
#5
I still have issues with new Modbus Server code not timing out when the socket is disconnected or the Ethernet cable is disconnected.  I had do add the following below to reset the socket after the receive data timed out.  Since there is no code to detect that the Socket is still open you must force the socket closed and wait for the next connection.

Case 10:
IP_C.R_OBSERVE := TRUE; (* keine Empfangsueberwachung *)

and

IF ENABLE = FALSE OR t.Q THEN
    ip_state := BYTE#4; (* Abmelden *)
   state := 00;
   IP_C.C_ENABLE := FALSE;
END_IF;
#6
In Case 20  FTPCLIENT always uses port 21.  With PLC's that have a built in FTP server at port 21 this will fail.



#7
Peewit,

I am trying to port the code to use on CoDeSys3 PLC. For some reason I can not get the IP_Control to work unless I use the following:

SysSockSetOption (socket, SOCKET_SOL, SOCKET_SO_REUSEADDR, ADR dint_true () function to determine (dint_true)); (* Set option for local address reuse *)

Currently I use the older library which CoDeSys renamed SysSocket23. I plan on porting over to the newer library but was able to debug on why it would not work.




 
#8
Codesys 2 / IP_CONTROL not upated in version 1.21
26. Februar 2012, 19:49:43
I think there is a mistake in the current release. The IP_Control is the same as in release 1.12. It does not reflect the code found in the following link

http://www.oscat.de/community/index.php/topic, 1649.0.html
#9
Modulentwicklung / Listing Files with FTP Client?
23. Februar 2012, 07:11:32
Is there anyway to list files with the FTP Client FB?