QueryDevice
Writes data to either a specified TCP/IP server device or a UDP server device, then reads the data back from that device. The response from the device must be received before the device's Timeout limit is reached.
QueryDevice Inputs
Syntax: QueryDevice(Event,Device,Data)
Parameter | Description |
---|---|
Specifies the spreadsheet event that triggers the data to be written to the TCP/IP device. This parameter must be a reference to one of the following:
|
|
A reference to a Device structure, which must be a TCP/IP client, created by a TCPDevice, or a reference to a Device structure returned by a UDPDevice function. For more information, see TCPDevice or UDPDevice. |
|
The data to be written to the TCP/IP or UDP device. For the TCP/IP implementation, the data type must be of the same type specified in the device's Packet Type: either an ASCII string or a binary Modbus command. For the UDP implementation, the data type must be of the same type specified in the Binary Packet parameter: either binary data packets or string information. For more information, see Packet Type or Binary Packet. |
QueryDevice Outputs
Returns |
A Query data structure, or #ERR if any of the input parameters are invalid. |
For more information, see Input/Output Functions, Binary Text Functions, ReadDevice, or WriteDevice.