Rockwell Automation 2706-F11J_F11JC_F21J_F21JC DL50 INSTALLATION MANUAL User Manual

Page 90

Advertising
background image

Chapter 6

Slave Mode Operation / Examples

6–26

1746-BAS Duplex Example

The following example demonstrates how a 1746-BAS SLC Basic Module
can be used to trigger messages on a DL50 display running in Duplex mode.
This example prompts the user to enter a message along with its display
attributes. The basic program calculates the control bytes, calculates the
checksum of the packet, and sends the final packet out to the DL50 through
its PRT2 serial port.

Port Setup

The MODE statement in line 10 sets the Basic Module’s port 2 to 9600 baud.
If the DL50 is not set at 9600 baud, this statement must be changed to match
the DL50 baud rate.

This Basic program can use either RS232 or RS485 communications. The
Basic Module’s port type can be configured using the jumpers on the
1746-BAS module. Refer to the Basic Module Design and Integration
Manual (Pub. #1746-ND005) for more information on the port configuration.

Program Variables

Table 6.J lists the variables which control the messages being sent to the
DL50 by the Basic Module. These can be changed to obtain the desired
message attributes.

First the message text is stored in string $(0) and the attribute strings are set
to the desired values. Next the subroutine starting on line 5000 is called. This
subroutine calculates the control bytes and the checksum, then sends the
message out in the proper duplex packet form.

Advertising