Chapter 8 - AutomationDirect

Chapter 8 - AutomationDirect

F3–04DAS

4-Channel Isolated

Analog Output

In This Chapter. . . .

Ċ Module Specifications

Ċ Setting the Module Jumpers

Ċ Connecting the Field Wiring

Ċ Module Operation

Ċ Writing the Control Program (DL340/DL350)

Ċ Writing the Control Program (DL350)

1

8

8–2

F3–04DAS 4-Channel Isolated Analog Output

Module Specifications

The following table provides the specifications for the F3–04DAS Analog Output

Module. Review these specifications to make sure the module meets your application requirements.

Number of Channels

Output Ranges

Resolution

Output Type

Output Current

Short-circuit Current

Capacitive Load Drive

Load Impedance

Isolation Mode Rejection

Linearity Error

Calibration Error

Calibrated Offset Error

Conversion Time

Power Budget Requirement

External Power Supply

Operating Temperature

Storage Temperature

Relative Humidity

Environmental air

Vibration

Shock

Noise Immunity

4

"

5V,

"

10V, 0–5V, 0–10V, 1–5V,

0–20 mA, 4–20 mA

12 bit (1 in 4096)

Isolated, 750 VDC channel-to-channel

750 VDC channel-to-logic

"

5 mA, voltage output

"

20 mA typical, voltage output

0.1

m

F typical, voltage output

470

W

maximum, current output

2K

W

minimum, voltage output

140 dB at 60Hz

"

1 count (

"

0.03% maximum)

"

0.15% typical,

"

0.75% maximum of span

"

10 ppm /

_

C maximum of full scale

"

1 count maximum, current output

"

5 mV typical,

"

50 mV max., voltage output

"

0.2 mV typical /

_

C

30 m

S maximum, 1 channel/scan

154 mA @9V, 145 mA @ 24V (maximum)

None required

32

°

to 140

°

F (0

°

to 60

°

C)

–4

°

to 158

°

F (–20

°

to 70

°

C)

5 to 95% (non-condensing)

No corrosive gases permitted

MIL STD 810C 514.2

MIL STD 810C 516.2

NEMA ICS3–304

Analog Output

Configuration

Requirements

8–3

F3–04DAS 4-Channel Isolated Analog Output

The F3–04DAS Analog Output appears as a 16-point module. The module can be installed in any slot configured for 16 points, but should not be installed in Slot 3 of

any DL305 base. See the DL305 User Manual for details on using 16 point modules in DL305 systems. The limitation on the number of analog modules are:

S

For local and expansion systems, the available power budget and

16-point module usage are the limiting factors.

WARNING: You should not install this module in Slot 3 of any DL305 base. The module has traces on the edge card connector that may become damaged if the module is repeatedly installed and removed. The solder mask that protects the traces may be scraped off, which may cause a short circuit on the

I/O bus. The short circuit can lead to unpredictable system operation or cause damage to the CPU or power supply.

3 2 1 0 C

P

U

DL305

6 5 4 3 2 1 0 C

P

U

DL305

10 or

70

7 6 5 4 3 2 1 0 C

P

U

DL305

8–4

F3–04DAS 4-Channel Isolated Analog Output

Setting the Module Jumpers

Jumper Locations

The module is set at the factory for a 0–10V signal on all four channels. If this is acceptable you do not have to change any of the jumpers.

If you examine the top board on the module you will notice four sets of jumpers. The jumpers are assigned to the channels as follows.

S

Channel 1 — Jumper JP4

S

Channel 2 — Jumper JP3

S

Channel 3 — Jumper JP2

S

Channel 4 — Jumper JP1

NOTE: At first glance it might appear we have the channel / jumper assignments out of order. Your eyes do not deceive you. Channel 1 is controlled by JP4.

Each channel also has a jumper located on the bottom board of the module. These jumpers select a 1V (or 4mA) offset for each channel. Remove the jumper for any range that requires an offset. These jumpers are assigned as expected. JP1 selects an offset for channel 1, JP2 selects an offset for channel 2, etc.

The following diagram shows how the jumpers are assigned. It also shows the factory settings.

