Smart Star
User's Manual
PREV NEXT INDEX



8. A/D Converter Cards

Chapter 8 describes the features of the A/D 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 operates at 25.8 MHz to provide fast data processing.

8.1 A/D Converter Card Features

Three models of A/D converter cards are available, as shown in Table 12.


8.2 User Interface

Figure 33 shows the circuit used to condition the analog signal before it goes to the A/D converter chip. Depending on the model of A/D converter card you have, it is designed to handle analog inputs of 0 V to 10 V, -10 V to +10 V, or 4-20 mA. The two different voltage ranges are handled with different gain resistors, Rg: 23.7 kW for the SR9300 and 12.1 kW for the SR9310. The input shown in Figure 33 is configured differently for the SR9320, which handles analog inputs of 4-20 mA.


Figure 33. Analog Input Amplifier Circuit

Figure 34 shows the complete pinout for the user interface on header J2. Note that pin 1 is indicated by a small arrow on the ribbon cable connector.


Figure 34. A/D Converter Card User Interface Pinout

8.3 User FWT Connections

Connections to the A/D converter cards are made via a ribbon cable connector or optional field wiring terminals that are either pluggable or have screw terminals. Table 13 lists the the Z-World part numbers for the FWTs.


8.4 Pinouts

Figure 35 shows the pinout for the FWTs used on the A/D converter cards.


Figure 35. FWT Pinout for
A/D Converter Cards

8.5 Power Distribution

Figure 36 shows the power distribution on the A/D converter card.


Figure 36. A/D Converter Card Power Distribution

8.6 Software

Dynamic C Premier is an integrated development system for writing embedded software. It runs on an IBM-compatible PC and is designed for use with Z-World controllers and other controllers based on the Rabbit microprocessor.

Dynamic C Premier is an integrated development system for writing embedded software. It runs on an IBM-compatible PC and is designed for use with Z-World controllers and other controllers based on the Rabbit microprocessor.

8.6.1 Dynamic C Libraries

With Dynamic C running, click File > Open, and select Lib. The following list of Dynamic C libraries and library directories will be displayed.


One library directory is specific to the Smart Star.

Other functions applicable to all devices based on the Rabbit 2000 microprocessor are described in the Dynamic C Premier User's Manual.

8.6.2 Library Directories

The SMRTSTAR directory contains libraries required to operate the Smart Star control system.


8.6.3 Smart Star A/D Converter Card Function APIs

int anaInEERd(int channel);


The A/D converter card calibration constants, gain, and offset are stored in the factory in the upper half of the EEPROM on the A/D converter card. Use this function to read the A/D converter card calibration constants, gain, and offset from the upper half of the EEPROM on the A/D converter card
Parameters
channel is the analog input channel. channel should be passed as
where slotnumber is 0-6, and channelnumber is 0-10
or
where slotnumber is 0-6, and channelnumber is 0-10.
Return Value
0 if successful.
-1--control command unacceptable.
-2--EEPROM address unacceptable.
See Also

int anaSaveCalib();


The calibration constants may also be saved in the flash memory on the Smart Star CPU card. Doing so will speed up A/D conversions since a memory access from flash memory will be faster than from EEPROM. Use anaSaveCalib to save the current set of calibration constants for the analog input and output channels in the Smart Star flash memory. The calibration constants stored in flash memory can then be accessed at any time with the anaLoadCalib function.
If the factory-set calibration are not used, customer-measured calibration constants should first be established using the anaInCalib function.
Return Value
None.
See Also

void anaLoadCalib();


Reads a complete set of calibration constants for the analog input and output channels from the Smart Star flash memory on the CPU card. These should be set using the anaInCalib or anaInEERd function, then saved to flash memory using the anaSaveCalib function.
Return Value
None.
See Also

int anaInCalib(int channel, int value1, float volt1, int value2, float volt2);


Used to recalibrate the response of the A/D converter channel as a linear function using the two conversion points provided. Gain and offset constants are calculated and placed into the global table _adcCalib.
Parameters
channel is the A/D converter input channel (0-10). channel should be passed as
where slotnumber is 0-6, and channelnumber is 0-10
or
where slotnumber is 0-6, and channelnumber is 0-10.
value1 is the first A/D converter value.
volt1 is the voltage corresponding to the first A/D converter value.
value2 is the second A/D converter value.
volt2 is the voltage corresponding to the first A/D converter value.
Return Value
0 if successful, -1, if not able to make calibration constants.
See Also

int anaInEEWr(int channel);


Writes the calibration constants, gain, and offset to the upper half of the EEPROM on the A/D converter card.
Parameters
channel is the analog input channel. channel should be passed as
where slotnumber is 0-6, and channelnumber is 0-10
or
where slotnumber is 0-6, and channelnumber is 0-10.
Return Value
0 if successful.
-1--control command unacceptable.
-2--EEPROM address unacceptable.
-3--data value unacceptable.
See Also

unsigned int anaIn(unsigned int channel);


Reads the state of an analog input channel and converts it to a digital value. A timeout occurs, causing the function to exit, if the end of the conversion is not detected within 13 µs.
Parameters
channel is the analog input channel to read. channel should be passed as
where slotnumber is 0-6, and channelnumber is 0-10
or
where slotnumber is 0-6, and channelnumber is 0-10.
Return Value
A value corresponding to the voltage on the analog input channel, 0-4095. A value outside this range indicates a failure
See Also

int anaInVolts(int channel);


Reads the state of an analog input channel and uses the previously set calibration constants to convert the state to volts.
Parameters
channel is the analog input channel. channel should be passed as
where slotnumber is 0-6, and channelnumber is 0-10
or
where slotnumber is 0-6, and channelnumber is 0-10.
Return Value
A voltage value corresponding to the voltage on the analog input channel, 0-4095.
See Also

8.6.4 Sample Programs

8.6.4.1 Using Dynamic C

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 in Program Mode (see Section 4.1, "Programming Cable") and 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 Premier User's Manual.

8.7 Electrical and Mechanical Specifications

Figure 37 shows the mechanical dimensions for the A/D converter card.


Figure 37. Relay Card Dimensions

NOTE All diagram and graphic measurements are in inches followed by millimeters enclosed in parentheses.

Table 14 lists the electrical, mechanical, and environmental specifications for the A/D converter card.

1 The A/D converter card is protected against transients that might exceed the maximum ratings.
2 Accuracy at temperature extremes can be improved by recalibrating the A/D converter card at the temperature it will be used at.


PREV NEXT INDEX


Z-World
http://www.zworld.com
Voice: (530) 757-3737
FAX: (530) 757-3792
sales@zworld.com