beautypg.com

B&B Electronics VFG3000 - Manual User Manual

Page 287

background image

F

UNCTION

R

EFERENCE

G

ET

P

ORT

C

ONFIG

(

PORT

,

PARAM

)

R

EVISION

1

P

AGE

271

G

ET

P

ORT

C

ONFIG

(

PORT

,

PARAM

)

A

RGUMENT

T

YPE

D

ESCRIPTION

port

int

Number of the port to be set

param

int

Port parameter to be set

D

ESCRIPTION

Returns the value of a parameter on port. The port number starts from the programming port
with value 1. The table below shows the parameter number and associated return values.

P

ARAM

N

B

D

ESCRIPTION

P

OSSIBLE

V

ALUES

1

Baud Rate

The actual baud rate, e.g. 115200

2

Data Bits

7, 8 or 9

3

Stop Bits

1 or 2

4

Parity

0 (none), 1 (odd) or 2 (even)

5

Physical Mode

0 (RS232), 1 (422 Master), 2 (422 Slave), 3 (485)

F

UNCTION

T

YPE

This function is active.

R

ETURN

T

YPE

int.

E

XAMPLE

Config = GetPortConfig(2, 4)

In this example,

Config

will take the value of the current parity setting on the RS232

communication port.