beautypg.com

B&B Electronics VFG3000 - Manual User Manual

Page 325

background image

F

UNCTION

R

EFERENCE

P

ORT

R

EAD

(

PORT

,

PERIOD

)

R

EVISION

1

P

AGE

309

P

ORT

R

EAD

(

PORT

,

PERIOD

)

A

RGUMENT

T

YPE

D

ESCRIPTION

port

int

The raw port to be read.

period

int

The time to wait in milliseconds.

D

ESCRIPTION

Attempts to read a character from the port indicated by

port

. The port must be configured to

use a raw driver, such as the raw serial port driver, or either of the raw TCP/IP drivers. If no
data is available within the indicated time period, a value of –1 will be returned. Setting

period

to zero will result in any queued data being returned, but will prevent Fieldbus

Gateway Manager from waiting for data to arrive if none is available.

F

UNCTION

T

YPE

This function is active.

R

ETURN

T

YPE

int.

E

XAMPLE

Data := PortRead(1, 100)