v24Read()

Reads from the interface.

Synopsis

int v24Read( int handle, string/blob &value, time timeout);

Parameters

Parameter Description
handle The handle of v24Open.
&value A string or blob, which contains the values. Strings are automatically closed with a 0 byte.
timeout The maximum time the system waits for data. The script stops for this time range.

Return value

-1 if an error occurs, otherwise 0.

Error

Missing or wrong arguments.

Description

Reads from the interface.

Example

main()
{
  string v24message, sTemp;
  int timeout = 2; // 2 seconds
  int read;
  do
  {
    sTemp = "";
    read = v24Read(handle, sTemp, timeout);
    v24message += sTemp;
  }
  while(strlen(sTemp) > 0);
}

Assignment

Communication functions, Waiting Control functions

Availability

CTRL