Channel 1 Range

1

Channel 2 Ranges

J

P

3

1

Channel 3 Ranges

J

P

2

1

Channel 4 Ranges

1

JP1

J

P

4

Channel 1 Offset

J

P

1

Channel 2 Offset

JP2

Channel 3 Offset

JP3

Channel 4 Offset

JP4

8–5

F3–04DAS 4-Channel Isolated Analog Output

Selecting Input

Signal Ranges

The following tables show the jumper selections for the various ranges. (Only channel 1 is used in the example, but all channels must be set.)

Bipolar Signal Range

–5 VDC to +5 VDC

Jumper Settings

Channel 1 (JP4)

Offset Jumper (JP1)

1

–10 VDC to +10 VDC

Channel 1 (JP4)

Offset Jumper (JP1)

Unipolar Signal Range

4 to 20 mA

(1 VDC to 5 VDC)

1

Jumper Settings

Channel 1 (JP4)

Offset Jumper (JP1)

1

0 VDC to +5 VDC

(0 to +20 mA)

Channel 1 (JP4)

Offset Jumper (JP1)

0 VDC to +10 VDC

1

Channel 1 (JP4)

Offset Jumper (JP1)

1

8–6

F3–04DAS 4-Channel Isolated Analog Output

Special Output

Signal Ranges

The following tables show the jumper selections for some additional ranges that are not normally found in many applications. Notice you can install or remove the offset jumper to change the settings. (Only channel 1 is used in the example, but all channels must be set.)

Signal Range

Offset Installed

Signal Range

Offset Removed

–10 VDC to +6 VDC –9 VDC to +7 VDC

Jumper Settings

Channel 1 (JP4)

–5 VDC to +3 VDC –4 VDC to +4 VDC

1

Channel 1 (JP4)

–2.5 VDC to

+2.5 VDC

–2.5 VDC to

+1.5 VDC

–1.5 VDC to

+3.5 VDC

–1.5 VDC to

+2.5 VDC

1

Channel 1 (JP4)

1

Channel 1 (JP4)

1

0 VDC to 8 VDC 1 VDC to 9 VDC

0 VDC to 4 VDC 1 VDC to 5 VDC

Channel 1 (JP4)

1

Channel 1 (JP4)

1

8–7

F3–04DAS 4-Channel Isolated Analog Output

Connecting the Field Wiring

Wiring Guidelines

Your company may have guidelines for wiring and cable installation. If so, you should check those before you begin the installation. Here are some general things to consider.

S

Use the shortest wiring route whenever possible.

S

Use shielded wiring and ground the shield at the module or the power supply return (0V). Do not ground the shield at both the module and the transducer.

S

Don’t run the signal wiring next to large motors, high current switches, or transformers. This may cause noise problems.

S

Route the wiring through an approved cable housing to minimize the risk of accidental damage. Check local and national codes to choose the correct method for your application.

User Power Supply

Requirements

The F3–04DAS receives all power from the base. A separate power supply is not required.

Load

Requirements

Each channel can be wired independently for a voltage or current transducer.

S

Current transducers must have an impedance less than 470 ohms.

S

Voltage transducers must have an impedance greater than 2K ohms.

8–8

F3–04DAS 4-Channel Isolated Analog Output

Removable

Connector

Wiring Diagram

The F3–04DAS module has a removable connector to make wiring easier. Simply squeeze the top and bottom tabs and gently pull the connector from the module.

Current

Output

0-470 ohm

CH2

Current

Output

0-470ohm

CH3

Voltage

Output

2K ohm min

CH4

Voltage

Note1: Shields should be connected to the respective channel’s

– V terminal of the module.

Note 2: Each isolated output channel may have either a voltage or current load, but not both

Note 3: An external 0.31 Amp fast-acting fuse in series with the isolated

+I terminal (+15VDC) is recommended to protect against accidental shorts to the –V terminal (15VDC common)

Note 4: Do not attempt to source more than 20mA from any one of the four isolated +15VDC power supplies

Internal Module Wiring

See note

+I

–I

+I

–I

+I

–I

+I

–I

CH1

