Section 15.4.13 · Chapter 15: Using Macros
Communication Operation
■ EN_LINK
| Format | EN_LINK(P1,P2,P3) | Data Type | U |
|---|---|---|---|
| Function | Enables communication link P1 or sub-link P2 of communication link P1 when P3 is 1. Disables the specified communication link or sub-link when P3 is 0. | ||
| P1 (I/C) | The number of the communication link to be enabled or disabled. | ||
| P2 (I/C) | The node address of the sub-link to be enabled or disabled. If the specified communication link has no sub-link, this parameter is ignored. If the specified communication link has sub-links and you want to enable or disable the link itself, set this parameter to 0. | ||
| P3 (I/C) | To enable the specified communication link or sub-link, set this parameter to 1. To disable the specified communication link or sub-link, set this parameter to 0. | ||
| Example 1 | ENABLE_LINK(1, 20, 0) /* Disable the sub-link, whose node address is 20, of communication link 1. */ | ||
■ LINK_STS
| Format | P1 = LINK_STS(P2,P3 ) | Data Type | U | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Function | Gets the status of communication link P2 or sub-link P3 of communication link P2 and saves the result in P1. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| P1 (I/C) |
The word to receive the status of the specified
communication link or sub-link. The status is a 16-bit
value. The following table lists the meaning of each
status value.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| P2 (I/C) | The number of the communication link. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| P3 (I/C) | For a sub-link of a serial link, specify the node address of the sub-link. For a sub-link of an Ethernet link, specify the sub-link ID of the sub-link. If the specified communication link has no sub-link, this parameter is ignored. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Example 1 | $U100 = LINK_STS(2, 0) /* Get the status of communication link 2 and save it to $U100. */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Example 2 | $U12 = LINK_STS(1, 128) /* Get the status of the sub-link, whose node address is 128, of communication link 1 and save it to $U12. */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
■ LINK_PAR
| Format | LINK_PAR(P1,P2,P3,P4) | Data Type | U | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Function | Accesses the communication parameters of an Ethernet link or a sub-link of an Ethernet link. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| P1 (I/C) |
The operation of the access.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| P2 (I/C) | The number of the communication link. For example, the number of the first link is 1. Note that the link must be an Ethernet link or the operation will fail. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| P3 (I/C) | The ID of the sub-link. If the specified communication link has no sub-link, this parameter is ignored. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| P4 (I) |
The
starting location of the memory block that stores the parameters.
The memory arrangement of the block is shown
in the following table.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Example 1 | LINK_PAR(0, 1, 2, $U100) /* Get the communication parameters of sub-link 2 of communication link 1 and save it to the memory block starting at $U100. */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Example 2 |
$U200 =
10 (U) /* Will be used to set the command
delay to 10 ms */ $U201 = 1 (U) /* Will be used to set the timeout time to 0.1 second */ $U202 = C0A80164H (UD) /* Will be used to set the IP address to 192.168.1.100 */ $U204 = 2000 (U) /* Will be used to set the IP port to 2000 */ LINK_PAR(1, 2, 0, $U200) /* Set the communication parameters of link 2 using the data stored in the memory block starting at $U200. */ |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Need PM Designer itself?
V4 for current PK, PT, ITV and PM panels, V2 for older models. Free, sent by email.
Source.Section 15.4.13 of the PM Designer Software User Manual, Edition 2.0, © Cermate Technologies Inc. (www.cermate.com, service@cermate.com). Reproduced online, with the manual's own figures, by TSL Automation Solutions, authorised Cermate distributor, for users of Cermate HMI panels. PM Designer and PanelMaster are trademarks of Cermate Technologies Inc.
Text and figures are the manufacturer's and may describe features your panel or software version does not have. For a plain-language introduction read the PM Designer guide; for help with a specific panel contact TSL Automation.