Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Jack H.Automating manufacturing systems with PLCs.2005.pdf
Скачиваний:
289
Добавлен:
23.08.2013
Размер:
5.34 Mб
Скачать

plc function ref - 34.42

AWT, AWA - Ascii WriTe, Ascii Write Append

 

 

 

 

 

 

 

 

 

A

 

AWT

 

 

 

 

 

 

 

 

ASCII WRITE

 

 

 

 

 

 

 

 

 

 

 

 

Channel

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Source

ST11:9

 

 

 

 

 

Control

R6:3

 

 

 

 

 

 

 

 

 

 

String Length

14

 

 

 

 

 

Characters Sent

 

 

 

 

 

 

 

 

Description:

The AWT instruction will send a character string. In this example, when

 

’A’ goes from false to true, up to 14 characters will be sent from

 

’ST11:9’ to channel 0. This does not append any end of line charac-

 

ters.

 

 

The AWA function has a similar operation, except that the channel con-

 

figuration characters are added - by default these are ’CR’ and ’LF’.

Status Bits:

EN

enable - this will be set while the instruction is active

 

DN

done - this will be set after the string has been sent

 

ER

error bit - set when an error has occurred

 

UL

unload -

 

EM

empty - set if no string was found

 

EU

queue -

Registers:

POS

the number of characters sent instructions

Available on: Micrologix, PLC-5

34.2 DATA TYPES

The following table describes the arguments and return values for functions. Some notes are;

’immediate’ values are numerical, not memory addresses.

’returns’ indicates that the function returns that data value.

numbers between ’[’ and ’]’ indicate a range of values.

values such as ’yes’ and ’no’ are typed in literally.

plc function ref - 34.43

Table 1: Instruction Data Types

Function

Argument

Data Types

Edge Triggered

 

 

 

 

 

 

 

 

ABL

channel

immediate int [0-4]

yes

 

control

R

 

 

characters

returns N

 

 

 

 

 

ACB

channel

immediate int [0-4]

yes

 

control

R

 

 

characters

returns N

 

 

 

 

 

ACI

source

ST

no

 

destination

N

 

 

 

 

 

ACN

source A

ST

no

 

source B

ST

 

 

 

 

 

ACS

source

N,F,immediate

no

 

destination

N,F

 

 

 

 

 

ADD

source A

N,F,immediate

no

 

source B

N,F,immediate

 

 

destination

N,F

 

 

 

 

 

AEX

source

ST

no

 

index

immediate int [0-82]

 

 

number

immediate int [0-82]

 

 

destination

ST

 

 

 

 

 

AFI

 

 

no

 

 

 

 

AHL

channel

immediate int [0-4]

yes

 

AND mask

immediate hex [0000-ffff]

 

 

OR mask

immediate hex [0000-ffff]

 

 

control

R

 

 

 

 

 

AIC

source

N, immediate int

no

 

destination

ST

 

 

 

 

 

ARD

channel

immediate int [0-4]

yes

 

destination

ST

 

 

control

R

 

 

string length

immediate int [0-83]

 

 

characters read

returns N

 

 

 

 

 

plc function ref - 34.44

Table 1: Instruction Data Types

Function

Argument

Data Types

Edge Triggered

 

 

 

 

 

 

 

 

ARL

channel

immediate int [0-4]

yes

 

destination

ST

 

 

control

R

 

 

string length

immediate int [0-83]

 

 

characters read

returns N

 

 

 

 

 

ASC

source

ST

no

 

index

N, immediate

 

 

search

ST

 

 

result

R

 

 

 

 

 

ASN

source

N,F,immediate

no

 

destination

N,F

 

 

 

 

 

ASR

source A

ST

no

 

source B

ST

 

 

 

 

 

ATN

source

N,F,immediate

no

 

destination

N,F

 

 

 

 

 

AVE

file

#F,#N

yes

 

destination

F,N

 

 

control

R

 

 

length

N,immediate int

 

 

position

returns N

 

 

 

 

 

AWA

channel

immediate int [0-4]

yes

 

source

ST

 

 

control

R

 

 

string length

immediate int [0-82]

 

 

characters sent

returns N

 

 

 

 

 

AWT

channel

N, immediate int

yes

 

source

ST

 

 

control

R

 

 

length

immediate int [0-82]

 

 

characters sent

returns N

 

 

 

 

 

BSL

file

#B,#N

yes

 

control

R

 

 

bit address

any bit

 

 

length

immediate int [0-16000]

 

 

 

 

 

plc function ref - 34.45

Table 1: Instruction Data Types

Function

Argument

Data Types

Edge Triggered

 

 

 

 

 

 

 

 

BSR

file

#B,#N

yes

 

control

R

 

 

bit address

any bit

 

 

length

immediate int [0-16000]

 

 

 

 

 

BTD

source

N,B,immediate

no

 

source bit

N,immediate int [0-15]

 

 

destination

N

 

 

destination bit

immediate int [0-15]

 

 

length

immediate int [0-15]

 

 

 

 

 

BTR

rack

immediate octal [000-277]

yes

 

group

immediate octal [0-7]

 

 

module

immediate octal [0-1]

 

 

control block

BT,N

 

 

data file

N

 

 

length

immediate int [0-64]

 

 

continuous

’yes’,’no’

 

 

 

 

 

BTW

rack

immediate octal [000-277]

yes

 

group

immediate octal [0-7]

 

 

module

immediate octal [0-1]

 

 

control block

BT,N

 

 

data file

N

 

 

length

immediate int [0-64]

 

 

continuous

’yes’,’no’

 

 

 

 

 

CLR

destination

N,F

no

 

 

 

 

CMP

expression

expression

no

 

 

 

 

COP

source

#any

no

 

destination

#any

 

 

length

immediate int [0-1000]

 

 

 

 

 

COS

source

F,immediate

no

 

destination

F

 

 

 

 

 

CPT

destination

N,F

no

 

expression

expression

 

 

 

 

 

CTD

counter

C

yes

 

preset

returns N

 

 

accumulated

returns N

 

 

 

 

 

plc function ref - 34.46

Table 1: Instruction Data Types

Function

Argument

Data Types

Edge Triggered

 

 

 

 

 

 

 

 

CTU

counter

C

yes

 

preset

returns N

 

 

accumulated

returns N

 

 

 

 

 

DDT

source

binary

 

 

reference

 

 

 

result

 

 

 

compare control

 

 

 

length

 

 

 

position

 

 

 

result control

 

 

 

length

 

 

 

position

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

plc function ref - 34.47

Table 1: Instruction Data Types

Function

Argument

Data Types

Edge Triggered

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

plc function ref - 34.48

Table 1: Instruction Data Types

Function

Argument

Data Types

Edge Triggered