Difference between revisions of "Blocks IPWatchdog"

From IPLOG
Jump to: navigation, search
 
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
== [[Libraries for IEC 61131-3|Back to Libraries]] ==
+
== Description: ==
 +
The IPWatchdog blocks are used to verify the availability of a remote IP address based on an ARP or ICMP query.
 +
 
 +
[[Libraries for IEC 61131-3|Back to Libraries]]
 +
 
 +
 
 +
=== IPWDG_ARP ===
 +
Returns ARP ping status of a give IP ip address
  
== ARP ==
 
 
[[File:IPWDG_ARP.png]]
 
[[File:IPWDG_ARP.png]]
  
=== IPWDG_ARP ===
 
Returns ARP ping status of given ip address
 
 
{| class="wikitable"
 
{| class="wikitable"
 
| colspan="5" |[[Libraries for IEC 61131-3|Asynchronous interface]]
 
| colspan="5" |[[Libraries for IEC 61131-3|Asynchronous interface]]
Line 13: Line 17:
 
|string
 
|string
 
|
 
|
|ip address
+
|IP address
 
|-
 
|-
 
|in
 
|in
Line 29: Line 33:
  
  
 +
=== IPWDG_ICMP ===
 +
Returns ICMP ping status of a give ip address
  
== ICMP ==
 
 
[[File:IPWDG_ARP.png]]
 
[[File:IPWDG_ARP.png]]
  
=== IPWDG_ICMP ===
 
Returns ICMP ping status of given ip address
 
 
{| class="wikitable"
 
{| class="wikitable"
 
| colspan="5" |[[Libraries for IEC 61131-3|Asynchronous interface]]
 
| colspan="5" |[[Libraries for IEC 61131-3|Asynchronous interface]]
Line 42: Line 45:
 
|string
 
|string
 
|
 
|
|ip address
+
|IP address
 
|-
 
|-
 
|in
 
|in
Line 56: Line 59:
 
|status
 
|status
 
|}
 
|}
'''Example:'''<br>
+
 
[[File:IPWatchdog_2.jpg]]
+
 
 +
'''Block behavior:'''
 +
 
 +
The pulse on EXEC triggers the IPWDG block. In the beginning a ICMP/ARP request is sent to the IP address. At the same time the BUSY output is changing the status of the log. 0 to 1, TMO_S running and the block is waiting for a response.
 +
 
 +
 
 +
1. If a '''response is received''' during TMO_S, TMO_S it is reset. BUSY is set to log. 0, VALID is set to 1 (operation successful, output set) and Q is set to log. 1 (IP is available).
 +
 
 +
2. If a '''response is not received''', BUSY remains in the log. 1 until TMO_S expires. After TMO_S expires BUSY goes to log.0, VALID goes to log.1 (operation successful, output set). Q remains in log. 0 (IP is not available).
 +
 
 +
 
 +
'''Note:'''
 +
'''EXEC''' should be set to a value greater than TMO_S to avoid unnecessary restarting when the block cycle is not completed and is waiting for TMO_S.
 +
 
 +
 
 +
 
 +
== Examples ==
 +
GEN_PULSE generates a pulse every T#2s (2 seconds) to trigger the IPWDG block. During one cycle block it is waiting for an answer from the remote device (IP_ADDR) for TMO_S timer. If the remote device does not respond by this time, the output is set to log. 0. Otherwise, the output is set to log. 1.
 +
 
 +
 
 +
'''IPWDG_ICMP'''
 +
 
 +
[[File:IPWDG_ICMP_Example.png]]
 +
 
 +
'''IPWDG_ARP'''  
 +
 
 +
[[File:IPWDG_ARP_Example.png]]
 +
 
 +
[[Libraries for IEC 61131-3|Back to Libraries]]

Latest revision as of 05:17, 21 May 2020

Description:

The IPWatchdog blocks are used to verify the availability of a remote IP address based on an ARP or ICMP query.

Back to Libraries


IPWDG_ARP

Returns ARP ping status of a give IP ip address

IPWDG ARP.png

Asynchronous interface
in IP_ADDR string IP address
in TMO_S int timeout in seconds
out Q bool status


IPWDG_ICMP

Returns ICMP ping status of a give ip address

IPWDG ARP.png

Asynchronous interface
in IP_ADDR string IP address
in TMO_S int timeout in seconds
out Q bool status


Block behavior:

The pulse on EXEC triggers the IPWDG block. In the beginning a ICMP/ARP request is sent to the IP address. At the same time the BUSY output is changing the status of the log. 0 to 1, TMO_S running and the block is waiting for a response.


1. If a response is received during TMO_S, TMO_S it is reset. BUSY is set to log. 0, VALID is set to 1 (operation successful, output set) and Q is set to log. 1 (IP is available).

2. If a response is not received, BUSY remains in the log. 1 until TMO_S expires. After TMO_S expires BUSY goes to log.0, VALID goes to log.1 (operation successful, output set). Q remains in log. 0 (IP is not available).


Note: EXEC should be set to a value greater than TMO_S to avoid unnecessary restarting when the block cycle is not completed and is waiting for TMO_S.


Examples

GEN_PULSE generates a pulse every T#2s (2 seconds) to trigger the IPWDG block. During one cycle block it is waiting for an answer from the remote device (IP_ADDR) for TMO_S timer. If the remote device does not respond by this time, the output is set to log. 0. Otherwise, the output is set to log. 1.


IPWDG_ICMP

IPWDG ICMP Example.png

IPWDG_ARP

IPWDG ARP Example.png

Back to Libraries