| Smart Star User's Manual |
7. Digital I/O Cards
Chapter 7 describes the features of the digital I/O 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.
7.1 Features
The SR9200 digital I/O cards offer protected digital inputs and high-current driver outputs in three banks, each containing 8 I/O points. One bank's configuration is fixed as protected digital inputs, one bank's configuration is fixed as high-current driver outputs, and one bank may be configured either as protected digital inputs or as high-current driver outputs, depending on the model of digital I/O card selected. The high-current driver outputs are either all sinking or all sourcing, depending on the model of digital I/O card selected.
Table 6 lists the digital I/O cards that are available for the Smart Star control system.
7.2 User Interface
Figure 24 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.
7.3 User FWT Connections
Connections to the digital I/O cards are made via a ribbon cable connector or optional field wiring terminals that are either pluggable or have screw terminals. Table 7 lists the Z-World part numbers for the FWTs.
7.3.1 Pinouts
Figure 25 shows the pinout for FWT27s used on digital I/O cards. Note that only 23 of the I/O points are available on the FWT27--the HVOUT7 digital output is not available on the FWT27.
7.4 Digital Inputs and Outputs
The digital I/O card has 24 I/O points that are factory configured as either inputs or outputs in banks of eight, depending on the model.
Figure 26 shows the locations of the I/O banks.
The I/O points on Bank 0 are always inputs, and the I/O points on Bank 1 are always outputs. The I/O points on Bank 2 were configured at the factory as either inputs or outputs, depending on the model of the digital I/O card. Table 8 lists the factory configurations.
Table 8. Digital I/O Card Bank 2
Factory ConfigurationsSR9200
Inputs
SR9210
Sinking outputs
SR9220
--
SR9205
Inputs
SR9215
Sourcing outputs
SR9225
--
The operation of Bank 2 is determined by the components on the digital I/O card. There is no jumper setting to select between inputs and outputs for Bank 2.
7.4.1 Digital Inputs
Table 9 provides the pinout configuration for the input points.
The protected digital inputs, shown in Figure 27, are factory configured with 10 kW pull-up resistors. Digital I/O cards are also available in quantity with the protected digital inputs pulled down as shown in Figure 27.
A 0 W surface-mount resistor is used as a jumper to select whether the inputs are pulled up or down, as shown in Figure 28.
The digital inputs are able to operate continuously from -30 V to +30 V, and have a logic threshold of 2.5 V. They are protected against spikes up to ±48 V.
7.4.2 Digital Outputs
The high-current digital outputs are either sinking or sourcing, depending on the model of the digital I/O card. Table 10 provides the pinout configuration for the output points.
Figure 29 shows the power distribution on the digital I/O card.
When designing your interface with the Smart Star system, you need to establish whether you will use the +V_USER/+RAW supply on the backplane or your own independent K supply to drive the high-current outputs. The selection of this FPWR power supply is implemented via a 0 W surface-mount resistor on header JP1 (sinking outputs) or header JP3 (sourcing outputs) as shown in Figure 30. The factory default is to use +V_USER/+RAW, but digital I/O cards are available in quantity with the FPWR power supply jumpered to your own independent K supply.
Figure 31 shows how to connect a load to the high-current outputs based on whether your digital I/O card model has sinking or sourcing outputs.
Each high-current output is able to sink or source up to 200 mA continuously, with a load limit of 40 V. Each high-current output may be switched independently, or a whole bank may be switched at once. The total current draw should be kept below 2.0 A when all high-current outputs on one digital I/O card are operating simultaneously, and the total current draw from your +V_USER/+RAW supply for all the I/O cards should be kept below 7.0 A.
NOTE Note that the power supply provided in the Smart Star Tool Kit has a maximum output of 1.1 A. 7.5 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.
7.5.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.
7.5.2 Library Directories
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, D/A converter and A/D converter cards, and serial communication.7.5.3 Smart Star Digital I/O Card Function APIs
int digIn(int channel);
- Reads the state of a digital input channel (IN0-IN15, IN8-IN15 is not available on all versions of the digital I/O card).
Parameter
channelis the digital input channel to read.channelshould be passed as
channel = (slotnumber * 128) + (channelnumber)
- or
channel = ChanAddr(slotnumber, channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-15.Return Value
- The state of the digital input channel, 0 or 1.
See Also
digBankIn, digOut, digBankOut
int digBankIn(int bank);
- Reads the state of Bank 0 or Bank 2 (if installed) digital input channels--Bank 0 consists of IN0-IN7 and Bank 2 consists of IN8-IN15.
Parameter
bankis the bank of digital input channels to read.bankshould be passed as
bank = (slotnumber * 16) + (banknumber)
- or
bank = BankAddr(slotnumber, banknumber)
- where
slotnumberis 0-6, andbanknumberis 0 or 2.Return Value
- An input value in the lower byte, where each bit corresponds to one channel.
See Also
digIn, digOut, digBankOut
void digOut(int channel, int value);
- Writes a value to an output channel (OUT0-OUT15, OUT8-IN15 not available on all versions of the digital I/O card).
Parameters
channelis the digital output channel to write.channelshould be passed as
channel = (slotnumber * 128) + (channelnumber)
- or
channel = ChanAddr(slotnumber, channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-15.
valueis the output value, 0 or 1.Return Value
- None.
See Also
digBankOut, digIn, digBankIn
int digBankOut(int bank, int value);
- Writes a byte value to Bank 1 or Bank 2 (if installed) digital output channels--Bank 1 consists of OUT0- OUT7 and Bank 2 consists of OUT8-OUT15.
Parameter
bankis the bank of digital output channels to write.bankshould be passed as
bank = (slotnumber * 16) + (banknumber)
- or
bank = BankAddr(slotnumber, banknumber)
- where
slotnumberis 0-6, andbanknumberis 1 or 2.
valueis the output value, where each bit correspons to one channel.Return Value
- An input value in the lower byte, where each bit corresponds to one channel.
See Also
digOut, digIn, digBankIn7.5.4 Sample Programs
SSTARIO.C--Demonstrates digital I/O using individual channels and whole banks. The sample program is set up for 8 inputs and 16 outputs. If necessary, you may change the macros in the sample program to match your digital I/O card.7.5.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.
7.6 Electrical and Mechanical Specifications
Figure 32 shows the mechanical dimensions for the digital I/O card.
NOTE All diagram and graphic measurements are in inches followed by millimeters enclosed in parentheses. Table 11 lists the electrical, mechanical, and environmental specifications for the digital I/O card.
| Z-World http://www.zworld.com Voice: (530) 757-3737 FAX: (530) 757-3792 sales@zworld.com |