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.

> Table 6. Smart Star Digital I/O Cards
> I/O Card | Model | Features
> Digital I/O | SR9200 | 16 digital inputs, 8 digital sinking outputs
> SR9210 | 8 digital inputs, 16 digital sinking outputs
> SR9220 | 8 digital inputs, 8 digital sinking outputs
> SR9205 | 16 digital inputs, 8 digital sourcing outputs
> SR9215 | 8 digital inputs, 16 digital sourcing outputs
> SR9225 | 8 digital inputs, 8 digital sourcing outputs

> ### 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.

> Figure 24. Digital I/O Card User Interface Pinout

> ### 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.

> Table 7. Guide to FWT Selection
> FWT Description | I/O Cards | Z-World Part Number
> Pluggable Terminals | Screw Terminals
> FWT27 | Digital I/O | 101-0420 | 101-0424

> #### 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.

> Figure 25. FWT Pinout for
> Digital I/O Cards

> ### 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.

> Figure 26. Locations of 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 Configurations
> Model | Bank 2 Configured As
> SR9200 | 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.

> Table 9. Digital Inputs Pinout
> Pin | Bank 0 | Pin | Bank 2
> 2 |  | DIGIN0 | IN0 | 13 |  | I/O8 | IN8
> 3 |  | DIGIN1 | IN1 | 14 |  | I/O9 | IN9
> 4 |  | DIGIN2 | IN2 | 15 |  | I/O10 | IN10
> 5 |  | DIGIN3 | IN3 | 16 |  | I/O11 | IN11
> 8 |  | DIGIN4 | IN4 | 18 |  | I/O12 | IN12
> 9 |  | DIGIN5 | IN5 | 19 |  | I/O13 | IN13
> 10 |  | DIGIN6 | IN6 | 20 |  | I/O14 | IN14
> 11 |  | DIGIN7 | IN7 | 21 |  | I/O15 | IN15

> 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.

> Figure 27. Protected Digital Inputs

> 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.

> Figure 28. Selecting Pulled Up or Pulled Down Digital Inputs

> 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.

> Table 10. Digital Outputs Pinout
> Pin | Bank 2 | Pin | Bank 1
> 13 |  | I/O8 | OUT8 | 22 |  | HVOUT0 | OUT0
> 14 |  | I/O9 | OUT9 | 23 |  | HVOUT1 | OUT1
> 15 |  | I/O10 | OUT10 | 24 |  | HVOUT2 | OUT2
> 16 |  | I/O11 | OUT11 | 26 |  | HVOUT3 | OUT3
> 18 |  | I/O12 | OUT12 | 27 |  | HVOUT4 | OUT4
> 19 |  | I/O13 | OUT13 | 29 |  | HVOUT5 | OUT5
> 20 |  | I/O14 | OUT14 | 30 |  | HVOUT6 | OUT6
> 21 |  | I/O15 | OUT15 | 31 |  | HVOUT7 | OUT7

> Figure 29 shows the power distribution on the digital I/O card.

> Figure 29. Digital I/O Card Power Distribution

> 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 30. Selecting Power Supply for High-Current Sinking or Sourcing Outputs

> 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.

> Figure 31. Connecting a Load to the High-Current 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.

> - `SMRTSTAR`--libraries associated with features specific to the Smart Star control system.

> 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 `SMRTSTAR` directory 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

>   `channel` is the digital input channel to read. `channel` should be passed as

>     channel = (slotnumber * 128) + (channelnumber)

>   or

>     channel = ChanAddr(slotnumber, channelnumber)

>   where `slotnumber` is 0-6, and `channelnumber` is 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

>   `bank` is the bank of digital input channels to read. `bank` should be passed as

>     bank = (slotnumber * 16) + (banknumber)

>   or

>     bank = BankAddr(slotnumber, banknumber)

>   where `slotnumber` is 0-6, and `banknumber` is 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

>   `channel` is the digital output channel to write. `channel` should be passed as

>     channel = (slotnumber * 128) + (channelnumber)

>   or

>     channel = ChanAddr(slotnumber, channelnumber)

>   where `slotnumber` is 0-6, and `channelnumber` is 0-15.
>   `value` is 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

>   `bank` is the bank of digital output channels to write. `bank` should be passed as

>     bank = (slotnumber * 16) + (banknumber)

>   or

>     bank = BankAddr(slotnumber, banknumber)

>   where `slotnumber` is 0-6, and `banknumber` is 1 or 2.
>   `value` is 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, digBankIn

> #### 7.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.

> Figure 32. Digital I/O Card Dimensions

> 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.

> Table 11. Digital I/O Card Specifications
> Parameter | Specification
> Board Size | 2.73" × 3.00" × 0.44" (70 mm × 76 mm × 11 mm)
> Connectors | one 2 × 17 latch/eject ribbon connector, 0.1 inch pitch
> Operating Temperature | -40°C to +70°C
> Humidity | 5% to 95%, noncondensing
> Power Requirements | 5 V DC at 65 mA from backplane (+5 V supply) 9 V to 30 V DC for +RAW/+V_USER from backplane or 9 V to 30 V DC for K on user interface header J2 Maximum draw 2.0 A from +RAW/+V_USER on backplane
> Digital Inputs | Continuous operation from -30 V to +30 V, logic threshold at 2.5 V, protected against spikes ±48 V, 10 kW pull-up/pull-down resistors
> Digital Outputs | Each output can sink (source) up to 200 mA continuously with load limit of 40 V, each output may be switched independently or bank of eight may be switched all at once, load current supplied from +RAW/+V_USER on backplane or user-supplied K on user interface header J2

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