CH2

CH3

CH4

+V

–V

+V

–V

+V

–V

+V

–V

Voltage

Output

Current

Sink

CH1

15VDC (20mA)

Isolated Power

Voltage

Output

Current

Sink

CH4

15VDC (20mA)

Isolated Power

Internal wiring for CH2 & 3 is similar to wiring shown above

ANALOG OUTPUT

F3–04DAS

+I

CH1

–I

+V

CH1

–V

+I

CH2

–I

+V

CH2

–V

+I

CH3

–I

+V

CH3

–V

+I

CH4

–I

+V

CH4

–V

Combining Voltage

Outputs

You may occasionally encounter transmitters that have a very unusual signal range.

Since each channel is isolated, you can “daisy chain” the channels to provide output voltage signals that are outside of the normal operating range. For example, you could connect the first two channels to provide a voltage output from 0 to 20 VDC.

User Load

2K ohm min 0–20V

+V

CH1 0–10

–V

CH1 & 2 are configured for 0–10V

+V

CH2 0–10

–V

8–9

F3–04DAS 4-Channel Isolated Analog Output

Combining Current

Outputs

You cannot connect the current outputs in series (like the voltage outputs) but you can achieve unusual ranges with a few wiring and programming tricks. For example, let’s say an application requires a

"

20 mA range. By completing the following steps, you could easily accommodate this requirement.

1. Configure channel 1 and channel 2 for 0–20mA.

2. Connect the +I of channel 1 to the –I of channel 2.

3. Connect the –I of channel 1 to the +I of channel 2.

4. Send 0 (digital value) to channel 2 while you send 0–4095 (digital value) to channel 1. To reverse the power flow, send 0 to channel 1 while you send the 0–4095 value to channel 2. (See the section on Writing the Control

Program for information on sending data values.)

WARNING: The isolated +15 VDC power supplies are rated at a maximum of 20 mA. Current ratings that exceed 20 mA will damage the module beyond repair.

For example, if you used the 0–10 VDC range for the example, the current would approach 40 mA which would cause damage to the module.

User Load

0–470 ohm +/– 20mA

+I

CH1 0–20mA

–I

CH1 & 2 are configured for 0–20mA

+I

0–20mA CH2

–I

8–10

F3–04DAS 4-Channel Isolated Analog Output

Module Operation

Channel Scanning

Sequence

Before you begin writing the control program, it is important to take a few minutes to understand how the module processes and represents the analog signals.

The F3–04DAS module can update one channel per CPU scan. Your RLL program selects the channel to update, so you have complete flexibility in solving your application requirements.

Channel 1

Channel 3

Channel 1

Channel 4

Channel 2

Scan N

Scan N+1

Scan N+2

Scan N+3

Scan N+4

Scan

I/O Update

Execute Application Program

Calculate the data

Write data

F3–04DAS 4-Channel Isolated Analog Output

8–11

Understanding the

I/O Assignments

You may recall the F3–04DAS module appears to the CPU as a 16-point module.

These 16 points provide:

S the digital representation of the analog signal.

S identification of the channel to receive the data.

Since all I/O points are automatically mapped into Register (R) memory, it is very easy to determine the location of the data word that will be assigned to the module.

F3–04DAS

8pt

Relay

050

057

8pt

Output

8pt

Output

040

047

030

037

16pt

Input

4ch.

(Analog)

16pt

Input

020

027

120

127

010

017

110

117

000

007

100

107

R 002, R012

MSB

1

1

7

R 011

LSB

1

1

0

R 000, R010

MSB

0

1

7

R 001

LSB

0

1

0

Channel Selection

Inputs

Within these two word locations, the individual bits represent specific information about the analog signal.

The last four points of the upper register are used as outputs to tell the module which channel to update. In our example, when output 114 is on, channel 1 will be updated. Here’s how the outputs are assigned.

Output Channels

114

115

116

117

1

2

3

4

MSB

R011

1

1

7

1

1

6

1

1

5

1

1

4

1

1

3

1

1

2

1

1

1

1

1

0

LSB

- channel selection inputs

8–12

