RTC
®
5 PC Interface Board
Rev. 1.9 e
9 Programming Peripheral Interfaces
207
9.1.6 RS232 Interface
The “RS232” connector provides an RS232 interface
(see page 51). The interface can be configured via
rs232_config. rs232_write_data can be used to
send single data words (bytes) to the RS232
interface. Texts can be sent to the interface via
rs232_write_text or rs232_write_text_list.
9.1.7 McBSP Interface
The McBSP interface at the “SPI / I2C” connector
permanently outputs a 32-bit data word every 10 µs
(see page 52). The set_mcbsp_out and
set_mcbsp_out_ptr commands (like set_trigger)
allow selection of the signal types to be outputted at
this interface:
•The command set_mcbsp_out lets you specify
two signal types for simultaneous output at the
McBSP-interface. A 16-bit portion of the first
signal type will be packed along with a 16-bit
portion of the second signal type into a 32-bit
data word for output every 10 µs (for a detailed
description, see set_mcbsp_out).
•The command set_mcbsp_out_ptr lets you
define a list of up to 8 signal types. The signals are
outputted sequentially in the specified order. For
every 10 µs clock cycle, the lower 24 bits of the
corresponding data signal and the associated
signal type number (8 bits) are packed into a 32-
bit data word and outputted at the McBSP
interface (for a detailed description, see
set_mcbsp_out_ptr).
Notes
• The signals and operating conditions of the
McBSP interface are presented on page 52.
• In the default setting, the McBSP interface always
outputs bits #4-19 of the cartesian control values
for the X and Y axes (SampleX and SampleY) in a
common 32-bit data word. This is equivalent to
specifying
set_mcbsp_out(7, 8)
.
• Signals specified via set_mcbsp_out or
set_mcbsp_out_ptr will be outputted (possibly
sequentially) until you call one of these two
commands again.
9.2 Signal Input
Signals of peripherals (e.g. signals of a transport
system, workpiece recognition system or process
monitoring camera) can be queried via the interfaces
described below through control commands at any
desired time or – during processing of a list – with list
commands.
9.2.1 16-Bit Digital Input
The EXTENSION 1 connector provides a 16-bit digital
TTL input (DIGITAL IN0 … 15) (see page 49) for
receiving 16-bit digital values. For synchronization of
data transmission, the EXTENSION 1 connector also
provides a SYNC signal.
The read_io_port or read_io_port_buffer and
read_io_port_list commands can be used to read the
current value of the digital input port.
Further commands are provided for conditional
command execution (see page 213).
9.2.2 2-Bit Digital Input
For querying 2-bit digital values, the LASER connector
provides a 2-bit digital input (DIGITAL IN1 and
DIGITAL IN2, see page 46). Its input value can be read
via get_laser_pin_in.
Further commands are provided for conditional
command execution (see page 213).