05.05.2014 Views

csmstr - Omega Engineering

csmstr - Omega Engineering

csmstr - Omega Engineering

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FUNCTION REFERENCE<br />

SETPORTCONFIG(PORT, PARAM, VALUE)<br />

SETPORTCONFIG(PORT, PARAM, VALUE)<br />

ARGUMENT TYPE DESCRIPTION<br />

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

param int Port parameter to be set<br />

value int Value of the parameter<br />

DESCRIPTION<br />

Sets the serial port parameter to value. The port number starts from the programming port<br />

with value 1. The table below shows the parameter number and associated possible 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 1 (RS232), 2 (422 Master), 3 (422 Slave), 4 (485)<br />

Note: This function will only work when called before the device startup. The OnLoad field<br />

provided in the User Interface on the pages tree root is used for this purpose. See example<br />

below for more details.<br />

Note: The function CommitAndReset() is used to force the device to cycle power in order<br />

for the SetPortConfig() function to set the new port parameters.<br />

FUNCTION TYPE<br />

This function is active.<br />

RETURN TYPE<br />

cstring.<br />

EXAMPLE<br />

See next page.<br />

REVISION 6 PAGE 409

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

Saved successfully!

Ooh no, something went wrong!