F3–04DAS 4-Channel Isolated Analog Output

Analog Data Bits

The remaining twelve bits represent the analog data in binary format.

Bit

0 (LSB)

3

4

1

2

5

Value

1

8

16

2

4

32

Bit

6

9

10

7

8

11

Value

64

128

256

512

1024

2048

MSB

R011

1

1

7

1

1

6

1

1

5

1

1

4

1

1

3

1

1

2

1

1

1

1

1

0

0

1

7

0

1

6

0

1

5

0

1

4

0

1

3

0

1

2

0

1

1

0

1

0

- data bits

R001

LSB

Since the module has 12-bit resolution, the analog signal is converted into 4096

“pieces” ranging from 0 – 4095 (2

12

). For example, with a 0 to 10V scale, a 0V signal would be 0, and a 10V signal would be 4095. This is equivalent to a a binary value of

0000 0000 0000 to 1111 1111 1111, or 000 to FFF hexadecimal. The following diagram shows how this relates to each signal range.

+V

–10V – +10V

–5V – +5V

+V

0V – 10V

0V – 5V

+5V

1V – 5V

20mA

4 – 20mA

0V

-V

0 4095

0V

0 4095

1V

0 4095

4mA

0 4095

Each “piece” can also be expressed in terms of the signal level by using the equation shown. The following table shows the smallest signal levels that will possibly result in a change in the data value for each signal range.

Resolution

+

H

*

L

4095

H = high limit of the signal range

L = low limit of the signal range

Range

–10 to +10V

–5 to +5V

0 to 5V

0 to 10V

1 to 5V

4 to 20mA

Highest Signal

+10V

+5 V

5V

10V

5V

20mA

Lowest Signal Smallest Change

–10V

–5V

0V

0V

1V

4mA

4.88 mV

2.44 mV

1.22 mV

2.44 mV

0.98 mV

3.91 m

A

Now that you understand how the module and CPU work together to gather and store the information, you’re ready to write the control program.

F3–04DAS 4-Channel Isolated Analog Output

8–13

Writing the Control Program (DL330 / DL340)

Identifying the

Data Locations

As mentioned earlier, you can use the channel selection bits to determine which channels will be updated. The following diagram shows the location for both the channel selection bits and data bits.

F3–04DAS

8pt

Relay

050

057

8pt

Output

040

047

8pt

Output

030

037

16pt

Input

4ch.

(Analog)

16pt

Input

020

027

120

127

010

017

110

117

000

007

100

107

Calculating the

Digital Value

R 002, R012 R 000, R010

R 011

MSB LSB

1

1

7

1

1

6

1

1

5

1

1

4

1

1

0

- data bits

- channel selection inputs

MSB

0

1

7

R 001

LSB

0

1

0

Your program has to calculate the digital value to send to the analog module.

There are many ways to do this, but most 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.

A

+

4096

U

H

*

L

A = Analog value (0 – 4095)

U = Engineering Units

H = high limit of the Engineering unit range

L = low limit of the Engineering unit range

The following example shows how you would use Engineering Units to obtain the digital value to represent pressure (PSI) from 0 to 100. This example assumes you want to obtain a pressure of 42 PSI, which is slightly less than half scale.

A

+

4096

U

H

*

L

A

+

4096

42

100

*

0

A

+

1720

8–14

F3–04DAS 4-Channel Isolated Analog Output

Here’s how you would write the program to perform the Engineering Unit conversion.

This example assumes you have calculated or loaded the engineering unit value and stored it in R400. Also, you have to perform this for all channels if you’re using different data for each channel.

This example assumes you have already loaded the Engineering unit value in R400.

Scale the data

374

DSTR

R400

DIV

K100

F50

F74

This instruction loads Engineering unit value into the accumulator on every scan.

Accumulator

0 0 4 2

Aux. Accumulator

0 0 0 0

R577 R576

The Engineering unit value is divided by the

Engineering unit range, which in this case is 100.

(100 – 0 = 100)

Accumulator

0 0 0 0

Aux. Accumulator

4 2

R577

0 0

R576

DSTR

R576

F50

This instruction moves the two-byte decimal portion into the accumulator for further operations.

