![]() |
| Smart Star User's Manual |
9. D/A Converter Cards
Chapter 9 describes the features of the D/A Converter Card, one of the I/O cards designed for the Smart Star embedded control system.
The Smart Star is a modular and expandable embedded control system whose configuration of I/O, A/D Converter, D/A Converter, and Relay Cards can be tailored to a large variety of demanding real-time control and data acquisition applications.
The typical Smart Star system consists of a rugged backplane with a power supply, a CPU card, and one or more I/O cards. The CPU card plugs into a designated slot on the backplane chassis, which has seven additional slots available for I/O cards to be used in any combination. A high-performance Rabbit 2000 microprocessor on the CPU card provides fast data processing.
9.1 D/A Converter Card Features
Three models of D/A Converter Cards are available, as shown in Table 17.
Table 17. Smart Star D/A Converter Cards 12-bit D/A converter, 8 channels, 0 V - 10 V
12-bit D/A converter, 8 channels, -10 V - +10 V
12-bit D/A converter, 8 channels, 4 mA - 20 mA
9.2 User Interface
Figure 38 shows the D/A converter circuit. A buffer, U6, buffers the data signals D0-D7 from the Smart Star backplane, and sends them to the D/A converter, U2-U5. Signals D2-D5 are used to switch the chip select line to identify which D/A converter will perform the conversion. The model of D/A Converter Card determines the analog output ranges (0 V to 10 V, -10 V to +10 V, or 4-20 mA). The different voltage or current ranges are handled with different feedback resistors, as shown in Figure 38. A switching regulator provides a regulated power supply for the op-amps.
![]()
NOTE The D/A_SEN[0-7] sensing inputs are not used when using the current source version (model SR9420) of the D/A Converter Card. Figure 39 shows the complete pinout for the user interface on header J1. Note that pin 1 is indicated by a small arrow on the ribbon cable connector.
![]()
The D/A Converter Card has eight analog output channels, D/A_OUT[0-7], and is also equipped with a remote sensing capability through sensing inputs D/A_SEN[0-7] for the voltage-amplifier versions of the D/A Converter Card (models SR9400 and SR9410). These sensing inputs compensate for the voltage drop across the wire leads of low-impedance loads to provide a more precise output across the load.
Let's look at Figure 40 to see how this happens. Assume the load is 500 W. If the impedance of the wire used to connect the load to the output terminal on the D/A Converter Card is 5 W, there will be a voltage drop of about 5 W/500 W = 1% across the wire. The voltage across the load will then be 1% less, which is about 40 counts for the SR9400. By connecting D/A_SEN as shown in Figure 40, the output driver will be able to sense the voltage drop across the wire and provide a more accurate voltage output across the load. If the load impedance is much greater than the impedance of the wire leads, simply leave the D/A_SEN sensing inputs open.
![]()
9.3 User FWT Connections
Connections to the D/A Converter Cards are made via a ribbon cable connector or optional field wiring terminals that are either pluggable or have screw terminals. Table 18 lists the Rabbit Semiconductor part numbers for the FWTs.
Table 18. Guide to FWT Selection
9.3.1 Pinouts
Figure 41 shows the pinout for the FWTs used on the D/A Converter Cards.
![]()
9.4 Power Distribution
Figure 42 shows the power distribution on the D/A Converter Card.
![]()
Figure 43 shows the power supply for the op-amps used as voltage amplifiers/current sources.
![]()
There is provision in software using the
anaOutDisableor theanaOutEnablefunction calls to turn the regulated ±12 V power supply off or on since pin 5 on U1 is connected to PE7 on the Rabbit 2000 microprocessor on the backplane. This type of disabling/enabling allows the analog output channels to float in a high-impedance state.The voltage regulator on/off is disabled by default when there is a reset or when the D/A Converter Card is first used. All output channels must be configured to the required voltage or current outputs before calling the
anaOutEnablefunction since unconfigured channels are automatically set to the maximum output.The -12 V supply is provided only for the SR9410, which provides analog outputs up to ±10 V.
9.5 Software
9.5.1 Sample Programs
ANAVOUT.C--Demonstrates how to set the D/A channel for the desired output.
SSDAC1.C--Demonstrates how to recalibrate a D/A converter channel using two known voltages, and shows how to define the two coefficients, gain and offset, that will be rewritten into the D/A Converter Card's EEPROM.
SSDAC2.C--Demonstrates how to recalibrate a D/A converter channel using an A/D Converter Card and two known voltages. Shows how to define the two coefficients, gain and offset, that will be rewritten into the D/A Converter Card's EEPROM.
SSDAC3.C--Demonstrates how to recalibrate a D/A converter channel using two known currents, and shows how to define the two coefficients, gain and offset, that will be rewritten into the D/A Converter Card's EEPROM.
SSDAC4.C--Demonstrates how to recalibrate a D/A converter channel using an A/D Converter Card, two known currents. Shows how to define the two coefficients, gain and offset, that will be rewritten into the D/A Converter Card's EEPROM.9.5.1.1 Running Sample Programs
To run a sample program, open it with the File menu (if it is not still open), compile it using the Compile menu, and then run it by selecting Run in the Run menu. The CPU Card must be connected to a PC using the programming cable as described in Section 2.3, "Programming Cable Connections."
More complete information on Dynamic C is provided in the Dynamic C User's Manual.
9.5.2 Dynamic C Libraries
The
SMRTSTARdirectory contains libraries required to operate the Smart Star control system.
SMRTSTAR.LIB--This library supports all the functions needed by the Smart Star systems including Digital I/O Cards, Relay Cards, A/D Converter and D/A Converter Cards, and serial communication.Other functions applicable to all devices based on the Rabbit 2000 microprocessor are described in the Dynamic C Function Reference Manual.
9.5.3 Smart Star D/A Converter Card Function Calls
void anaOutDisable(void);
- Turns off (disables) voltage regulator for output-channel op-amps on all D/A Converter Cards, leaving all output channels in a high-impedance state.
Return Value
- None.
See Also
anaOutEnable, anaOut, anaOutVolts, anaOutmAmps
void anaOutEnable(void);
- Turns on (enables) voltage regulator for output-channel op-amps on all D/A Converter Cards.
Return Value
- None.
See Also
anaOutDisable, anaOut, anaOutVolts, anaOutmAmps
int anaOutEERd(int channel);
- The D/A Converter Card calibration constants, gain, and offset are stored in the factory in the upper half of the EEPROM on the D/A Converter Card. Use this function to read the D/A Converter Card calibration constants into the global table
_dacCalibParameters
channelis the D/A converter output channel.channelshould be passed as
channel = (slotnumber * 128) + (channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-7
- or
channel = ChanAddr(slotnumber, channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-7.Return Value
- 0 if successful.
-1--control command unacceptable.
-2--EEPROM address unacceptable.See Also
anaOutEEWr
int anaOutCalib(int channel, int value1, float voltamp1, int value2, float voltamp2);
- Calibrates the response of the desired D/A converter channel as a linear function using the two conversion points provided. Gain and offset constants are calculated and placed into global table
_dacCalib.Parameters
channelis the D/A converter output channel.channelshould be passed as
channel = (slotnumber * 128) + (channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-7
- or
channel = ChanAddr(slotnumber, channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-7.
value1is the first D/A conversion data point. Use a value near 4095 to produce a lower output measurement.
voltamp1is the voltage/current measurement corresponding to the first D/A converter value. Current values entered as milliamps will produce milliamp values, and amp values entered will produce amp values.
value2is the second D/A conversion data point. Use a value near 0 to produce a higher output measurement.
voltamp2is the voltage/current measurement corresponding to the second D/A converter value. Current values entered as milliamps will produce milliamp values, and amp values entered will produce amp values.
Return Value
- 0 if successful.
-1 if not able to make calibration constants.See Also
anaOut, anaOutVolts, anaOutmAmps
int anaSaveCalib(int boardtype);
- The calibration constants may also be saved in the flash memory on the Smart Star CPU Card. Doing so will speed up D/A conversions since a memory access from flash memory will be faster than from EEPROM. Use
anaSaveCalibto save the current set of calibration constants for the analog input or output channels in the Smart Star flash memory. The calibration constants stored in flash memory can then be accessed at any time with theanaLoadCalibfunction.
- Calibration constants should first be established using
anaOutCalibor obtained viaanaOutEERd.Parameter
boardtypeis the type of board, which is 0 for the D/A Converter Card, 1 for the A/D Converter Card.Return Value
- 0 if successful.
-1--attempt to write non-flash area, nothing written.
-2--rootSrcnot in root.
-3--timeout while writing flash memory.
-4--attempt to write to ID block sector(s).See Also
anaLoadCalib, anaOutCalib
int anaLoadCalib(int boardtype);
- Reads a complete set of calibration constants for the analog output channels from the Smart Star flash memory on the CPU Card. These should have been loaded to the flash memory with the
anaSaveCalibfunction.Parameter
boardtypeis the type of board, which is 0 for the D/A Converter Card, 1 for the A/D Converter Card.Return Value
- 0 if successful.
-1--attempt to read from non-flash area.
-2--destination not all in root.See Also
anaSaveCalib, anaOutCalib
int anaOut(unsigned int channel, unsigned int rawcount);
- Sets the voltage of an analog output channel by serially clocking in 16 bits to a D/A converter using the following format:
SPD--Speed control bit: 1 = fast mode (default), 0 = slow mode
PWR--Power control bit: 1 = power down, 0 = normal operation (default)
The following table lists all the possible combinations of the register-selects bits R1 (Register 1) and R0 (Register 0)
Write data to D/A converter channel B
Write data to buffer
Write data to D/A converter channel A
Reserved
Parameters
channelis the D/A converter output channel to write.channelshould be passed as
channel = (slotnumber * 128) + (channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-7
- or
channel = ChanAddr(slotnumber, channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-7.
rawcountis a value corresponding to the voltage on the analog output channel (0-4095). The followingrawcountdata correspond to the analog outputs indicated.
Return Value
- 0 if successful.
-1 ifrawcountis greater than 4095.See Also
anaOutVolts, anaOutCalib
void anaOutVolts(unsigned int channel, float voltage);
- Sets the voltage of an analog output channel by using the previously set calibration constants to calculate correct data values.
Parameters
channelis the D/A converter output channel.channelshould be passed as
channel = (slotnumber * 128) + (channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-7
- or
channel = ChanAddr(slotnumber, channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-7.
- voltage is the voltage desired on the output channel.
Return Value
- None.
See Also
anaOut, anaOutCalib, anaOutmAmps
void anaOutmAmps(unsigned int channel, float current);
- Sets the current of an analog output channel by using the previously set calibration constants to calculate correct data values.
NOTE The factory-set calibration constants are for current measurements in amperes. Parameters
channelis the D/A converter output channel.channelshould be passed as
channel = (slotnumber * 128) + (channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-7
- or
channel = ChanAddr(slotnumber, channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-7.
currentis the current range (4-20 mA or 0.004-0.020 A) desired on the output channel.Return Value
- 0 if successful.
- -1 if not able to make calibration constants.
See Also
anaOut, anaOutVolts, anaOutCalib
int anaOutEEWr(int channel);
- Writes the calibration constants, gain, and offset to the upper half of the EEPROM on the D/A Converter Card.
Parameters
channelis the D/A converter output channel.channelshould be passed as
channel = (slotnumber * 128) + (channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-7
- or
channel = ChanAddr(slotnumber, channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-7.
- voltage is the voltage desired on the output channel.
Return Value
- 0 if successful.
-1--control command unacceptable.
-2--EEPROM address unacceptable.
-3--data value unacceptable.See Also
anaOutEERd9.6 Electrical and Mechanical Specifications
Figure 44 shows the mechanical dimensions for the D/A Converter Card.
![]()
NOTE All diagram and graphic measurements are in inches followed by millimeters enclosed in parentheses. Table 19 lists the electrical, mechanical, and environmental specifications for the D/A Converter Card.
| Rabbit Semiconductor www.rabbit.com |