Instrument Control Toolbox    

Creating a UDP Object

You create a UDP object with the udp function. udp does not require the name of the remote host as an input argument. However, if you are using the object to communicate with a specific instrument, you should specify the remote host and the port number. As described in Configuring Property Values, you can also configure property values during object creation.

For example, to create a UDP object associated with the remote host 127.0.0.1and the remote port 4012

The UDP object u now exists in the MATLAB workspace. You can display the class of u with the whos command.

Once the UDP object is created, the properties listed below are automatically assigned values. These general purpose properties provide descriptive information about the UDP object based on the object type, the remote host, and the remote port.

Table 6-2: UDP Descriptive Properties 
Property Name
Description
Name
Specify a descriptive name for the UDP object.
RemoteHost
Specify the remote host.
RemotePort
Specify the remote host port for the connection.
Type
Indicate the object type.

You can display the values of these properties for t with the get function.


  Example: Server Drops the Connection The UDP Object Display