Rs232_Read_Data - Scanlab RTC6 PCIe Board Installation And Operation Manual

Real time control of scan systems and lasers rtc6 software package v1.16.0
Table of Contents

Advertisement

Ctrl Command rs232_read_data
Function
Reads a value from the input buffer of the RS-232 interface, see
"RS-232 Interface", page
RS232Data = rs232_read_data()
Call
Result
As an unsigned 32-bit value.
Bit #0
(LSB)
...
Bit #7
Bit #8
Bit #9
...
Bit #15
Bit #16
...
Bit #23
Bit #24
...
Bit #31
Comments
• The RS-232 interface is internally is read in internally asynchronously (one character at
a time). If this character is new, then it is stored in a 256-character ring buffer. From
there, it can be transferred to the user program by rs232_read_data (asynchronously
to reading).
• Byte #0
• Byte #1
• Byte #2
still have not been read by the user program. If no unread characters are present
(byte #2 = 0), then the most recently read character is transferred with "new bit" = 0.
• Byte #3
corresponding number of characters were overwritten and therefore irretrievably lost).
Important: To reset the overflow counter, you must call rs232_read_data
correspondingly often!
• Example: return value 459098 = 0x0007015A = (0, 7, 1, 90) means:
character 90 ('Z') has been read and is new (1), 7 additional characters remain to be
read, the buffer has been never overrun (0).
RTC6 boards
Doc. Rev. 1.0.21 en-US
10 RTC6 Commands
288.
Next (not yet read by the user program) value of the input buffer.
"New" bit:
= 1:
The value is new (has not been previously read).
= 0:
The value is old (has been already read once
by rs232_read_data).
0.
Number of further (not yet read) characters.
Number of buffer overruns.
(Bit #0...Bit
#7) returns only one character from the current reading position.
(Bit
#8) indicates if the character has already been read by the user program.
(Bit #16...Bit
#23) indicates the number of characters in the input buffer that
(Bit #24...Bit
#31) indicates the number of overruns of the input buffer (a
Chapter 9.2.3
595

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RTC6 PCIe Board and is the answer not in the manual?

Related Products for Scanlab RTC6 PCIe Board

This manual is also suitable for:

Rtc6 ethernet board

Table of Contents

Save PDF