Writing the Control Program
Update Any
As mentioned earlier, you can update any channel per scan using regular I/O
Channel
instructions, or any number of channels per scan using immediate I/O instructions.
The following diagram shows the data locations for an example system. You use
the channel selection outputs to determine which channel gets updated (more on
this later).
Output Enable
Bit
Calculating the
Your program has to calculate the digital
value to send to the analog module.
Digital Value
There are many ways to do this, but
almost all applications are understood
more easily if you use measurements in
engineering units. This is accomplished
by using the conversion formula shown.
You may have to make adjustments to
the formula depending on the scale you
choose for the engineering units.
Consider the following example which controls pressure from 0.0 to 99.9 PSI. By
using the formula, you can easily determine the digital value that should be sent to
the module. The example shows the conversion required to yield 49.4 PSI. Notice
the formula uses a multiplier of 10. This is because the decimal portion of 49.4
cannot be loaded, so you adjust the formula to compensate for it.
A + 10U
F4–04DAS–1 4-Channel Isolated 4–20mA Output
V40502
MSB
Bit
15
14
13
12
11
10
9
8
7
6
Y
Y
Y
5
5
4
7
0
7
Unused Bits
65535
10(H * L)
F4–04DAS–1
8pt
8pt
32pt
16pt
Output
Output
Output
Output
Y0
Y10
Y20
Y60
–
–
–
–
Y7
Y17
Y57
Y77
V40500
V40503
MSB
LSB
Bit
15
14
13
12
5
4
3
2
1
0
Y
Y
4
3
0
7
Channel
Select Bits
A + U 65535
H * L
A = analog value (0 – 65535)
U = engineering units
H = high limit of the engineering
unit range
L = low limit of the engineering
unit range
65535
A + 494
1000 * 0
17–9
16pt
16pt
Input
Input
V40501
LSB
11
10
9
8
7
6
5
4
3
2
1
Y
Y
Y
3
2
2
0
7
0
Data word contains
16 data bits
A + 32374
0
Need help?
Do you have a question about the DL405 and is the answer not in the manual?
Questions and answers