Accumulator

4 2 0 0

Aux. Accumulator

4 2 0 0

R577 R576

MUL

K4096

F73

DSTR

R576

F50

DOUT

R450

F60

The accumulator is then multiplied by the module resolution, which is 4096. (4096 x 4200 =

17203200). Notice the most significant digits are now stored in the auxilliary accumulator. (This is different from the Divide instruction operation.)

Accumulator

3 2 0 0

Aux. Accumulator

1 7

R577

2 0

R576

This instruction moves the two-byte auxilliary accumulator for further operations.

Accumulator

1 7 2 0

Aux. Accumulator

1 7 2 0

R577 R576

This instruction stores the accumulator to R450 and R451. R450 and R451 now contain the digital value, which is 1720.

Accumulator

1 7 2 0

Store in R451 & R450

1 7 2 0

R451 R450

F3–04DAS 4-Channel Isolated Analog Output

8–15

There will probably be times when you need more precise control. For example, maybe your application requires 42.9 PSI, not just 42 PSI. By changing the scaling value slightly, we can “imply” an extra decimal of precision. Notice in the following example we’ve entered 429 as the Engineering unit value and we’ve added another digit to the scale. Instead of a scale of 100, we’re using 1000, which implies 100.0 for the PSI range.

This example assumes you have already loaded the Engineering unit value in R400.

Scale the data

374

DSTR

R400

F50

DIV

K1000

F74

DSTR

R576

F50

MUL

K4096

F73

DSTR

R576

F50

DOUT

R450

F60

This instruction loads Engineering unit value into the accumulator on every scan.

Accumulator

0 4 2 9

Aux. Accumulator

0 0 0 0

R577 R576

The Engineering unit value is divided by the

Engineering unit range, which in this case is 1000.

(100.0 implied range)

Accumulator

0 0 0 0

Aux. Accumulator

4 2

R577

9 0

R576

This instruction moves the two-byte decimal portion into the accumulator for further operations.

Accumulator

4 2 9 0

Aux. Accumulator

4 2 9 0

R577 R576

The accumulator is then multiplied by the module resolution, which is 4096. (4096 x 4290 =

17571840). Notice the most significant digits are now stored in the auxilliary accumulator. (This is different from the Divide instruction operation.)

Accumulator

1 8 4 0

Aux. Accumulator

1 7

R577

5 7

R576

This instruction moves the two-byte auxilliary accumulator for further operations.

Accumulator

1 7 5 7

Aux. Accumulator

1 7 5 7

R577 R576

This instruction stores the accumulator to R450 and R451. R450 and R451 now contain the digital value, which is 1757.

Accumulator

1 7 5 7

Store in R450 & R451

1 7 5 7

R450 R451

8–16

F3–04DAS 4-Channel Isolated Analog Output

Sending Data to a

Single Channel

The following program example shows how to send the digital value to a single channel.

This example assumes you have already loaded the Engineering unit value in R450 and R451.

Send Channel 1

374

DSTR

R450

F50

This rung loads the data into the accumulator on every scan.

BIN

DOUT5

R001

F85

F65

Since the data is in BCD format, you have to convert it to binary before you send the data to the module.

Send the accumulator data to the Register that corresponds to the module, which is R001.

114

OUT

115

OUT

Indicate the channel to update. In this case, channel 1 is being updated.

To update other channels with the same output data, simple add the channel selection outputs for the additional channels.

If you install the F3–04DA–1 in the slot corresponding to registers 6 and 16, you have to make a slight program adjustment. This is because the DOUT5 instruction is not supported for this slot.

This example assumes you have already loaded the Engineering unit value in R450 and R451.

Send Channel 1

374

DSTR

R450

F50

This rung loads the data into the accumulator on every scan.

BIN

DOUT1

R006

SHFR

K0008

F85

F61

F80

Since the data is in BCD format, you have to convert it to binary before you send the data to the module.

Send the 8 least significant data bits to the first

Register that corresponds to the module which is

R006.

Shift the 4 most significant data bits to the right 8 places. (The data is still in the accumulator).

DOUT3

