Loading...
This chapter gives an overview of the members available for the UDP Client in the Configuration dialog.
Please read the chapter "UDP Server&Client" if you would like to know how to add and use this device. As explained in the topic"Object and Member Notation (dot syntax)", all kinds of objects can be addressed in the scripting language by using their members which set (or return if applicable) properties or methods of that object. Please refer to the chapter "Script Language" for more details about scripting in general.
Project.Udp_Server_Client(deviceName or ID) |
Example: Alternative Example: |
This gives access to all further members of the device "Udp_Server_Client" from the Configuration dialog. Using the Project object is an alternative to addressing the device directly by entering its name. The Project object allows to address the device through its name or ID. Substituting the ID with a dynamic variable allows automation. Actions can be performed on many devices of the same type simultaneously, e.g. by using for-loops: |
Udp_Server_ClientName.Disable |
Example: Alternative Example: |
This disables the TCP Client connection in the Configuration dialog as if the "Enable" check box in the window was unchecked. Use the .Enable member to reverse this command. |
Udp_Server_ClientName.Enable |
Example: Alternative Example: |
This enables the TCP Client connection in the Configuration dialog as if the "Enable" check box in the window was checked. Use the .Disable member to reverse this command. |
Udp_Server_ClientName.IsEnabled |
Example: Alternative Example: |
This member returns the status of the check box "Enable" for the TCP Client connection in the Configuration dialog as a string or Boolean value. The result is "True" if the connection is enabled and "False" if it is currently not enabled. You could also write it into a Widget, e.g. a Label via the script: Label1.Text = Udp_Server_Client1.IsEnabled |
Udp_Server_ClientName.LastMessageReceived |
Example: Alternative Example: |
This returns the last message that was received from the TCP Client connection as a string value. You could also write it into a Widget, e.g. a Label via the script: Label1.Text = Udp_Server_Client1.LastMessageReceived |
Udp_Server_ClientName.Port |
Example: Alternative Example: |
This returns the port number of the TCP Client connection in the Configuration dialog as an integer value. The result could look as follows: 10001 You could also write it into a Widget, e.g. a Label via the script: Label1.Text = Udp_Server_Client1.Port In return, you can also assign another port to the TCP Client connection. WD automatically connects to it afterwards. |
Udp_Server_ClientName.Send(address,port,data) |
Example: Alternative Example: |
This allows to send a custom message to the address 2.255.255.255 and port 55550. Literal text should always be enclosed in either single or double quotation marks; otherwise, the text is handled like a variable. The example shows, how both can be combined. The global variable "Now" sends the current date and time. |