Automation Direct DL405 User Manual page 94

Analog
Hide thumbs Also See for DL405:
Table of Contents

Advertisement

4–16
F4-04ADS 4-Channel Isolated Analog Input
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 is how you would write the program to perform the engineering unit
conversion.
Note, this example uses SP1, which is always on. You
could also use an X, C, etc. permissive contact.
SP1
LDF
X20
K12
BCD
X34
OUT
V3000
X1
LD
V3000
MUL
K1000
DIV
K4095
OUT
V3100
Example with multiplier
Units + 10 A H * L
Units + 20240 100 * 0
Units + 494
0049
V MON 0000
This value is more accurate
Loads the 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 from binary to BCD.
When X34 is on, channel 1 data is being sent to the CPU. The OUT
instruction moves the data from the accumulator to V3000.
When X1 is on, channel 1 data is loaded into the accumulator.
Multiplies the accumulator contents by 1000 (to start the conversion).
Divides the accumulator contents by 4095.
Stores the converted result in V3100.
4095
4095
Handheld Display
V 3101 V 3100
0494

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

Table of Contents