R016

F63

Send the 4 most significant data bits to the second

Register that corresponds to the module which is

R016.

164

OUT

Indicate the channel to update. In this case, channel 1 is being updated.

F3–04DAS 4-Channel Isolated Analog Output

8–17

Sequencing the

Channel Updates

Sequencing

Example

This example shows how to send digital values to the module when you have more than one channel. This example will automatically update all four channels over four scans. The example is fairly simple and will work in most all situations, but there are instances where problems can occur. The logic must be active on the first CPU scan and all subsequent scans. If the logic gets stopped or disabled for some reason, there is no way to restart it. If you’re using an RLL

PLUS

(Stage) program, put this logic in an initial stage that is always active. Also, you should avoid using the this example if you require the analog output logic to be used inside a Master Control Relay field of control. You could also accidentally disable the analog output logic by inadvertently writing to the multiplexing control relays with an operator interface or intelligent module, such as an ASCII BASIC module, etc.

The following program example shows how to send the digital values to multiple channels. With this program, all channels will be updated within four scans. You must use the rungs in the order shown, but you can include them anywhere in the program.

Ch4 Done

117

160

OUT

When channel 4 has been updated, 160 restarts the update sequence.

Ch3 Done

116

DSTR

R456

F50

117

OUT

When channel 3 has been updated, this rung loads the data for channel 4 into the accumulator. By turning on 117, this triggers the channel update.

(Since 117 is also used as an input, this results in a one-shot.)

Ch2 Done

115

DSTR

R454

F50

116

OUT

When channel 2 has been updated, this rung loads the data for channel 3 into the accumulator. By turning on 116, this triggers the channel update.

(Since 116 is also used as an input, this results in a one-shot.)

Ch1 Done

114

DSTR

R452

F50

115

OUT

When channel 1 has been updated, this rung loads the data for channel 2 into the accumulator. By turning on 115, this triggers the channel update.

(Since 115 is also used as an input, this results in a one-shot.)

Restart

160

374

374

On

First

Scan

Always on

DSTR

R450

BIN

F50

114

OUT

F85

DOUT1

R001

F61

SHFR

K 8

F80

DOUT3

R0011

F63

This rung loads the data for channel 1 into the accumulator. Since 374 is used, this rung automatically executes on the first scan. After that,

160 restarts this rung. If you examine the first rung, you’ll notice 160 only comes on after channel 4 has been updated.

Since the data is in BCD format, you have to convert it to binary before you send the data to the module. (You can omit this step if you’ve already converted the data elsewhere.)

Send the 8 least significant data bits to the first

Register that corresponds to the module which is

R001.

Shift the 4 most significant data bits to the right 8 places. (The data is still in the accumulator).

Send the 4 most significant data bits to the second

Register that corresponds to the module which is

R011.

8–18

F3–04DAS 4-Channel Isolated Analog Output

Writing the Control Program (DL350)

Reading Values:

Pointer Method and Multiplexing

Pointer Method

There are two methods of reading values:

S

The pointer method (all system bases must be D3–xx–1 to support the

pointer method)

S

Multiplexing

You must use the multiplexing method with remote I/O modules (the pointer method will not work). You can use either method when using DL350 CPU, but for ease of programming it is strongly recommended that you use the pointer method.

The DL350 has special V-memory locations assigned to each base slot that greatly simplifies the programming requirements. By using these V-memory locations you can:

S specify the number of channels to update.

S specify where to obtain the output data.

NOTE: Do not use the pointer method and the PID Control Output auto transfer to

I/O module function together for the same module. If using PID loops, use the pointer method and ladder logic code to map the analog output data from the PID loop to the output module memory location(s).

The following program example shows how to set up these locations. Place this rung anywhere in the ladder program, or in the initial stage when using stage programming.

SP0

LD

K

4

- or -

LD

K 84

Loads a constant that specifies the number of channels to scan and the data format. The lower byte, most significant nibble (MSN) selects the data format (i.e. 0=BCD, 8=Binary), the LSN selects the number of channels (1 or 2).

The binary format is used for displaying data on some operator interfaces.

