05.05.2014 Views

csmstr - Omega Engineering

csmstr - Omega Engineering

csmstr - Omega Engineering

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

FUNCTION REFERENCE<br />

GETPORTCONFIG(PORT, PARAM)<br />

GETPORTCONFIG(PORT, PARAM)<br />

ARGUMENT TYPE DESCRIPTION<br />

port int Number of the port to be set<br />

param int Port parameter to be set<br />

DESCRIPTION<br />

Returns the value of a parameter on port. The port number starts from the programming port<br />

with value 1. The table below shows the parameter number and associated return values.<br />

PARAM NB DESCRIPTION POSSIBLE VALUES<br />

1 Baud Rate The actual baud rate, e.g. 115200<br />

2 Data Bits 7, 8 or 9<br />

3 Stop Bits 1 or 2<br />

4 Parity 0 (none), 1 (odd) or 2 (even)<br />

5 Physical Mode 0 (RS232), 1 (422 Master), 2 (422 Slave), 3 (485)<br />

FUNCTION TYPE<br />

This function is active.<br />

RETURN TYPE<br />

int.<br />

EXAMPLE<br />

Config = GetPortConfig(2, 4)<br />

In this example, Config will take the value of the current parity setting on the RS232<br />

communication port.<br />

REVISION 6 PAGE 351

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!