Automation Direct DL405 User Manual page 130

Analog
Hide thumbs Also See for DL405:
Table of Contents

Advertisement

Analog Value of 2024, slightly less than half scale, should yield 49.4 PSI
Example without multiplier
Units + A H * L
4095
Units + 2024 100 * 0
4095
Units + 49
Handheld Display
V 3101 V 3100
V MON 0000
Here's how you would write the program to perform the engineering unit
conversion. This example uses SP1 which is always on. You could also use an X, C,
etc. permissive contact.
SP1
LDF
X20
K12
BCD
LDF
X34
K4
OUTX
V3000
X1
LD
V3000
MUL
K1000
DIV
K4095
OUT
V3100
F4–16AD–1 16-Channel Analog Input
Example with multiplier
Units + 10 A H * L
Units + 20240 100 * 0
Units + 494
0049
Loads the first 12 bits of the channel data word into the accumulator.
The X address depends on the I/O configuration.
Since we are going to perform some math operations in BCD, this
instruction converts the data format.
This LDF instruction loads the four channel indicator bits, plus the
MSB, into the accumulator. The channel data from the first LDF
instruction is pushed into the stack. X34 = X20 + 14.
The OUTX instruction stores the channel data to an address that
starts at V3000 plus the channel offset. For example, if channel two
was being read, the data would be stored in V3001.
When X1 is on, channel 1 data is loaded into the accumulator.
Multiplies the accumulator data by 1000 (to start the conversion).
Divides the accumulator data by 4095.
Stores the result in location V3100.
4095
4095
Handheld Display
V 3101 V 3100
V MON 0000
0494*
*Value is more accurate
6–17

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DL405 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents