10 - sample application programs, Programming objectives, 10ć1 – Rockwell Automation 1771-QB Linear Pos. User Manual

Page 145: Sample application programs

Advertising
background image

Chapter

10

10Ć1

Sample Application Programs

This chapter gives a general explanation of how to program programmable logic
controllers and provides the code for, and descriptions of, the two sample
application programs contained on the disk that accompanies the Linear
Positioning Module. Application Program 1 shows how to implement axis
movement for a single axis using a setpoint block containing four setpoints.
Application Program 2 shows how to implement axis movement for a single
axis using the motion block discussed in Chapter 9. The application programs
on the accompanying disk have been developed for both the 6200 and ICOM
software packages. The first application program is called QB1 and the second
is QB2. Another application program, QB2_515A, should be used if you are
running a Series A, PLC-5/15.

The main objectives of a programmable controller program for the Linear
Positioning Module are:

to regularly transfer the status block from the Linear Positioning Module to

the programmable logic controller’s data tables. You achieve this through a
block read instruction.

to transfer the parameter block, the command block, the setpoint block

(optional), and the motion block (optional) from the programmable
controller’s data table to the Linear Positioning Module. The program must
manipulate the source address of the block transfer write instruction to
determine which block to send next.

After powerup or axis reset, the program must send data blocks to the module in
the following order:

1.

Parameter block

2.

Setpoint block(s) - if you only command setpoint 13 or a motion segment
in the command block, you won’t need to send a setpoint block

3.

Motion block(s) (if required)

4.

Command block

The program will then continue sending command blocks during normal
operation. The module does not request the blocks in the required order; the
program must maintain this order.

Programming Objectives

Advertising