Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual ยท part 12 of 14

Optimation OptiLogic Driver Help, pages 99 to 102

Pages 99 to 102 of 119

The original document is the PDF (1.2 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Optimation OL4054 and Optimation OL4058

Page 99

Optimation OptiLogic Driver Help

99 Serial Port Configuration: Set

Serial Input: Data Addressing To receive serial data, reference address type SI<port>.DATA. Note: The default configuration parameters are 300, n, 8 and 1.

Specifications Syntax

Data Type

Range

Access

B:SI<port>.DATA [r][c]*

Byte Array, Char Array

0

Read Only

B:SI<port>.DATA

String

0

Read Only

*To access as an array, [row][column] form is required. For example, DATA [1][24] would display 24 ASCII bytes in array notation: [x1, x2, x3..x24].

Examples Address

Value

Description

B:SI0.DATA

"hello" port 0 input data viewed as a string

B:SI0.DATA [2][2]

[105, 105][105, 105] port 0 input data in array form. In string form this would equate to "iiii"

Serial Input: Number of Received Bytes Addressing The number of received serial bytes (number of bytes in SI<port>.DATA. can be accessed by referencing address type SI<port>.NUMBYTES. If bytes are received within the timeout period mentioned above and are therefore appended to the input DATA buffer, NUMBYTES will reflect the total number of bytes in the input DATA buffer and not the number of bytes received on an individual block read. NUMBYTES will reset upon receiving a new stream.

Requirements None

Specifications Syntax

Data Type

Range

Access

B:SI<port>:NUMBYTES

Byte, Word, Short, DWord, Long

0

Read Only

Examples Address

Value

Description

B:SI0.NUMBYTES

0 port 0 input, no bytes in input DATA buffer

B:SI0.NUMBYTES

5 port 0 input, 5 bytes in input DATA buffer

Serial Input: Parity Error Addressing Reference SI<port>.PARITYERR to determine whether a parity error occurred on the last block read of the serial input port.

Values True = Parity error occurred False = No parity error occurred

Requirements None

Specifications Syntax

Data Type

Range

Access

B:SI<port>.PARITYERR

Boolean

0

Read Only

Examples Address

Value

Description

B:.SI0.PARITYERR

0 port 0 input, no error

B:SI0.PARITYERR

1 port 0 input, parity error occurred

Serial Output: Data Addressing To transmit serial data, reference address type SO<port>.DATA.

www. kepware.com

Page 100

Optimation OptiLogic Driver Help

100

Note: The default configuration parameters are 300, n, 8 and 1.

Specifications Syntax

Data Type

Range

Access

B:SO<port>.DATA [r][c]*

Byte Array, Char Array

0

Write Only

B:SO<port>.DATA

String

0

Write Only

*To access as an array, [row][column] form is required. For example, DATA [1][24] would send 24 ASCII bytes in array notation: [x1, x2, x3..x24].

Examples Address

Value

Description

B:SO0.DATA

"hello" port 0 output, transmit "hello"

B:SO0.DATA [2][2]

[105, 105][105, 105] port 0 output data in array form. In string form this would equate to transmitting "iiii"

Serial Output: Number of Bytes Sent Reference SO<port>.BYTESSENT to determine how many bytes were sent on the last transmission. This value is available after transmission of serial data.

Requirements None

Specifications Syntax

Data Type

Range

Access

B:SO<port>.BYTESSENT

Byte, Word, Short, DWord, Long

0

Read Only

Examples Address

Value

Description

B:SO0.BYTESSENT

0 port 0 output, no bytes sent on last transmission

B:SO0.BYTESSENT

47 port 0 output, 47 bytes sent

Serial Port Configuration: Baud Rate To configure the baud rate for a serial port, reference SCFG<port>.BAUD

Values 1 = 300 2 = 1200 3 = 2400 4 = 4800 5 = 9600 6 = 19200 Note: The default value is 300 baud.

Requirements None

Specifications Syntax

Data Type

Range

Access

B:SCFG<port>.BAUD

Byte, Word, Short, DWord, Long

0

Write Only

Examples Address

Value

Description

B:SCFG0.BAUD

4 port 0, baud = 4800

B:SCFG0.BAUD

6 port 0, baud = 19200

Serial Port Configuration: #Data Bits To configure the number of data bits for a serial port, reference SCFG<port>.DATABITS www. kepware.com

Page 101

Optimation OptiLogic Driver Help

101 Values 7 or 8 Note: The default value is 8 data bits.

Requirements None

Specifications Syntax

Data Type

Range

Access

B:SCFG<port>.DATABITS

Byte, Word, Short, DWord, Long

0

Write Only

Examples Address

Value

Description

B:SCFG0.DATABITS

7 port 0 configured for 7 data bits

B:SCFG0.DATABITS

8 port 0 configured for 8 data bits

Serial Port Configuration: Parity To configure the parity for a serial port, reference SCFG<port>.BAUD

Values 0 = none 1 = odd 2 = even Note: The default value is none.

Requirements: None

Specifications Syntax

Data Type

Range

Access

B:SCFG<port>.PARITY

Byte, Word, Short, DWord, Long

0

Write Only

Examples Address

Value

Description

B:SCFG0.PARITY

0 port 0 configured for no parity

B:SCFG0.PARITY

2 port 0 configured for even parity

Serial Port Configuration: #Stop Bits To configure the number of stop bits for a serial port, reference SCFG<port>.STOPBITS

Values 1=1 2=2 3 = 1.5 Note: The default value is 1.

Requirements None

Specifications Syntax

Data Type

Range

Access

B:SCFG<port>.STOPBITS

Byte, Word, Short, DWord, Long

0

Write Only

Examples Address

Value

Description

B:SCFG0.STOPBITS

1 port 0 configured for 1 stop bit

B:SCFG0.STOPBITS

3 port 0 configured for 1.5 stop bits www. kepware.com

Page 102

Optimation OptiLogic Driver Help

102

Serial Port Configuration: Set For any of the serial port configuration parameters (baud, parity and so forth) to be sent to the device, SCFG.SET must be set. Immediately after the parameters are sent, SCFG.SET will be reset.

Values True = Send serial port configurations to device False = No action

Requirements None

Specifications Syntax

Data Type

Range

Access

B:SCFG<port>.SET

Boolean

N/A

Write Only www. kepware.com