Special V-memory location assigned to slot 3 that contains the number of channels to scan.

LDA

O2000

OUT

V7703

This loads an octal value for the first V-memory location that will be used to store the output data. For example, the O2000 entered here would designate the following addresses.

Ch1 – V2000, Ch2 – V2001

The octal address (O2000) is stored here. V7703 is assigned to slot

3 and acts as a pointer, which means the CPU will use the octal value in this location to determine exactly where to store the output data.

The table shows the special V-memory locations used with the DL350. Slot 0 (zero) is the module next to the CPU. Remember, the CPU only examines the pointer values at these locations after a mode transition. The pointer method is supported on expansion bases (all bases must be D3–xx–1) up to a total of 8 slots away from the

DL350. The pointer method is not supported in slot 8 of a 10 slot base.

Slot

OUT

V7663

Analog Output Module Slot Dependent V-memory Locations

0 1 2 3 4 5 6 7

No. of Channels V7660 V7661 V7662 V7663 V7664 V7665 V7666 V7667

Storage Pointer V7700 V7701 V7702 V7703 V7704 V7705 V7706 V7707

F3–04DAS 4-Channel Isolated Analog Output

8–19

Multiplexing:

DL350 with a

D3–xx–1 Base

This example assumes the module is in Y0 address slot of a D3–xx–1. In this example V2000 contains the data for channel 1 and V2001 for channel 2, etc. in

BCD. If any expansion bases are used in the system, they must all be D3–xx–1 to be able to use this example. Otherwise, the conventional base addressing must be used.

SP1

INC

V1400

This rung loads increments V1400 once every scan from 0–4.

Channel 1

V1400

=

K1

LD

V2000

OUT

V3000

(

Y14

OUT

)

This rung loads the data for channel 1 into the accumulator when V1400 = 1.

The data is stored in V3000 before sending it to the module.

The channel select bit for channel 1 is Y14.

Channel 2

V1400

=

K2

LD

V2001

OUT

V3000

(

Y15

OUT

)

This rung loads the data for channel 2 into the accumulator when V1400 = 2.

The data is stored in V3000 before sending it to the module.

Channel 3

V1400

=

K3

LD

V2002

OUT

V3000

(

Y16

OUT

)

The channel select bit for channel 2 is Y15.

This rung loads the data for channel 3 into the accumulator when V1400 = 3.

The data is stored in V3000 before sending it to the module.

Channel 4

V1400

=

K4

LD

V2003

OUT

V3000

LD

K0

The channel select bit for channel 3 is Y16.

This rung loads the data for channel 4 into the accumulator when V1400 = 4.

The data is stored in V3000 before sending it to the module.

V1400 is reset to 0 when V1400 is =4.

OUT

V1400

(

Y17

OUT

)

example program continued on next page

The channel select bit for channel 4 is Y17.

8–20

F3–04DAS 4-Channel Isolated Analog Output

Multiplexing:

DL350 with

Conventional

DL305 Base example program continued from previous page

SP1

LD

V3000

BIN

OUTF

K12

Y0

This rung converts the appropriate analog channel data to binary for the module.

The OUTF instruction sends the 12 bits of analog data to the analog module memory address.

This example assumes the module is in the Y0–10 / Y100–107 slot of a 305 conventional base. In this example V2000 contains the BCD data for channel 1 and

V2001 contains the data for channel 2, etc. One more rung would be necessary for channel 4.

SP1

INC

V1400

This rung loads increments V1400 once every scan from 0–4.

Channel 1

V1400

=

K1

Channel 3

V1400

=

K3

LD

V2000

OUT

V3000

(

Y114

OUT

)

This rung loads the data for channel 1 into the accumulator when V1400 = 1.

The data is stored in V3000 before sending it to the module.

The channel select bit for channel 1 is Y14.

Channel 2

V1400

=

K2

LD

V2001

OUT

V3000

(

Y115

OUT

)

LD

V2002

OUT

V3000

(

Y116

OUT

)

This rung loads the data for channel 2 into the accumulator when V1400 = 2.

The data is stored in V3000 before sending it to the module.

The channel select bit for channel 2 is Y15.

