Appendix A
Programming Instructions
562
Expansion Instructions
The following table shows the instructions that can be treated as expansion instructions in the CPM2A, CPM2C,
and SRM1(-V2) PCs. The default function codes are given for instructions that have codes assigned by default.
Code
Mnemonic
Name
Function
CPU Units
Page
17
(@)ASFT
ASYNCHRONOUS SHIFT
REGISTER
Creates a shift register that exchanges the con-
tents of adjacent words when one of the words
is zero and the other is not.
All
410
47
(@)RXD
RECEIVE
Receives data via a communications port.
All
505
48
(@)TXD
TRANSMIT
Sends data via a communications port.
All
507
60
CMPL
DOUBLE COMPARE
Compares two eight-digit hexadecimal values.
All
436
61
(@)INI
MODE CONTROL
Starts and stops counter operation, compares
and changes counter PVs, and stops pulse out-
put.
All
399
62
(@)PRV
HIGH-SPEED COUNTER
PV READ
Reads counter PVs and status data for the high-
speed counter.
CPM2A/
CPM2C
401
63
(@)CTBL
COMPARISON TABLE
LOAD
Compares counter PVs and generates a direct
table or starts operation.
CPM2A/
CPM2C
396
64
(@)SPED
SPEED OUTPUT
Outputs pulses at the specified frequency (10
Hz to 50 KHz in 10 Hz units). The output fre-
quency can be changed while pulses are being
output.
CPM2A/
CPM2C
489
65
(@)PULS
SET PULSES
Outputs the specified number of pulses at the
specified frequency. The pulse output cannot be
stopped until the specified number of pulses
have been output.
CPM2A/
CPM2C
487
66
(@)SCL
SCALING
Performs a scaling conversion on the calculated
value.
Use the Programming Console or SSS to ac-
cess this instruction for the SRM1(-V2).
All
(But, Ver-
sion 2 only
for SRM1)
421
67
(@)BCNT
BIT COUNTER
Counts the total number of bits that are ON in
the specified block of words.
All
499
68
(@)BCMP
BLOCK COMPARE
Judges whether the value of a word is within 16
ranges (defined by lower and upper limits).
All
434
69
(@)STIM
INTERVAL TIMER
Controls interval timers used to perform sched-
uled interrupts.
All
504
89
(@)INT
INTERRUPT CONTROL
Performs interrupt control, such as masking and
unmasking the interrupt bits for I/O interrupts.
CPM2A/
CPM2C
501
---
(@)ACC
ACCELERATION
CONTROL
Together with PULS(––), ACC(––) controls the
acceleration and/or deceleration of pulses output
from port 1 or 2.
CPM2A/
CPM2C
491
---
AVG
AVERAGE VALUE
Adds the specified number of hexadecimal
words and computes the mean value. Rounds
off to 4 digits past the decimal point.
CPM2A/
CPM2C
476
---
(@)FCS
FCS CALCULATE
Checks for errors in data transmitted by a Host
Link command.
All
500
---
(@)HEX
ASCII-TO-HEXADECIMAL
Converts ASCII data to hexadecimal data.
All
451
---
(@)HMS
SECONDS TO HOURS
Converts second data to hour and minute data.
CPM2A/
CPM2C
454
---
(@)MAX
FIND MAXIMUM
Finds the maximum value in specified data area
and outputs that value to another word.
CPM2A/
CPM2C
472
---
(@)MIN
FIND MINIMUM
Finds the minimum value in specified data area
and outputs that value to another word.
CPM2A/
CPM2C
474
---
(@)NEG
2’S COMPLEMENT
Converts the four-digit hexadecimal content of
the source word to its 2’s complement and out-
puts the result to R.
Use the Programming Console or SSS to ac-
cess this instruction for the SRM1(-V2).
All
(But, Ver-
sion 2 only
for SRM1)
455