This rung loads the data for channel 3 into the accumulator when V1400 = 3.

The data is stored in V3000 before sending it to the module.

The channel select bit for channel 3 is Y16.

example program continued on next page

F3–04DAS 4-Channel Isolated Analog Output

8–21 example program continued from previous page

Channel 4

V1400

=

K4

LD

V2003

OUT

V3000

LD

K0

OUT

V1400

(

Y117

OUT

)

This rung loads the data for channel 4 into the accumulator when V1400 = 4.

The data is stored in V3000 before sending it to the module.

V1400 is reset to 0 when V1400 is =4.

The channel select bit for channel 4 is Y17.

SP1

LD

V3000

BIN

The BIN converts the appropriate analog channel data to binary for the module.

ANDD

Kfff

OUTF

K8

Y0

SHFR

K8

OUTF

K4

Y100

The OUTF and SHFR instruction formats the data and sends the 12 bits of analog data to the analog module memory address.

8–22

F3–04DAS 4-Channel Isolated Analog Output

Calculating the

Digital Value

Your program must calculate the digital value to send to the analog module.

There are many ways to do this, but most 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.

A

+

U

4095

H

*

L

A = Analog value (0 – 4095)

U = Engineering Units

H = high limit of the engineering unit range

L = low limit of the engineering unit range

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

4095

10(H

*

L)

A

+

494

4095

1000

*

0

A

+

2023

F3–04DAS 4-Channel Isolated Analog Output

8–23

The example program below shows how you would write the program to perform the engineering unit conversion. This example assumes you have calculated or loaded the engineering unit values in BCD and stored them in V2300 and V2301 for channels 1 and 2 respectively.

NOTE: The DL350 offers various instructions that allow you to perform math operations using BCD format. It is easier to perform math calculations in BCD and then convert the value to binary before sending the data to the module.

SP1

SP1

LD

V2300

MUL

K4095

DIV

K1000

OUT

V3000

LD

V2301

MUL

K4095

DIV

K1000

OUT

V3001

The LD instruction loads the engineering units used with channel 1 into the accumulator. This example assumes the numbers are BCD. Since

SP1 is used, this rung automatically executes on every scan. You could also use an X, C, etc. permissive contact.

Multiply the accumulator by 4095 (to start the conversion).

Divide the accumulator by 1000 (because we used a multiplier of

10, we have to use 1000 instead of 100).

Store the BCD result in V3000 (the actual steps to write the data were shown earlier).

The LD instruction loads the engineering units used with channel 2 into the accumulator. This example assumes the numbers are BCD. Since

SP1 is used, this rung automatically executes on every scan. You could also use an X, C, etc. permissive contact.

Multiply the accumulator by 4095 (to start the conversion).

Divide the accumulator by 1000 (because we used a multiplier of

10, we have to use 1000 instead of 100).

Store the BCD result in V3001 (the actual steps to write the data were shown earlier).

8–24

F3–04DAS 4-Channel Isolated Analog Output

Analog and Digital

Value Conversions

Sometimes it is helpful to be able to quickly convert between the voltage or current signal levels and the digital values. This is especially helpful during machine startup or troubleshooting. The following table provides formulas to make this conversion easier.

Range

–10V to + 10V

If you know the digital value ...

If you know the signal level ...

A

+

20D

4095

*

10 D

+

4095

20

(A

)

10)

–5V to + 5V

0 to 5V

0 to 10V

A

A

+

5D

4095

A

+

+

10D

4095

10D

4095

*

5 D

D

+

+

4095

10

4095

5

(A

)

5)

A

D

+

4095

10

A

1 to 5V

4 to 20mA

A

A

+

+

4D

4095

16D

4095

)

)

1

4

D

+

4095

4

(A

*

1)

D

+

4095

16

(A

*

4)

For example, if you are using the –10 to

+10V range and you have measured the signal at 6V, you would use the following formula to determine the digital value that should be stored in the register location that contains the data.

D

+

4095

20

(A

)

10)

D

+

4095

20

(6V

)

10)

D

+

(204.75) (16)

D

+

3276

Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement