SMART I/O User’s Manual 8 Channel AC Input Unit Micro PLCs and Real-Time Computers Manual ID 09901, Rev. Index 0500 of 08 Jan.
This page was intentionally left blank.
Preface SMART I/O User’s Manual Preface Revision History ............................ 0-4 For Your Safety ............................. 0-5 Special Handling and Unpacking Instructions ................................................. 0-6 HV Safety Instructions ............................. 0-6 Two Years Warranty...................... 0-7 Table of Contents .......................... 0-9 08 Jan. 98 Manual ID 09901, Rev.
Preface SMART I/O User’s Manual Revision History Manual/Product Title: SMART I/O User’s Manual Manual ID Number: 09901 Rev. Index Brief Description of Changes PCB Index Date of Issue 0100 Initial Issue 02 02 Dec. 94 0200 General Update, SM-DAD1 & Software Library Added 02 02 Feb. 95 0300 New MS Modules Added, D5 Format 02 02 Mar.
SMART I/O User’s Manual Preface For your safety This PEP product is carefully designed for a long, fault-free life. However, its life expectancy can be drastically reduced by improper treatment during unpacking and installation. Therefore, in the interest of your own safety and of correct operation of your new PEP product, please take care of the following guidelines: Before installing your new PEP product into a system, please, always switch off your power mains.
Preface SMART I/O User’s Manual Special Handling and Unpacking Instructions Electronic boards are sensitive to static electricity. Therefore, care must be taken during all handling operations and inspections with this product, in order to ensure product integrity at all times. Do not handle this product out of its protective enclosure while it is not being worked with, or unless it is otherwise protected. Whenever possible, unpack or pack this product only at EOS/ESD safe work stations.
SMART I/O User’s Manual Preface Two Years Warranty PEP Modular Computers grants the original purchaser of PEP products a TWO YEARS LIMITED HARDWARE WARRANTY as described in the following. However, no other warranties that may be granted or implied by anyone on behalf of PEP are valid unless the consumer has the expressed written consent of PEP Modular Computers.
Preface SMART I/O User’s Manual goodwill, and will be defined in the “Repair Report” issued by PEP with the repaired or replaced item. PEP Modular Computers will not accept liability for any further claims resulting directly or indirectly from any warranty claim, other than the above specified repair, replacement or refunding.
SMART I/O User’s Manual Preface Table of Contents Chapter 1. 1 General Information ............................... 1-3 1.1 Product Overview ............................................ 1-8 1.2 Ordering Information ....................................... 1-9 1.3 Product Information ....................................... 1-10 1.4 Installation ..................................................... 1-13 1.5 ISaGRAF Installation ..................................... 1-18 Chapter 2. 2 SMART-BASE ........
Preface SMART I/O User’s Manual 2.5 Pinouts ............................................................. 2-9 2.6 ‘C’ Programming ............................................ 2-17 2.7 ISaGRAF Programming ................................. 2-32 2.8 Flash Utility .................................................... 2-37 Chapter 3. 3 SMART-EXT ......................................... 3-3 3.1 Specifications ................................................... 3-3 3.2 Board Overview ........................
SMART I/O User’s Manual Preface 4.3 SM-REL1........................................................ 4-33 4.4 SM-ACI1......................................................... 4-51 Chapter 5. 5 Analog Modules ..................................... 5-7 5.1 SM-DAD1 ......................................................... 5-7 5.2 SM-PT100 ..................................................... 5-29 5.3 SM-THERM ................................................... 5-59 5.4 SM-ADC1 .............................
This page was intentionally left blank.
Introduction SMART I/O User’s Manual Table of Contents General Information.....................................1-3 Weights & Measures .................................................................... 1-4 1.1 Product Overview .................................................................. 1-8 1.2 Ordering Information ............................................................. 1-9 1.3 Product Information ............................................................. 1-10 1.4 Installation ............
SMART I/O User’s Manual Introduction This page has been left blank intentionally.
Introduction SMART I/O User’s Manual General Information All PEP products are intended for use in industrial climates where extreme environments exist. Dirt, temperature extremes, varying humidity levels, vibration, noise, shock and electromagnetic signals must all be considered. Only when certain precautions have been followed can PEP guarantee the performance of the product stated in the data sheet.
SMART I/O User’s Manual Introduction Weights & Measures The following line drawings serve to illustrate the method of fixing the controller to a DIN rail or brackets for wall/cabinet mounting. Note that all measurements are in millimetres.
Introduction SMART I/O User’s Manual 1 Optional Bracket Mounting March 12, 1996 ©1996 PEP Modular Computers GmbH Page 1 - 5
SMART I/O User’s Manual Introduction Page 1 - 6 March 12, 1996 ©1996 PEP Modular Computers GmbH
Introduction SMART I/O User’s Manual 1 Unit Weight SMART-BASE 650g SMART-EXT 250g SM-DIN1 40g SM-DOUT1 70g SM-REL1 61g SM-DAD1 70g SM-PT100 40g March 12, 1996 Unit SM-THERM SM-ADC1 SM-DAC1 SM-SSI SM-CNT1 SM-RS232 ©1996 PEP Modular Computers GmbH Weight 40g 70g 70g 70g N/A 40g Page 1 - 7
SMART I/O User’s Manual Introduction 1.1 Product Overview SMART I/O is based on a cost effective open system for industrial automation and industrial computing. By programming the SMART I/O using the standard ISaGRAF workbench for IEC 1131-3 PLC programming languages and the Ultra-C compiler (DOS, OS-9) for ANSI-C real-time programming, the SMART I/O can be used as a micro PLC and as a real-time computer system.
Introduction SMART I/O User’s Manual 1.2 Ordering Information Product Description Micro PLC & real-time computer, 1 MByte EPROM, 512 kByte DRAM, 64kByte SRAM, OS-9 v3.0, ISaGRAF v3.0x, PROFIBUS v3.
Introduction SMART I/O User’s Manual Product Description ROM kit v3.x for SMART I/O enables the generation of custom ISaGRAFfirmware EPROMs. Platform can be a PC or OS-9 development ROM-START system OS9TRG-RGTarget CPU kit for SMART I/O (OS-9 v3.x/Ix.x disks) SMART OS-9/68000 FasTrak for Windows development pack for SMART I/O. OS9DEVFT- Contains extended OS-9 v3.x/Ix.x, PEP utilities and I/O drivers with WIN-SMART necessary makefiles for complete application and EPROM generation.
Introduction SMART I/O User’s Manual The attachment of both units is achieved by sliding them over the DIN rail with the clip assembly pulled out and then releasing it when correctly positioned. The 24V supply source should possess the following characteristics: Voltage min max 18V 36V Current Continuous Peak 400mA 1.
Introduction SMART I/O User’s Manual F1 0.60A M D3 D4 An on-board fuse protects the 24V DC input circuitry from damage through higher voltages than those expected or AC voltages being inadvertently applied to the system. This fuse, should it be assumed defect (the Power In LED on the housing will not be illuminated), may be accessed by removing the cover of the SMART-BASE and accessing the holder on the left-hand side as shown in the illustration below.
Introduction SMART I/O User’s Manual 1.4 Installation 1.4.1 Overview The SMART-BASE and SMART-EXT units are supplied without screw terminal blocks for the I/O slots, SMART Module piggybacks or blank panels. These must be ordered separately to meet the requirements of individual specifications.
SMART I/O User’s Manual Introduction Up to 4 SMART-EXT units can be cascaded depending on the power consumption of the individual SMART Modules. SMART I/O Modules or blank panels must be ordered separately to the SMART-BASE or SMART-EXT units. Blank panels come in packs of 20. Two RS232 cables are available. One terminates with a female 9-pin D-Sub connector for PC use and the other terminates in a male 25-pin D-Sub connector for Modem operation.
Introduction SMART I/O User’s Manual Screw terminal connectors are available in packs of 5. 1 1.4.2 SMART I/O Module Installation The SMART I/O Modules are fitted into the relevant sockets (ST1 - ST6; 3 slots) on the SMART-BASE or in sockets on the SMART-EXT unit. It is important that the Modules are inserted the correct way. The Figure below illustrates this procedure. Figure 1.4.2.
Introduction SMART I/O User’s Manual 1.4.3 RJ45 Telephone Connector Installation The RJ45 connector is fitted into the RS232 Telephone connector (BU1) on the SMART-BASE. This is illustrated in the Figure below. Figure 1.4.3.1 : RJ45 Telephone Connector Installation SMART-BASE SCR2 BU1 RJ45 Connector 1.4.4 Screw Terminal Block Installation The Screw Terminal Blocks are easily fitted to the SMART-BASE or SMART-EXT by pushing them onto the relevant Screw Terminal, as shown in the figure below. Figure 1.4.
Introduction SMART I/O User’s Manual 1.4.5 Battery Installation The battery piggyback SMPBBAT is fitted into the socket BU3 on the SMART-BASE. It is important that the piggyback is inserted in the correct way. The figure below illustrates this procedure. Figure 1.4.5.
SMART I/O User’s Manual Introduction 1.5 ISaGRAF-Installation 1.5.1 Before Installing ISaGRAF is a Windows™ 3.xx based software development tool requiring a minimum of 10 MB of hard disk space and 4 MB of available memory. Before installing ISaGRAF, make a backup copy of each DOS disk in the package and write-protect them to prevent accidental overwriting of files. Note : The backup disks must have the same volume labels as the original ISaGRAF disks. Use the Windows Copy Disk...
Introduction SMART I/O User’s Manual 1.5.2 Installation of the ISaGRAF for Windows Workbench The following steps should be followed to ensure successful installation of the ISaGRAF software. Initially the disk labelled Workbench Disk 1/4 will be required. • Start Windows • Insert diskette Workbench Disk 1/4 into the floppy drive (usually A:) • Select File from the Windows Program Manager and select Run ...
SMART I/O User’s Manual Introduction Having checked the installation directory (default is C:\ISAWIN) and selected Install, the program progresses by asking whether the complete system should be installed or just certain sections. The selection possibilities are shown in figure 1.5.2.2. Figure 1.5.2.2 Installation Selection The default is for a complete installation, i.e. all files. Once confirmed, the installation copies the required files to the installation directory and unpacks their contents.
Introduction SMART I/O User’s Manual 1 Figure 1.5.2.3 ISaGRAF Program Group 1.5.3 Installation of PEP Library Functions The library functions are adapted to suit the SMART I/O and other PEP products and should be installed using the two diskettes labelled LIB/ APPLI/HELP.
SMART I/O User’s Manual Introduction These libraries for projects, I/O boards, ’C’ functions and common data are extracted by following the described procedure: • Start Windows if not already started • Insert diskette Lib/Appli/Help Disk 1/2 into the floppy drive • Select File from the Windows Program Manager and select Run ... • Type A:\INSTALL in the command field and select OK Figure 1.5.3.1 illustrates the Installation Start-up screen. Figure 1.5.3.
Introduction SMART I/O User’s Manual It should be noted that the standard ISA-Terminal is configured for COM2. If another port is required then the switch to the new one is made by firstly starting the ISA-Terminal program and then selecting the Settings from the Communication pull-down menu. Here the possibility exists to select the desired communications port. When leaving the ISA-Terminal environment, remember to save the configuration if changes have been made.
SMART I/O User’s Manual Introduction In order to verify that the hardware and software have been correctly setup, the following procedure should be followed. • Connect the D-Sub connector end of the terminal cable to the chosen COM port of the computer. The other end, with the telephone type connector should be pushed into place in the RS232-port of the SMART I/O base (see figure 1.4.3.1) • With the power supply turned OFF, connect the power plug to SCR-2 on the SMART base.
Introduction SMART I/O User’s Manual The error messages that are shown in figure 1.5.3.2 are normal as the system is trying to create files or directories in the RAM disk that are already present. If no further messages appear, then the installation is complete. Should the terminal result in anything different than shown then check through the installation steps again before contacting PEP for help.
SMART I/O User’s Manual Introduction 1.5.4 Demo Application Several demonstration applications are delivered with the ISaGRAF set of disks and are installed automatically. The applications suitable for use with the SMART I/O are prefixed SM- and serve to show how the SMART I/O can be used through practical examples.
Introduction SMART I/O User’s Manual 1 • Finally, from the Files/Download pull-down menu, select Motorola Target Code. The chosen SM_DEMO will be downloaded to the SMART I/O (target system) and the application will begin automatically. This is a simple SFC-program which will activate channel 7 of the SMDOUT1 when the first SFC-step (init) is encountered thereby illuminating the diode. During the next cycle, step 2 is encountered and activates channel 2 and at the same time deactivates channel 3.
SMART I/O User’s Manual Introduction This page has been left blank intentionally.
Chapter 2 SMART-BASE SMART I/O User’s Manual Table of Contents 2. SMART-BASE.........................................2-3 2.1 Specifications ......................................................................... 2-4 2.2 Board Overview ..................................................................... 2-5 2.3 Functional Description ........................................................... 2-6 2.4 Configuration ......................................................................... 2-8 2.4.
SMART I/O User’s Manual Chapter 2 SMART-BASE 2.7 ISaGRAF Programming ...................................................... 2-32 2.7.1 The ISaGRAF Board Parameters ...................................................... 2-32 2.7.2 The ISaGRAF Operate Calls ............................................................. 2-33 2.8 Flash Utility .........................................................................
Chapter 2 SMART-BASE SMART I/O User’s Manual 2. SMART-BASE The SMART-BASE is the main unit to which up to three SMART-Modules may be connected to fulfil a given I/O task with I/O enhancement being provided through the connection of a SMART-EXT unit which itself may accommodate up to 2 SMART-Modules. A counter/timer is also a standard feature providing direct access to IRQ4 of the I/O controller. The driving force behind the SMART-BASE is the MC68302 microprocessor from Motorola operating at 20MHz.
SMART I/O User’s Manual Chapter 2 SMART-BASE 2.1 Specifications DC/DC 24V DC 18V - 36V DC 140mA typ. @ 24V (static) Input Current 400mA typ. @ 24V (full load) Main Output Voltage 5V DC / 1.2A ± 2.5% Auxiliary Output Voltage 5V DC / 150mA (PROFIBUS/RS485) ± 5% Switching Frequency 100kHz Main Output Ripple ± 10mV typ. Max. Efficiency 68% typ. (between 74% and 100% load) Galvanic Isolation 500V DC max.
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.3 Functional Description Figure 2.3.0.1: SMART I/O Block Diagram Clock Generators MCU Memory MC68302 @ 20 MHz FLASH EPROM SRAM Serial Interfaces RS485 RS232 DC/DC SPI Interface I/O Controller Timer/Counter Interface SMART-Module Interface The MCU, an MC68302 microprocessor operating at 20 MHz is responsible for handling all communication between the various interfaces and on-board memory.
Chapter 2 SMART-BASE SMART I/O User’s Manual The isolated DC/DC converter is based on a switched mode regulating system operating at 100 kHz and supplies power to both the system and the isolated RS485 (PROFIBUS) interface. The SPI interface, a 3-wire communication protocol providing SCLK, RxD and TxD is embedded within a larger 10-wire interface for handling communication between the base unit and SMART-Modules attached either directly or on extension units.
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.4 Configuration The SMART BASE has 2 configurable jumpers which are explained in the following sections. The jumper settings marked in italics in the tables are default. Figure 2.4.0.
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.4.2 Jumper J6: LED Function (Pin Connector) This jumper selects the function of the red LED; halt or user defined. The user defined function that is supported in software will only take effect if this jumper is set accordingly. Jumper J6 Description 1-3 Processor HALT function monitor 1-2 User defined function 2.5 Pinouts Figure 2.5.0.
Chapter 2 SMART-BASE SMART I/O User’s Manual Note Slot# numbers are counted from #0 up to #10 while the ISaGRAF logic counts from #1 to #11! 2.5.1 SMART Module Piggyback Connectors There are three sets of SMART Module piggyback connectors available on the SMART-BASE, each divided into two sets of 2x8 standard pin rows. Pinouts digital side (ST1, ST3 and ST5) SMART-Module location #0 (ST5) pinouts Pin Nr.
Chapter 2 SMART-BASE SMART I/O User’s Manual SMART-Module location #2 (ST1) pinouts Pin Nr. 1 3 5 7 9 11 13 15 Signal PITA0 PITA2 PITA4 PITA6 System GND System VCC CS-SM3 Description I/O Controller Port A0 I/O Controller Port A2 I/O Controller Port A4 I/O Controller Port A6 GND 5V VCC Port Select (Module 2) Reset Reset (Power ON/OFF) Pin Nr.
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.5.2 Screw Terminal Pinouts The following shows the pinout for a screw terminal block suited for use with SMART-Modules. The pinouts of these blocks depends on the SMART Modules that are fitted. Pin 1 Pin 13 Pin 2 Pin 14 2.5.3 Timer I/O Screw Terminal (SCR1) Pin Nr. Signal Description 1 External VCC 5V VCC 3 External GND Ground for TIN, TOUT 5 External GND Ground for TGATE Pin 1 Pin 2 Page 2 - 12 Pin Nr.
Chapter 2 SMART-BASE SMART I/O User’s Manual To understand the functionality of the counter/timer, it is necessary to understand the purpose of TIN, TOUT and TGATE. Figure 2.5.3.1 shows the block diagram of TIN. Figure: 2.5.3.
Chapter 2 SMART-BASE SMART I/O User’s Manual Figure 2.5.3.2 shows the TOUT block diagram. Here, the output is only active when an interrupt on level 4 has been acknowledged by the I/O controller or a previously set timer has decremented to 0. The driving stage of the output consists of a Darlington connected transistor pair protected from inductive loads by a clamp diode. This TOUT line can generate squarewave pulses from 0.2ms to 178ms and can deliver 500mA continuously at 24V DC.
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.5.5 RS232 Telephone Connector (BU1) In order to meet the needs of widespread standards, the RS232 connector is selected as a telephone connector, an 8-pin RJ12 telephone jack with full MODEM support. Pin Nr. 1 2 3 4 5 6 7 8 Signal DSR RTS System GND TxD RxD DCD CTS DTR Description Data Set Ready Ready to Send System GND Transmit Line Receive Line Data Carrier Detect Clear to Send Data Terminal Ready 12 8 2.5.
Chapter 2 SMART-BASE SMART I/O User’s Manual The full-duplex description may be found in the SMART-I/O Advanced User’s Guide. Note There is no internal line termination as laid down in DIN 19245 Part 1 and must be performed externally. The line termination is achieved as shown in the figure. Assuming a power supply voltage of +5V emanating from the PROFIBUS connector (pin 6), the following resistor values are recommended. Aux. +5V, 90mA Rt 150Ω ± 2%, min 0.25W RU 390Ω ± 2%, min 0.
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.6 ‘C’ Programming 2.6.1 SMART-BASE Library The SMART-BASE library of functions smartio.l provide a convenient way of accessing various features of the SMART-BASE. • All functions are written in ANSI C; • Prototypes are to be found in the file BSP/SMART/DEFS/SMAC.h. Hardware Requirements • SMART I/O Base Module. Software Requirements The compiler from one of the following: • Ultra C Version 1.1.2 or higher; • FasTrak 2.0.2 or higher.
SMART I/O User’s Manual Chapter 2 SMART-BASE 2.6.2 SMTselIn Syntax error_code SMTselIn(u_int8 mode); Description This function selects one of four possible counter/timer input (TIN) configurations utilizing the 6MHz internal counter/timer clock. Input u_int8 mode This represents the four input configurations. They are: MODE00 The Simple I/O/TIN input pin carries the Simple I/O and the CLK and prescaler are used.
Chapter 2 SMART-BASE SMART I/O User’s Manual MODE11 The Simple I/O/TIN pin serves as a timer input and the prescaler is not used. The 24-bit counter is decremented, rolls over or is loaded from the counter preload registers following the rising edge of the TIN pin after being synchronized with the internal clock. Output error_code SUCCESS E_BMODE Unsupported mode or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.6.3 SMTsettout Syntax error_code SMTsettout(u_int8 mode); Description This function sets the timer output (TOUT) control. Input u_int8 mode Two modes of TOUT control are available. They are: MODE_PORTC tout has the Simple I/O function. MODE_SQUARE tout toggles on counter zero. When the timer is stopped, tout is high (see diagram).
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.6.4 SMTpre Syntax 2 error_code SMTpre(u_int32 *value); Description This function reads / sets the timer preload register. Input u_int32 *value Output error_code Pointer to a variable that holds the value to set. The previous value is returned to the variable. If value is 0, only the read is performed. SUCCESS E_BMODE Requested value is out of range or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 2 SMART-BASE SMART I/O User’s Manual Example for a Square Wave Generator The Timer Control Register 7 6 5 TOUT/TIAC Control 0 1 x 4 3 2 1 0 Z.D. Control • Clock Control Timer Enable 0 0 00 or 1x Changed In this configuration, the timer produces a square wave at the TOUT pin which is connected to the user’s circuitry. The TIN pin may be used as a clock input. The processor loads the counter preload registers and the timer control register and then enables the timer.
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.6.5 SMTstasto Syntax error_code SMTstasto(u_int8 mode); Description This function starts / stops the timer; the zero-detect control bit is set at the start; the counter rolls over on reaching zero or is loaded with the value set in the preload register and continues counting down. Input u_int8 mode Output error_code Two modes are available.
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.6.6 SMTrd Syntax error_code SMTrd(u_int32 *value); Description This function reads the actual timer count value. NOTE ! A stable read value can only be achieved if the timer is not running. Therefore, a read request to the running timer terminates with E_DEVBSY. Input u_int32 *value Output error_code Pointer to a variable in which to place the read value.
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.6.7 SMTtin Syntax 2 error_code SMTtin(u_int8 *value); Description This function reads the current level present on TIN/PC2. Input u_int8 *value Output error_code Pointer to a variable in which to place the read value. 0 represents low, 1 represents high SUCCESS or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.6.8 SMTstat Syntax error_code SMTstat(u_int8 *value); Description This function reads the timer status register and clears it if set. Input u_int8 *value Output error_code Pointer to a variable in which to place the read value. 0 represents not set, 1 represents set SUCCESS or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.6.9 SMTout Syntax 2 error_code SMTout(u_int8 *value); Description This function reads the actual status of the TOUT pin. Input u_int8 *value Output error_code Pointer to a variable in which to place the read value. 0 represents a low level while a 1 represents a high level. SUCCESS or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.6.10 SMLed Syntax error_code SMLed(u_int8 led, u_int8 value); Description This function switches on / off user LED’s. Input u_int8 led u_int8 value Output error_code Two options are available. They are: USERL1 Yellow LED on piggyback USERL2 Red LED on piggyback (only if the LED is not jumpered as 68302 HALT. Indicates the status of the LED.
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.6.11 SMwdon Syntax error_code SMwdon(u_int32 *time); Description This function activates the watchdog timer of the 68302. If timeout is reached, the system is reset; in normal operating mode, this must be avoided by periodically triggering the watchdog using the function SMwdtrig. Input u_int32 *time Output error_code Time in ms. The range is from 1ms to approx. 13 seconds. The function returns the real set time in *time.
SMART I/O User’s Manual Chapter 2 SMART-BASE 2.6.12 SMwdtrig Syntax error_code SMwdtrig(void); Description This function re-triggers the watchdog of the 68302 preventing a timeout and subsequent system reset. Output error_code SUCCESS or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.6.13 SMwdoff Syntax 2 error_code SMwdoff(void); Description This function deactivates the watchdog timer. Output error_code SUCCESS or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
SMART I/O User’s Manual Chapter 2 SMART-BASE 2.7 ISaGRAF Programming 2.7.1 The ISaGRAF Board Parameters Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual. Figure 2.7.1.1 Typical Screen Section for the SMART-BASE Because the communication to the timer/counter is performed using Operate Calls, there is no need for manual selection of such things as a logical address etc.
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.7.2 The ISaGRAF Operate Calls Operate calls are built into a program using ST or FBD languages when defining the project. A typical use could be at the initialization stage to check that the SMART-Modules are in fact located where they have been programmed to be.
Chapter 2 SMART-BASE SMART I/O User’s Manual A complete list of the operate COMMANDS may be obtained by selecting a project from the ISaGRAF projects group, opening an application and observing the Common defines in the Dictionary pull-down menu. Note that not all calls in the list may be used within the SMART I/O environment however, the calls applicable to this module are : O_INIT_CODE : The syntax and usage have already been explained.
Chapter 2 SMART-BASE SMART I/O User’s Manual O_START_COUNTER : This call starts the counter; it’s syntax is as follows : := OPERATE(, O_START_COUNTER, ); where the is typically t_in. O_READ_COUNTER : With this call the contents of the counter register may be read. When this call is issued, the counter is stopped, it’s register read and then restarted. If a high-frequency input exists then pulses may be lost (not counted).
SMART I/O User’s Manual O_PRELOAD Chapter 2 SMART-BASE : With this call the counter preload register can be set. The syntax is as follows : := OPERATE(, O_PRELOAD, ); where the is typically t_in and is the value for the preload register which lies between 1 and 0xFFFFFF. O_START_CNTDWN : This function starts the counter counting-down. When the counter reaches zero, it rolls over to the maximum value of 0xFFFFFF on the following clock pulse and starts afresh.
Chapter 2 SMART-BASE SMART I/O User’s Manual 2.8 Flash Utility The flash utility allows ISaGRAF applications, a new ISaGRAF kernel or other OS-9 modules to be loaded into FLASH memory. The SMART I/O may be equipped with 1 MByte of memory depending on the version ordered. If an application is stored in FLASH then it will be loaded into the system at start-up.
SMART I/O User’s Manual Chapter 2 SMART-BASE Example to download ISA11 module and store in FLASH Start the isa terminal in MS Windows: Press the key three times to display the following screen prompt: Isa: Start kermit on the target system Isa: kermit ri Select the menu item transfers-send binary file from the windows terminal and select the file flash on the PC to transfer Load flash into memory Isa: load -ld/dd/APL/flash Start kermit on the target system again Isa: kermit ri Sele
Chapter 3 SMART-EXT SMART I/O User’s Manual Table Of Contents 3. SMART-EXT ...........................................3-3 3.1 Specifications ......................................................................... 3-3 3.2 Board Overview ..................................................................... 3-4 3.3 Functional Description ........................................................... 3-5 3.4 Pinouts ................................................................................... 3-6 3.4.
SMART I/O User’s Manual Chapter 3 SMART-EXT This page has been left blank intentionally Page 3 - 2 ©1996 PEP Modular Computers GmbH March 12, 1996
Chapter 3 SMART-EXT SMART I/O User’s Manual 3. SMART-EXT The SMART-EXT is a carrier unit enabling the connection of a further 2 SMART-Modules thereby enhancing the I/O capacity of the SMART I/O system. Up to 4 of these extensions may be cascaded via a 10-wire flat-band cable with integrated 3-wire SPI (Serial Peripheral Interface). To achieve a common interface between modules, a SMART I/O ‘C’ library is provided by PEP. 3.
Chapter 3 SMART-EXT SMART I/O User’s Manual 3.
Chapter 3 SMART-EXT SMART I/O User’s Manual 3.3 Functional Description Figure 3.3.1: SMART-EXT Block Diagram Interface Connector with Integrated SPI Slot Detect Logic and Buffer Slot A Interface Connector with Integrated SPI 3 Slot B The SMART-EXT is a carrier board for up to 2 SMART-Modules with data transfer between SMART-BASE and EXT units being performed by the interface connector incorporating the Motorola synchronous Serial Peripheral Interface (SPI).
Chapter 3 SMART-EXT SMART I/O User’s Manual 3.4 Pinouts Figure 3.4.0.
Chapter 3 SMART-EXT SMART I/O User’s Manual 3.4.1 SMART Module Piggyback Connectors There are two sets (one for each module) of SMART-Module piggyback connectors present on the SMART-EXT, each divided into two sets of 2x8 standard pin rows. The communication to these connectors is achieved in part via the 10-wire flat-band interface cable and directly by the MCU. Pinouts digital side (ST1 and ST3) Refer to figure 3.4.0.1 for the correct location of these pin-row connectors.
Chapter 3 SMART-EXT SMART I/O User’s Manual Pinouts process side (ST2 and ST4) Refer to figure 3.4.0.1 for the correct location of these pin-row connectors. Slots A and B (ST2 and ST4) Pin Nr. 1 3 5 7 9 11 13 15 Signal Screw Terminal 13 Screw Terminal 1 Screw Terminal 3 Screw Terminal 5 Screw Terminal 7 Screw Terminal 9 Screw Terminal 11 Screw Terminal 14 Pin Nr.
Chapter 3 SMART-EXT SMART I/O User’s Manual 3.4.3 SPI Connectors (ST5 and BU1) On both sides of the board are standard 2x5 pinrow connectors (BU1, ST5), that provide the interface connection between SMART-EXT units and the SMART-BASE. A 10-wire flat cable is soldered directly on the left-hand side of the board (BU1), that interfaces the SMART-BASE module or other (earlier cascaded) SMART-EXT modules. Pinouts for this 10-pin connector Pin Nr. 1 3 5 7 9 Signal System VCC (+5V) System VCC (+5V) Serial Ext.
SMART I/O User’s Manual Chapter 3 SMART-EXT This page has been left blank intentionally.
Digital Modules SMART I/O User’s Manual Digital Modules 08 Jan. 98 Manual ID 09901, Rev.
SMART I/O User’s Manual Digital Modules Table of Contents Chapter 4 4.1 SM-DIN1 ................................................... 4-5 4.1.1 Introduction .................................................. 4-5 4.1.2 Specifications .............................................. 4-5 4.1.3 Front Panel Layout ...................................... 4-6 4.1.4 Board Overview ........................................... 4-7 4.1.5 Functional Description ................................. 4-8 4.1.6 Configuration .
Digital Modules SMART I/O User’s Manual 4.2.7 Pinouts ...................................................... 4-22 4.2.9 ISaGRAF Programming ............................ 4-29 4.3 SM-REL1................................................ 4-33 4.3.1 Introduction ............................................... 4-33 4.3.2 Specifications ............................................ 4-33 4.3.3 Front Panel Layout .................................... 4-34 4.3.4 Board Overview .......................................
This page was intentionally left blank.
Chapter 4 Digital Modules SMART I/O User’s Manual 4. Digital Modules 4.1 SM-DIN1 4.1.1 Introduction The SM-DIN1 provides 8 optoisolated 24V DC digital inputs arranged in 6 independent groups with respect to the ground connections. The maximum input switching frequency is set to 200Hz with the system registering a logical ‘1’ when the input exceeds 10V. Logical ‘0’ is returned when the input falls below 8V.
SMART I/O User’s Manual Chapter 4 Digital Modules 4.1.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.1.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.1.5 Functional Description Figure 4.1.5.1: SM-DIN1 Schematic Diagram User/Input Interface System Interface +Vcc (24V) Input Circuit Low Pass Filter Digital Input LED Driver System Interface Gnd (common) The input circuit comprises a Zener diode requiring 3mA to drive it beyond the ‘knee’ that borders between ‘OFF’ and ‘ON’. More simply, input voltages between 8V and 10V DC produce an unknown digital result.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.1.6 Configuration Although two solder jumpers exist on the board (J1 and J2), they should remain at their factory settings unless a user-specific filter is required that cuts off at higher frequencies for example. If a user-specific filter is required then contact PEP Modular Computers for further advice and refer to the illustration shown in figure 4.1.6.1 of the filtering components. Figure 4.1.6.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.1.7 Pinouts Screw Terminal Pinouts The following shows the pinout/signal relationship for the SM-DIN1 when connected to a particular screw terminal block. Pin 1 Pin 2 Pin Nr. 1 3 5 7 9 11 13 Page 4 - 10 Signal G0EXT IN0 IN1 G1EXT IN2 IN3 G23EXT Description Pin Nr.
Chapter 4 Digital Modules SMART I/O User’s Manual Connection +Vcc (24V) IN3 IN7 IN6 IN2 IN5 IN1 IN4 IN0 Digital Sensors Pin 1 Pin 13 4 G67EXT G23EXT G5EXT G1EXT G4EXT Pin 14 G0EXT Pin 2 Gnd (0V) Input Circuit User/Input Interface System Interface +Vcc (24V) Typ: Common GND K1 IN0 8V2 LL4448 5K1 Gnd (0V) G0EXT March 12, 1996 ©1996 PEP Modular Computers GmbH Page 4 - 11
SMART I/O User’s Manual Chapter 4 Digital Modules 4.1.8 ‘C’ Programming 4.1.8.1 SM-DIN1 Library The SM-DIN1 library of functions smartio.l provide a convenient way of accessing the SM-DIN1 module. • All functions are written in ANSI C; • Prototypes are to be found in the file din1lib.h. Hardware Requirements • SMART I/O Base Module or Base Module and Extension unit; • SM-DIN1 Module. Software Requirements The compiler from one of the following: • Ultra C Version 1.1.2 or higher; • FasTrak 2.0.2 or higher.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.1.8.2 SMDIN1Init Syntax error_code SMDIN1Init(u_int8 PortNr); Description This function initialises the SM-DIN1 Module on port PortNr by allocating space in memory for resources and resetting all inputs. Input u_int8 PortNr Output error_code SM-Port number to initialise (from 0 to 10) SUCCESS E_BMODE If the module is unknown or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
SMART I/O User’s Manual Chapter 4 Digital Modules 4.1.8.3 SMDIN1DeInit Syntax error_code SMDIN1DeInit(u_int8 PortNr); Description This function de-initialises the SM-DIN1 Module on port PortNr by releasing all resources assigned to it thereby freeing memory for other uses. Input u_int8 PortNr Output error_code SM-Port number to de-initialise SUCCESS or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 4 Digital Modules SMART I/O User’s Manual 4.1.8.4 SMDIN1Get Syntax error_code SMDIN1Get(u_int8 PortNr, u_int8 *buffer); Description This function fetches the status of ALL 8 input lines of the port PortNr and writes it to the address pointed to by buffer with bit 0 of the buffer representing input 0 of the module.
SMART I/O User’s Manual Chapter 4 Digital Modules 4.1.9 ISaGRAF Programming 4.1.9.1 The ISaGRAF Board Parameters Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual. Figure 4.1.9.1.1 a Typical Screen Section for the SM-DIN1 Module Logical Address The 8 inputs of this module may be clearly seen together with the logical address at which this particular board is residing.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.1.9.2 The ISaGRAF Operate Calls Operate calls are built into a program using ST or FBD languages when defining the project. A typical use could be at the initialization stage to check that the SMART-Modules are in fact located where they have been programmed to be.
SMART I/O User’s Manual Chapter 4 Digital Modules A complete list of the operate COMMANDS may be obtained by selecting a project from the ISaGRAF projects group, opening an application and observing the Common defines in the Dictionary pull-down menu. Note that not all calls in the list may be used within the SMART I/O environment however, the calls applicable to this module are : O_INIT_CODE Page 4 - 18 : The syntax and usage have already been explained.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.2 SM-DOUT1 4.2.1 Introduction The SM-DOUT1 provides eight optoisolated 24V DC (typ.) digital outputs arranged in 2 independent groups. The maximum output switching frequency is limited to 1 kHz (square wave) with the output in the ON state when the system issues a logical ‘0’. The maximum continuous output supply current is limited to 500mA (resistive loads) and provision has been made to cater for inductive loads.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.2.3 Front Panel Layout User Descriptor Fields Yellow LEDs 4.2.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.2.5 Functional Description Figure 4.2.5.1: SM-DOUT1 Schematic Diagram System Interface User/Output Interface +Vcc (common) System Interface Digital Output LED Driver Output Stage Load Gnd The system interface is low active which means that a logical ‘0’ activates the LED and optoisolation stage causing the output to switch the 24V Vcc to power the load.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.2.6 Configuration There are no jumpers to configure on the SM-DOUT1. 4.2.7 Pinouts Screw Terminal Pinouts The following shows the pinout/signal relationship for the SM-DOUT1 when connected to a particular screw terminal block. Pin 1 Pin 13 Pin 2 Pin Nr. 1 3 5 7 9 11 13 Signal V01EXT OUT0 OUT1 V23EXT OUT2 OUT3 G03EXT Page 4 - 22 Description Vcc for channels 0 & 1 Output 0 Output 1 Vcc for channels 2 & 3 Output 2 Output 3 GND for channels 0..
Chapter 4 Digital Modules SMART I/O User’s Manual Connection Vcc Common (24V) V01EXT OUT 0 Channel 0 V67EXT V23EXT V45EXT V01EXT +Vcc (24V) OUT 1 Pin 1 Channel 1 Pin 13 Vcc Common (24V) V23EXT G47EXT G03EXT OUT7 OUT3 OUT6 OUT2 OUT5 OUT1 OUT4 Pin 14 OUT0 Pin 2 OUT 2 Channel 2 OUT 3 Channel 3 Digital Actuators Gnd (0V) G03EXT Output Circuit System Interface User Interface V01EXT Typ: PNP +Vcc (24V) 6.
SMART I/O User’s Manual Chapter 4 Digital Modules 4.2.8 ‘C’ Programming 4.2.8.1 SM-DOUT1 Library The SM-DOUT1 library of functions smartio.l provide a convenient way of accessing the SM-DOUT1 module. • All functions are written in ANSI C; • Prototypes are to be found in the file dout1lib.h. Hardware Requirements • SMART I/O Base Module or Base Module and Extension unit; • SM-DOUT1 Module. Software Requirements The compiler from one of the following: • Ultra C Version 1.1.2 or higher; • FasTrak 2.0.
Chapter 4 Digital Modules SMART I/O User’s Manual Note If the same SM-DOUT1 Module is to be accessed from different tasks, the user must make sure that the actual output status is ensured by using for example, semaphores within OS-9. 4.2.8.2 SMDOUT1Init Syntax error_code SMDOUT1Init(u_int8 PortNr); Description This function initializes the SM-DOUT1 Module on port PortNr and sets all output lines to OFF.
SMART I/O User’s Manual Chapter 4 Digital Modules 4.2.8.3 SMDOUT1DeInit Syntax error_code SMDOUT1DeInit(u_int8 PortNr); Description This function de-initializes the SM-DOUT1 Module on port PortNr by releasing all resources assigned to it thereby freeing memory for other uses. Input u_int8 PortNr Output error_code SM-Port number to de-initialize SUCCESS or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 4 Digital Modules SMART I/O User’s Manual 4.2.8.4 SMDOUT1Get Syntax error_code SMDOUT1Get(u_int8 PortNr, u_int8 *buffer); Description This function fetches the output status of the port PortNr and writes it to the memory location pointed to by buffer. This buffer shows the status of all 8 outputs with bit 0 representing output 0 of the module. Input u_int8 PortNr u_int8 *buffer Output error_code SM-Port number to fetch data Pointer to a buffer where data is to be stored.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.2.8.5 SMDOUT1Set Syntax error_code SMDOUT1Set(u_int8 PortNr, u_int8 *buffer); Description This function sets the output of the port PortNr with the contents of the address pointed to by buffer. When writing to this buffer, observe that all 8 outputs are set at the same time.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.2.9 ISaGRAF Programming 4.2.9.1 The ISaGRAF Board Parameters Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual. Figure 4.2.9.1.1 a Typical Screen Section for the SM-DOUT1 Module 4 Logical Address The 8 outputs of this module may be clearly seen together with the logical address at which this particular board is residing.
SMART I/O User’s Manual Chapter 4 Digital Modules 4.2.9.2 The ISaGRAF Operate Calls Operate calls are built into a program using ST or FBD languages when defining the project. A typical use could be at the initialization stage to check that the SMART-Modules are in fact located where they have been programmed to be.
Chapter 4 Digital Modules SMART I/O User’s Manual A complete list of the operate COMMANDS may be obtained by selecting a project from the ISaGRAF projects group, opening an application and observing the Common defines in the Dictionary pull-down menu. Note that not all calls in the list may be used within the SMART I/O environment however, the calls applicable to this module are : O_INIT_CODE : The syntax and usage have already been explained.
SMART I/O User’s Manual Chapter 4 Digital Modules This page has been left blank intentionally.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.3 SM-REL1 4.3.1 Introduction The SM-REL1 provides power switching up to 250V AC or 220V DC with surge protection and the ability to switch inductive loads being built-in features of this versatile module. A freely programmable LED on the front panel provides the user interface together with 6 relay status LEDs and an external 24V supply signal LED. 4.3.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.3.3 Front Panel Layout User Descriptor Fields Yellow LEDs Green LED Yellow LED SM-REL1 6 N/O Relay Outputs 4.3.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.3.5 Functional Description Figure 4.3.5.1: SM-REL1 Schematic Diagram Com. Ext. Vcc System Interface Digital Output LED Driver Relay Load 24V DC Com. Ext. Gnd The individual relays are low active which means that a digital ‘0’ delivered by the system closes the relay and illuminates the LED on the front-panel corresponding to the required channel.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.3.6 Configuration Jumper J1 - EEPROM Protection Jumper S e t t i n g s J1 set Description EEPROM is not hardware write protected open EEPROM is hardware write protected 4.3.7 Pinouts Screw Terminal Pinouts The following shows the pinout/signal relationship for the SM-REL1 when connected to a particular screw terminal block. Pin 1 Pin 2 Pin Nr. 1 3 5 7 9 11 13 Signal NO0 NO1 NO2 NO3 NO4 NO5 VCCEXT Page 4 - 36 Description N/O Relay 0 Conn.
Chapter 4 Digital Modules SMART I/O User’s Manual Connection + 24V DC - 4 Input Circuit VCCEXT +Vcc (24V) 6.
SMART I/O User’s Manual Chapter 4 Digital Modules 4.3.8 ‘C’ Programming 4.3.8.1 SM-REL1 Library The SM-REL1 library of functions smartio.l provide a convenient way of accessing the SM-REL1 module. • All functions are written in ANSI C; • Prototypes are to be found in the file rel1lib.h. Hardware Requirements • SMART I/O Base Module or Base Module and Extension unit; • SM-REL1 Module. Software Requirements The compiler from one of the following: • Ultra C Version 1.1.2 or higher; • FasTrak 2.0.2 or higher.
Chapter 4 Digital Modules SMART I/O User’s Manual Note If the same SM-REL1 Module is to be accessed from different tasks, the user must make sure that the actual output status is ensured by using for example, semaphores within OS-9. 4.3.8.2 SMREL1Init Syntax error_code SMREL1Init(u_int8 PortNr); Description This function initializes the SM-REL1 Module on port PortNr by setting the relays to OPEN, relay LED status to OFF and the external Vcc as input.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.3.8.3 SMREL1DeInit Syntax error_code SMREL1DeInit(u_int8 PortNr); Description This function deinitializes the SM-REL1 Module on the port PortNr by freeing the resources tied up with this module and setting all relays to OPEN, all LEDs to OFF and setting the ext. Vcc line to input.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.3.8.4 SMREL1Reset Syntax error_code SMREL1Reset(u_int8 PortNr); Description This function resets the SM-REL1 Module by setting all relays to OPEN and all LEDs to OFF. This function does not free the resources as with the SMRELl1DeInit function call but it does ensure that the relay status (and LEDs) is as expected.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.3.8.5 SMREL1GetRly Syntax error_code SMREL1GetRly(u_int8 PortNr, u_int8 *buffer); Description This function gets the input of the port PortNr and writes it to the buffer. Bits 0-5 of the buffer reflect the Relay setting: 0 = relay closed 1 = relay open Bits 6 and 7 are cleared.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.3.8.6 SMREL1SetRly Syntax error_code SMREL1SetRly(u_int8 PortNr, u_int8 *buffer); Description This function sets the output of the port PortNr with the buffer contents. Bits 0-5 of the buffer are used to set the Relays: 0 = close relay 1 = open relay Bits 6 and 7 have no function.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.3.8.7 SMREL1GetLed Syntax error_code SMREL1GetLed(u_int8 PortNr, u_int8 *buffer); Description This function gets the status of the User LED on the port PortNr and writes it to the buffer. If the LED is OFF then it returns 0, otherwise it returns 1. This function of the LED is for the user to decide.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.3.8.8 SMREL1SetLed Syntax error_code SMREL1SetLed(u_int8 PortNr, u_int8 *buffer); Description This function sets the status of the User LED on the port PortNr with the contents of the buffer. If a bit is set to 0 then the LED is OFF otherwise it is ON.
SMART I/O User’s Manual Chapter 4 Digital Modules 4.3.8.9 SMREL1GetExtVcc Syntax error_code SMREL1GetExtVcc(u_int8 PortNr, u_int8 *buffer); Description This function gets the input of the port PortNr and writes it to buffer. If there is no external Vcc, then it returns 0, otherwise it returns 1.
Chapter 4 Digital Modules SMART I/O User’s Manual 4.3.9 ISaGRAF Programming 4.3.9.1 The ISaGRAF Board Parameters Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual. Figure 4.3.9.1.1 a Typical Screen Section for the SM-REL1 Module 4 Logical Address The 6 outputs of this module may be clearly seen together with the logical address at which this particular board is residing.
SMART I/O User’s Manual Chapter 4 Digital Modules 4.3.9.2 The ISaGRAF Operate Calls Operate calls are built into a program using ST or FBD languages when defining the project. A typical use could be at the initialization stage to check that the SMART-Modules are in fact located where they have been programmed to be.
Digital Modules SMART I/O User’s Manual A complete list of the operate COMMANDS may be obtained by selecting a project from the ISaGRAF projects group, opening an application and observing the Common defines in the Dictionary pull-down menu. Note that not all calls in the list may be used within the SMART I/O environment. However, the calls applicable to this module are: O_INIT_CODE Syntax and usage as explained above.
SMART I/O User’s Manual Digital Modules O_EXT_POWER, 0); where represents the analog return variable and can be zero, if the operate call is supported and the correct is passed, or non-zero, if an error occurred. Page 4 - 52 represents any module variable. Manual ID 09901, Rev. Index 0500 08 Jan.
Digital Modules SMART I/O User’s Manual 4.4 SM-ACI1 4.4.1 Introduction The SM-ACI1 provides eight optoisolated 80 V AC to 264 V AC inputs arranged in six independent groups with respect to common neutral connections. The input frequency range is 4763 Hz, with the system registering a logical ’1’ when the input is active. A logical ’0’ is returned when the input is no longer active. However, a low-pass filter restricts signals exceeding the filter limit, thus registering a logical ’0’ with the system.
SMART I/O User’s Manual Digital Modules 4.4.2 Specifications Table 4-1: Specifications Page 4 - 54 Isolation 2.5 kV optoisolated towards the system Input 8 channels (80 V AC - 264 V AC) Common neutral < 0.
Digital Modules SMART I/O User’s Manual 4.4.3 Front Panel Layout Figure 4-1: Front Panel Layout 08 Jan. 98 Manual ID 09901, Rev.
SMART I/O User’s Manual Digital Modules 4.4.4 Board Overview Figure 4-2: Component Side Page 4 - 56 Manual ID 09901, Rev. Index 0500 08 Jan.
Digital Modules SMART I/O User’s Manual Figure 4-3: Solder Side 08 Jan. 98 Manual ID 09901, Rev.
Digital Modules SMART I/O User’s Manual 4.4.5 Functional Description Figure 4-4: SM-ACI1 Schematic Diagram 08 Jan. 98 Manual ID 09901, Rev.
Digital Modules SMART I/O User’s Manual Downstream the optoisolation part of the circuit, an RC firstorder, low-pass filter converts signals greater than 40 Hz into logically suitable values before they enter the system’s digital input. The LED driver activates the relevant LED when the input increases to more than 30 V AC. As previously mentioned, the last channel is capable of issuing INTx interrupts, when enabled by software.
Digital Modules SMART I/O User’s Manual Figure 4-5: SM-ACI1 Configurable Filter 08 Jan. 98 Manual ID 09901, Rev.
Digital Modules SMART I/O User’s Manual Surface-Mounted Devices (SMDs) are used in the production of SM-ACI1 modules. The components to be changed, marked with an asterisk in figure 4-5, need not necessarily be SMDs. Please, refer to the board overview figure (solder side, figure 43) for the approximate position of the jumpers. Notice should be taken of the fact, that when calculating component values for a specific filter, the capacitor/resistor relationship is almost linear.
SMART I/O User’s Manual Digital Modules Table 4-3: Pinout/Signal Relationship Page 4 - 62 Pin # Sign al Pin # Sign al 1 N0 Neutral channel 0 2 N4 Neutral channel 4 3 P0 Phase channel 0 4 P4 Phase channel 4 5 P1 Phase channel 1 6 P5 Phase channel 5 7 N1 Neutral channel 1 8 N5 Neutral channel 5 9 P2 Phase channel 2 10 P6 Phase channel 6 11 P3 Phase channel 3 12 P7 Phase channel 7 13 N23 Neutral channels 2, 3 14 N67 Neutral channels 6, 7 Description Manual ID
Digital Modules SMART I/O User’s Manual Figure 4-7: Connection 08 Jan. 98 Manual ID 09901, Rev.
SMART I/O User’s Manual Digital Modules Figure 4-8: Example: Input Circuit (Only One Channel Shown) 4.4.8 ANSI ’C’ Programming 4.4.8.1 SM-ACI1 Library The SM-ACI1 library of functions smartio.l provide a convenient way of accessing the SM-ACI1 module. • • All functions are written in ANSI C; Prototypes are to be found in the file aci1lib.h. Hardware Requirements • • Page 4 - 64 SMART I/O Base Module or Base Module and Extension unit; SM-ACI1 Module. Manual ID 09901, Rev. Index 0500 08 Jan.
Digital Modules SMART I/O User’s Manual Software Requirements The compiler belonging to one of the following environments: • • Ultra C Version 1.1.2 or higher; FasTrak for Windows version 2.02 or higher. Attention: As far as programming is concerned, to the SM-Module on the very left the figure ’0’ is assigned, although physically it is slot 1. Before a library function can be used, the function SMACI1Init must be called first. By this the requested resources are allocated.
SMART I/O User’s Manual Digital Modules Input u_int8 PortNr SM-Port number to initialize. Output error_code SUCCESS E_BMODE If the module is unknown, or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section). Example RetVal = SMACI1Init(0); 4.4.8.3 SMACI1DeInit Syntax error_code SMACI1DeInit(u_int8 PortNr); Description This function de-initializes the SM-ACI1 Module on port PortNr by releasing all resources assigned to it thereby freeing memory for other uses.
Digital Modules SMART I/O User’s Manual Example RetVal = SMACI1DeInit(0); 4.4.8.4 SMACI1Get Syntax error_code SMACI1Get(u_int8 PortNr, u_int8 *buffer); Description This function fetches the status of ALL 8 input lines of the port PortNr and writes it to the address pointed to by buffer with bit 0 of the buffer representing input 0 of the module. Input u_int8 PortNr SM-Port number to fetch data. u_int8 *buffer Pointer to buffer where data is to be stored.
SMART I/O User’s Manual Digital Modules Buffer Explanation: D7 Ch. 7 D0 Ch. 6 Bit Value: Ch. 5 Ch. 4 Ch. 3 Ch. 2 Ch. 1 Ch. 0 0 = No input or not connected 1 = Input Active 4.4.9 ISaGRAF Programming 4.4.9.1 ISaGRAF Board Parameters Information on board parameters may be found in the PEP online help and ISaGRAF on-line help or user’s manual. Figure 4-9: Page 4 - 68 Typical Screen Section for the SMACI1Module Manual ID 09901, Rev. Index 0500 08 Jan.
Digital Modules SMART I/O User’s Manual Logical Address The 8 inputs of this module may be clearly seen together with the logical address at which this particular board is residing. Remember, this logical address is the same as the physical slot position! In the example shown here, the board being addressed is in slot 2 i.e. the second of the SMART-BASE slots. Up to 11 slots are catered for in the SMART I/O concept; 3 on the SMART-BASE and 2 for each connected SMART-EXT (up to a total of 4). 4.4.9.
SMART I/O User’s Manual Digital Modules Channel provides channel specific information and in the example shown here, any of the 8 input channels may be used. The last parameter is not usually used by PEP implementations and is set to 0 (zero). The error.code returns a value of zero if no error was detected, otherwise it returns a non-zero value depending on the error encountered. A list of these error codes may be found in the PEP on-line help.
Chapter 5 Analog Modules SMART I/O User’s Manual Analog Modules for 5 SMART I/O March 12, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 1
SMART I/O User’s Manual Chapter 5 Analog Modules Table of Contents 5. Analog Modules .......................................5-7 5.1 SM-DAD1 .............................................................................. 5-7 5.1.1 Introduction ......................................................................................... 5-7 5.1.2 Specifications ...................................................................................... 5-7 5.1.3 Front Panel Layout ....................................
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.7 Pinouts ............................................................................................... 5-33 5.2.8 ‘C’ Programming ............................................................................... 5-35 5.2.8.1 SM-PT100 Library ................................................................... 5-35 5.2.8.2 SMADCInit .............................................................................. 5-39 5.2.8.3 SMADCCalibrate ................
SMART I/O User’s Manual Chapter 5 Analog Modules 5.3.8.5 SMADCSetSensorType ............................................................ 5-71 5.3.8.6 SMADCGetSensorType ........................................................... 5-72 5.3.8.7 SMADCSetPrecision ................................................................ 5-73 5.3.8.8 SMADCGetPrecision ............................................................... 5-74 5.3.8.9 SMADCSetMode ................................................................
Chapter 5 Analog Modules SMART I/O User’s Manual 5.4.9.2 The ISaGRAF Operate Calls .................................................. 5-102 5.5 SM-DAC1 .......................................................................... 5-107 5.5.1 Introduction ..................................................................................... 5-107 5.5.2 Specifications .................................................................................. 5-107 5.5.3 Front Panel Layout .............................
SMART I/O User’s Manual Chapter 5 Analog Modules This page has been left blank intentionally.
Chapter 5 Analog Modules SMART I/O User’s Manual 5. Analog Modules 5.1 SM-DAD1 5.1.1 Introduction The SM-DAD1 provides a fast, 12-bit, bipolar (± 10V DC), 4-channel analog to digital converter and, apart from its ADC role, may also be used as a fast 12-bit, 2-channel unipolar/bipolar digital to analog converter.
SMART I/O User’s Manual Chapter 5 Analog Modules 5.1.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.1.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.1.5 Functional Description The SM-DAD1 has 4 differential voltage inputs and 2 unipolar/bipolar voltage outputs. An on-board EEPROM contains board specific calibration data, module ID byte and production data. An on-board switched-mode regulator provides ±15V for the analog I/O and an additional linear regulator provides the -5V required by the ADC. 5.1.5.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.1.5.2 Output Circuitry The digital to analog converter (DAC) section consists of a twin output 12bit DAC with external (on-board) 10.0V reference and an operational amplifier for unipolar/bipolar outputs. Figure 5.1.5.2: SM-DAD1 Output Schematic Diagram VOUTx System Interface DAC Load Output Amplifier -10V .. +10V 0 .. +10V AGND Ref Uni-/Bipolar Switch (J4/J5) The DAC is a complete dual 12-bit multiplying DAC without the need for external trimming.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.1.6 Configuration The SM-DAD1 has 5 solder jumpers which may be configured as follows: Jumpers J1 and J2 These jumpers are reserved for PEP use only. Jumper J3 - EEPROM Protection Jumper S e t t i n g s Description J3 set EEPROM is not hardware write protected open EEPROM is hardware write protected Jumper J4 and J5 - DAC Output Jumper S e t t i n g s J4 open set J5 open set Description VOUT0 unipolar 0V .. +10V VOUT0 bipolar -10V ..
Chapter 5 Analog Modules SMART I/O User’s Manual 5.1.7 Pinouts Screw Terminal Pinouts The following shows the pinout/signal relationship for the SM-DAD1 when connected to a particular screw terminal block. Pin 1 Pin 2 Pin Nr. 1 3 5 7 9 11 13 March 12, 1996 Signal IN0P (+) IN0N (-) AGND IN1P (+) IN1N (-) VOUT0 AGND Description Analog Input Ch. 0+ Analog Input Ch. 0Analog GND Analog Input Ch. 1+ Analog Input Ch. 1Analog Output Ch. 0 Analog GND Pin 13 Pin 14 Pin Nr.
Chapter 5 Analog Modules SMART I/O User’s Manual Connection IN3N IN1N IN3P IN1P IN2N IN0N IN2P IN0P Analog Sensors Pin 1 Pin 13 AGND AGND VOUT1 AGND VOUT0 Pin 14 AGND Pin 2 Analog Actuators Gnd (0V) A/D Circuit +15V +15V IN0P 220 k 4.7 k 3.9 k 220 k 220 k AGND +5V MAX427 -15V -15V ADC MAX191 IN0N 4.
Chapter 5 Analog Modules SMART I/O User’s Manual D/A Circuit +15V +15V 20 k DAC MAX532 20 k 20 k J4 LT1013 1/2 VOUT0 -15V 20 k +15V REF MAX876 -15V AGND 10 V Jumpers J4 and J5 should be set if the DAC should operate in bipolar mode. It should be noted that the D/A circuit shown above represents only one of the two output channels. J5 is naturally the jumper for mode switching on the second channel.
SMART I/O User’s Manual Chapter 5 Analog Modules 5.1.8 ‘C’ Programming 5.1.8.1 SM-DAD1 Library The SM-DAD1 library of functions smartio.l provide a convenient way of accessing the SM-DAD1 module. • All functions are written in ANSI C; • Prototypes are to be found in the file dad1lib.h. Hardware Requirements • SMART I/O Base Module or Base Module and Extension unit; • SM-DAD1 Module. Software Requirements The compiler from one of the following: • Ultra C Version 1.1.2 or higher; • FasTrak 2.0.2 or higher.
Chapter 5 Analog Modules SMART I/O User’s Manual Note If the same SM-DAD1 Module is to be accessed from different tasks, the user must make sure that the actual output status is ensured by using for example, semaphores within OS-9. 5.1.8.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.1.8.3 SMDAD1DeInit Syntax error_code SMDAD1DeInit(u_int8 PortNr); Description This function de-initializes the SM-DAD1 Module on the port PortNr by freeing the resources tied up with it and setting all outputs and inputs to zero. Input u_int8 PortNr Output error_code SM-Port number to de-initialize (from 0 to 10) SUCCESS E_SEEK if module not initialized or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 5 Analog Modules SMART I/O User’s Manual 5.1.8.4 SMDAD1GetVRaw Syntax error_code SMDAD1GetVRaw(u_int8 PortNr, u_int8 Channel, int16 *pValue); Description This function fetches the conversion result of a selected channel without performing a gain or offset correction. The result is always a signed integer value. If bipolar mode is selected, the function returns the 2’s complement value of the original read.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.1.8.5 SMDAD1GetV Syntax error_code SMDAD1GetV(u_int8 PortNr, u_int8 Channel, int16 *pValue); Description This function fetches the conversion result of a selected channel. A gain and offset correction is done with the use of the selected conversion table. The result is always a signed integer value. If bipolar mode is selected, the function returns the 2’s complement value of the original read.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.1.8.6 SMDAD1PutVRaw Syntax error_code SMDAD1PutVRaw(u_int8 PortNr, u_int8 Channel, u_int16 Value); Description This function sets the selected DAC channel to the chosen value. No gain or offset correction is performed.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.1.8.7 SMDAD1PutV Syntax error_code SMDAD1PutV(u_int8 PortNr, u_int8 Channel, int16 Value); Description This function sets the selected DAC channel to the chosen value. A gain and offset correction is performed with the use of the automatically selected conversion table depending whether a user-defined table has been specified or not. Hence, if a user-defined table exists then this will be used, otherwise the default factory set table will be used.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.1.8.8 SMDAD1SetLed Syntax error_code SMDAD1SetLed(u_int8 PortNr, u_int8 LedNr); Description This function switches on one of the two LEDs fitted to the SM-DAD1. Input u_int8 PortNr u_int8 LedNr Output error_code SM-Port number to be accessed Number of the LED to switch on (1-2) SUCCESS E_SEEK if module was not initialized E-BMODE if the module is unknown or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 5 Analog Modules SMART I/O User’s Manual 5.1.8.9 SMDAD1ClrLed Syntax error_code SMDAD1ClrLed(u_int8 PortNr, u_int8 LedNr); Description This function switches off one of the two LEDs fitted to the SM-DAD1. Input u_int8 PortNr u_int8 LedNr Output error_code SM-Port number to be accessed Number of the LED to switch off (1-2) SUCCESS E_SEEK if module was not initialized E-BMODE if the module is unknown or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 5 Analog Modules SMART I/O User’s Manual 5.1.9 ISaGRAF Programming 5.1.9.1 The ISaGRAF Board Parameters Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual. Figure 5.1.9.1.1 Typical Screen Sections for the SM-DAD1 Module Logical Address The 4 inputs and 2 outputs of this module may be clearly seen together with the logical address at which this particular board is residing.
SMART I/O User’s Manual Chapter 5 Analog Modules 5.1.9.2 The ISaGRAF Operate Calls Operate calls are built into a program using ST or FBD languages when defining the project. A typical use could be at the initialization stage to check that the SMART-Modules are in fact located where they have been programmed to be.
Chapter 5 Analog Modules SMART I/O User’s Manual A complete list of the operate COMMANDS may be obtained by selecting a project from the ISaGRAF projects group, opening an application and observing the Common defines in the Dictionary pull-down menu. Note that not all calls in the list may be used within the SMART I/O environment however, the calls applicable to this module are : : The syntax and usage have already been explained.
SMART I/O User’s Manual O_DISABLE_CONV Chapter 5 Analog Modules : This operate call tells ISaGRAF to disable the conversion of a particular channel of a connected SM-DAD1 module. The syntax is as follows: := OPERATE(, O_DISABLE_CONV, 0); where Page 5 - 28 represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2 SM-PT100 5.2.1 Introduction The SM-PT100 is used for 2, 3 or 4-wire temperature measurement using PT100 sensors driven by an on-board constant current source. Temperature measurements between -200°C and + 850°C are possible with corrective calibration for the two possible PT100 4-wire classes being provided in driver software for OS-9 operation. A fast 16-bit delta-sigma A/D converter ensures an absolute accuracy of 0.2°C. 5.2.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.3 Front Panel Layout Red LEDs User Descriptor Fields SM-PT100 4 Ch. (4-wire) PT100 Inputs 5.2.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.5 Functional Description Figure 5.2.5.1: SM-PT100 Schematic Diagram User Interface System Interface LED Driver PT100 Sensor , 4-wire Input CUR IN+ SENSE LINE IN- 400 µA SUPPLY LINE RL A/D Converter SENSE LINE Impedance Converter SUPPLY LINE Multiplexer RL 400 µA Serial I/O System Interface AGND The SM-PT100 has provision for 4 sets of 4-wire PT100 sensors driven by an on-board generated 400µA constant current source.
Chapter 5 Analog Modules SMART I/O User’s Manual The two- and three-wire measurement methods shown in figure 5.2.5.2 are not compensated and will experience errors due to line-resistances. The best and recommended method is the 4-wire system shown in figure 5.2.5.1. which eliminates all line resistances automatically. The sense lines, being connected to a high impedance differential amplifier (10MΩ), introduce almost zero error resulting from line-resistances. Table 5.2.5.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.6 Configuration Jumper J1 - EEPROM Protection Jumper S e t t i n g s Description J1 set EEPROM is not hardware write protected open EEPROM is hardware write protected 5.2.7 Pinouts Screw Terminal Pinouts The following shows the pinout/signal relationship for the SM-PT100 when connected to a particular screw terminal block. Pin 1 Pin 13 Pin 2 Pin Nr. 1 3 5 7 9 11 13 March 12, 1996 Signal Cur 0 In 0+ In 0 AGND In 2+ In 2 Cur 2 Description Pin Nr.
Chapter 5 Analog Modules SMART I/O User’s Manual Connection PT100 CUR0 IN0+ CUR1 PT100 IN0- IN1+ AGND IN1- IN2+ AGND PT100 IN2- IN3+ CUR2 IN3- CUR3 PT100 Input Circuit +12V Cur0 MUX 8:1 AD508F +5V -12V - 5V 68 k 47 k + 5V Exit Cur +5V -5V +12V ADC MUX 8:1 AD508F -12V OP213 1/2 -5V OP213 1/2 MUX 8:1 AD508F 10 M - 5V 47 k -5V 10 k -12V 68 k + 5V 10 k +5V +12V In0- -5V AD 7711 10 M In0+ -5V +5V AGND Page 5 - 34 ©1996 PEP Modular Computers GmbH March 12, 1996
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8 ‘C’ Programming 5.2.8.1 SM-PT100 Library The SM-PT100 library of functions smartio.l provide a convenient way of accessing the SM-PT100 module. • All functions are written in ANSI C; • Prototypes are to be found in the file adclib.h. Hardware Requirements • SMART I/O Base Module or Base Module and Extension unit; • SM-PT100 Module. Software Requirements 5 The compiler from one of the following: • Ultra C Version 1.1.2 or higher; • FasTrak version 2.
SMART I/O User’s Manual Chapter 5 Analog Modules To compile the source, execute the following commands at the shell prompt: > chd //APPLIC/SMART > make all To execute the example: load //BSP/SMART/SMADC/adc_task * load HW task load //APPLIC/SMART/CMDS/demoadc * load example demoadc [slot] Slot = 0,1 .. 10 specifies the port of the SM-PT100 module. (Default = 0) Note that the procedure names are generic and are applicable to both the SMPT100 and SM-THERM modules.
Chapter 5 Analog Modules SMART I/O User’s Manual Read Temperature Values The HW task is prepared with a function that converts RAW values of a channel to degrees Celsius. To enable this facility, the function SMADCEnableConversion must be called after calling SMADCEnableRead. If the HW task has calculated these converted values, the function SMADCReadConverted can be used to get the value. Calibration Before the first value is fetched from the ADC, a calibration cycle is performed by the HW task.
SMART I/O User’s Manual Chapter 5 Analog Modules Figure 5.2.8.1. illustrates a typical programming structure for the correct operation of an SM-PT100 SMART-Module. Figure 5.2.8.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8.3 SMADCCalibrate Syntax error_code SMADCCalibrate(u_int8 PortNr); Description This function signals the HW task that a calibration cycle has to be started for the SM-PT100 at slot PortNr. It is performed automatically when the module is initialized and may be called at any time (if the sensor for example is moved to a different location with different temperature ranges). All 4 channels of the module will be calibrated simultaneously.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8.4 SMADCSetCyclicCalib Syntax error_code SMADCSetCyclicCalib(u_int8 PortNr, u_int secs); Description This function sets the time between two calibration cycles in seconds. If secs=0, then cyclic calibration is disabled.
SMART I/O User’s Manual Chapter 5 Analog Modules 5.2.8.5 SMADCSetSensorType Syntax error_code SMADCSetSensorType(u_int8 PortNr, u_int8 channel, u_int16 sensorCode); Description This function checks if an SM-PT100 board is fitted on the specified port, if the channel is valid, if the sensorCode is known and sets the gain, precision and mode to their default values for the type of sensor connected.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8.6 SMADCGetSensorType Syntax error_code SMADCGetSensorType(u_int8 PortNr, u_int8 channel, u_int16 *pBuffer); Description This function checks if an SM-PT100 board is fitted on the specified port and if the channel is valid. It gets the code of the sensor type of the specified channel and stores it in a user defined buffer. The user has to take care that there is enough place to store the data.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8.7 SMADCSetPrecision Syntax error_code SMADCSetPrecision(u_int8 PortNr, u_int8 channel, u_int8 precision); Description This function checks if an SM-PT100 board is fitted on the specified port and if the channel is valid. It sets the precision of the AD Converter. The valid precision values are defined in the file smadc.h. Note that large precision/ filter values cause longer AD conversion times.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8.8 SMADCGetPrecision Syntax error_code SMADCGetPrecision(u_int8 PortNr, u_int8 channel, u_int16 *pBuffer); Description This function checks if an SM-PT100 board is fitted on the specified port and if the channel is valid. It gets the precision/filter setting of the AD Converter and stores the value in a user defined buffer. The user has to take care that there is enough space to store the data.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8.9 SMADCSetMode Syntax error_code SMADCSetMode(u_int8 PortNr, u_int8 channel, u_int8 mode); Description This function checks if an SM-PT100 board is fitted on the specified port and if the channel is valid and sets the mode of the AD Converter. The valid values (BIPOLAR, UNIPOLAR) are defined in the file smadc.h.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8.10 SMADCGetMode Syntax error_code SMADCGetMode(u_int8 PortNr, u_int8 channel, u_int8 *pBuffer); Description This function checks if an SM-PT100 board is fitted on the specified port and if the channel is valid. It gets the mode setting of the channel and stores the value in a user defined buffer. The user has to take care that the buffer is large enough to store the data.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8.11 SMADCSetSignal Syntax error_code SMADCSetSignal(u_int8 PortNr, u_int8 channel, process_id procID, signal_code sigCode); Description This function defines the code of the signal that is sent by the HW task when the conversion of the channel is ready. The signal is sent to the process with the ID procID. If sigCode is set to 0, no signal will be sent (disable sending of signals).
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8.12 SMADCSetGain Syntax error_code SMADCSetGain(u_int8 PortNr, u_int8 channel, u_int8 gain); Description This function checks if an SM-PT100 board is fitted on the specified port and if the channel is valid and sets the value of the gain amplifier. The valid values for gain are defined in the file smadc.h.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8.13 SMADCGetGain Syntax error_code SMADCGetGain(u_int8 PortNr, u_int8 channel, u_int8 *pBuffer); Description This function checks if an SM-PT100 board is fitted on the specified port and if the channel is valid. It gets the gain amplifier setting of the ADC and stores the value in a user defined buffer where the user has to take care that the buffer is large enough to store the data.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8.14 SMADCEnableRead Syntax error_code SMADCEnableRead(u_int8 PortNr, u_int8 channel, BOOLEAN enable); Description This function checks if an SM-PT100 board is fitted on the specified port and if the channel is valid. It forces the HW task to read raw values from the enabled channels of the device one after the other. The HW task writes the results to the data module.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8.15 SMADCEnableConversion Syntax error_code SMADCEnableConversion(u_int8 PortNr, u_int8 channel, BOOLEAN enable); Description This function checks if an SM-PT100 board is fitted on the specified port and if the channel is valid and forces the HW task to convert the raw values. If the flag enable is TRUE (<>0), then conversion of raw values to degrees Celsius is executed, else if (enable=FALSE) no conversion takes place.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8.16 SMADCReadRaw Syntax error_code SMADCReadRaw(u_int8 PortNr, u_int8 channel, u_int16 *pBuffer); Description This function checks if an SM-PT100 board is fitted on the specified port and if the channel is valid. It reads the raw value of the last conversion and stores it in a user defined buffer. The user has to take care that the buffer is large enough to store the data.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8.17 SMADCReadConverted Syntax error_code SMADCReadConverted(u_int8 PortNr, u_int8 channel, double *pBuffer); Description This function reads the converted value of the last AD Conversion and stores the value in degrees Celcius in a user defined buffer. The user has to take care that the buffer is large enough to store the data.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.8.18 SMADCDeinit Syntax error_code SMADCDeinit(u_int8 PortNr); Description This function frees the resources attached to this module if it was initialised. Input u_int8 PortNr Output error_code Number of the port to deinitialise SUCCESS or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
SMART I/O User’s Manual Chapter 5 Analog Modules 5.2.9 ISaGRAF Programming 5.2.9.1 The ISaGRAF Board Parameters Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual. Figure 5.2.9.1.1 a Typical Screen Section for the SM-PT100 Module Logical Address The 4 inputs of this module may be clearly seen together with the logical address at which this particular board is residing.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.2.9.2 The ISaGRAF Operate Calls Operate calls are built into a program using ST or FBD languages when defining the project. A typical use could be at the initialization stage to check that the SMART-Modules are in fact located where they have been programmed to be.
SMART I/O User’s Manual Chapter 5 Analog Modules A complete list of the operate COMMANDS may be obtained by selecting a project from the ISaGRAF projects group, opening an application and observing the Common defines in the Dictionary pull-down menu. Note that not all calls in the list may be used within the SMART I/O environment however, the calls applicable to this module are : O_INIT_CODE O_ENABLE_CONV : The syntax and usage have already been explained.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3 SM-THERM 5.3.1 Introduction The SM-THERM supports up to four groups of thermoelement sensors together with a cold junction (ext. PT100) for accurate temperature measurement. The sensor types shown in the table below may be connected with corrective calibration for all sensor classes being provided by driver software running under OS-9. A fast 16-bit delta-sigma A/D converter ensures an absolute accuracy of 0.2°C. 5.3.2 Specifications Isolation 1.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.3 Front Panel Layout Red LEDs User Descriptor Fields SM-THERM 4 Channel Thermocouple Inputs 5.3.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.5 Functional Description Figure 5.3.5.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.6 Configuration Jumper J1 - EEPROM Protection Jumper S e t t i n g s J1 set Description EEPROM is not hardware write protected open EEPROM is hardware write protected 5.3.7 Pinouts Screw Terminal Pinouts The following shows the pinout/signal relationship for the SM-PT100 when connected to a particular screw terminal block. Pin 1 Pin 13 Pin 2 Pin Nr.
Chapter 5 Analog Modules SMART I/O User’s Manual Connection AGND IN0+ IN0- TMP+ IN2+ IN2- AGND PT100 AGND IN1+ IN1- TMP- IN3+ IN3- AGND 5 Input Circuit - 5V 68 k 47 k + 5V +5V -5V +12V +5V MUX 8:1 AD508F -12V OP213 1/2 +5V +12V In0- -5V OP213 1/2 MUX 8:1 AD508F 10 M - 5V 47 k -5V -5V 10 k -12V 68 k + 5V 10 k AD 7711 10 M In0+ -5V +5V AGND March 12, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 63
SMART I/O User’s Manual Chapter 5 Analog Modules 5.3.8 ‘C’ Programming 5.3.8.1 SM-THERM Library The SM-THERM library of functions smartio.l provide a convenient way of accessing the SM-THERM module. • All functions are written in ANSI C; • Prototypes are to be found in the file adclib.h. Hardware Requirements • SMART I/O Base Module or Base Module and Extension unit; • SM-THERM Module. Software Requirements The compiler from one of the following: • Ultra C Version 1.1.2 or higher; • FasTrak version 2.0.
Chapter 5 Analog Modules SMART I/O User’s Manual To compile the source, execute the following commands at the shell prompt: > chd //APPLIC/SMART > make all To execute the example: load //BSP/SMART/SMADC/adc_task * load HW task load //APPLIC/SMART/CMDS/demoadc * load example demoadc [slot] Slot = 0,1 .. 10 specifies the port of the SM-THERM module. (Default = 0) Note that the procedure names are generic and are applicable to both the SM-PT100 and SM-THERM modules.
SMART I/O User’s Manual Chapter 5 Analog Modules Read Temperature Values The HW task is prepared with a function that converts RAW values of a channel to degrees Celsius. To enable this facility, the function SMADCEnableConversion must be called after calling SMADCEnableRead. If the HW task has calculated these converted values, the function SMADCReadConverted can be used to get the value. Calibration Before the first value is fetched from the ADC, a calibration cycle is performed by the HW task.
Chapter 5 Analog Modules SMART I/O User’s Manual Figure 5.3.8.1. illustrates a typical programming structure for the correct operation of an SM-THERM SMART-Module. Figure 5.3.8.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.3 SMADCCalibrate Syntax error_code SMADCCalibrate(u_int8 PortNr); Description This function signals the HW task that a calibration cycle has to be started for the SM-THERM at slot PortNr. It is performed automatically when the module is initialised and may be called at any time (if the sensor for example is moved to a different location with different temperature ranges). All 4 channels of the module will be calibrated simultaneously.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.4 SMADCSetCyclicCalib Syntax error_code SMADCSetCyclicCalib(u_int8 PortNr, u_int secs); Description This function sets the time between two calibration cycles in seconds. If secs=0, then cyclic calibration is disabled.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.5 SMADCSetSensorType Syntax error_code SMADCSetSensorType(u_int8 PortNr, u_int8 channel, u_int16 sensorCode); Description This function checks if an SM-THERM board is fitted on the specified port, if the channel is valid, if the sensorCode is known and sets the gain, precision and mode to their default values for the type of sensor connected.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.6 SMADCGetSensorType Syntax error_code SMADCGetSensorType(u_int8 PortNr, u_int8 channel, u_int16 *pBuffer); Description This function checks if an SM-THERM board is fitted on the specified port and if the channel is valid. It gets the code of the sensor type of the specified channel and stores it in a user defined buffer. The user has to take care that there is enough place to store the data.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.7 SMADCSetPrecision Syntax error_code SMADCSetPrecision(u_int8 PortNr, u_int8 channel, u_int8 precision); Description This function checks if an SM-THERM board is fitted on the specified port and if the channel is valid. It sets the precision of the AD Converter. The valid precision values are defined in the file smadc.h. Note that large precision/filter values cause longer AD conversion times.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.8 SMADCGetPrecision Syntax error_code SMADCGetPrecision(u_int8 PortNr, u_int8 channel, u_int16 *pBuffer); Description This function checks if an SM-THERM board is fitted on the specified port and if the channel is valid. It gets the precision/filter setting of the AD Converter and stores the value in a user defined buffer. The user has to take care that there is enough space to store the data.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.9 SMADCSetMode Syntax error_code SMADCSetMode(u_int8 PortNr, u_int8 channel, u_int8 mode); Description This function checks if an SM-THERM board is fitted on the specified port and if the channel is valid and sets the mode of the AD Converter. The valid values (BIPOLAR, UNIPOLAR) are defined in the file smadc.h.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.10 SMADCGetMode Syntax error_code SMADCGetMode(u_int8 PortNr, u_int8 channel, u_int8 *pBuffer); Description This function checks if an SM-THERM board is fitted on the specified port and if the channel is valid. It gets the mode setting of the channel and stores the value in a user defined buffer. The user has to take care that the buffer is large enough to store the data.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.11 SMADCSetSignal Syntax error_code SMADCSetSignal(u_int8 PortNr, u_int8 channel, process_id procID, signal_code sigCode); Description This function defines the code of the signal that is sent by the HW task when the conversion of the channel is ready. The signal is sent to the process with the ID procID. If sigCode is set to 0, no signal will be sent (disable sending of signals).
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.12 SMADCSetGain Syntax error_code SMADCSetGain(u_int8 PortNr, u_int8 channel, u_int8 gain); Description This function checks if an SM-THERM board is fitted on the specified port and if the channel is valid and sets the value of the gain amplifier. The valid values for gain are defined in the file smadc.h.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.13 SMADCGetGain Syntax error_code SMADCGetGain(u_int8 PortNr, u_int8 channel, u_int8 *pBuffer); Description This function checks if an SM-THERM board is fitted on the specified port and if the channel is valid. It gets the gain amplifier setting of the ADC and stores the value in a user defined buffer where the user has to take care that the buffer is large enough to store the data.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.14 SMADCEnableRead Syntax error_code SMADCEnableRead(u_int8 PortNr, u_int8 channel, BOOLEAN enable); Description This function checks if an SM-THERM board is fitted on the specified port and if the channel is valid. It forces the HW task to read raw values from the enabled channels of the device one after the other. The HW task writes the results to the data module.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.15 SMADCEnableConversion Syntax error_code SMADCEnableConversion(u_int8 PortNr, u_int8 channel, BOOLEAN enable); Description This function checks if an SM-THERM board is fitted on the specified port and if the channel is valid and forces the HW task to convert the raw values. If the flag enable is TRUE (<>0), then conversion of raw values to degrees Celsius is executed, else if (enable=FALSE) no conversion takes place.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.16 SMADCReadRaw Syntax error_code SMADCReadRaw(u_int8 PortNr, u_int8 channel, u_int16 *pBuffer); Description This function checks if an SM-THERM board is fitted on the specified port and if the channel is valid. It reads the raw value of the last conversion and stores it in a user defined buffer. The user has to take care that the buffer is large enough to store the data.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.17 SMADCReadConverted Syntax error_code SMADCReadConverted(u_int8 PortNr, u_int8 channel, double *pBuffer); Description This function reads the converted value of the last AD Conversion and stores the value in degrees Celcius in a user defined buffer. The user has to take care that the buffer is large enough to store the data.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.8.18 SMADCDeinit Syntax error_code SMADCDeinit(u_int8 PortNr); Description This function frees the resources attached to this module if it was initialized. Input u_int8 PortNr Output error_code Number of the port to de-initialize SUCCESS or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 5 Analog Modules SMART I/O User’s Manual 5.3.9 ISaGRAF Programming 5.3.9.1 The ISaGRAF Board Parameters Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual. Figure 5.3.9.1.1 a Typical Screen Section for the SM-THERM Module Logical Address The 4 inputs of this module may be clearly seen together with the logical address at which this particular board is residing.
SMART I/O User’s Manual Chapter 5 Analog Modules 5.3.9.2 The ISaGRAF Operate Calls Operate calls are built into a program using ST or FBD languages when defining the project. A typical use could be at the initialization stage to check that the SMART-Modules are in fact located where they have been programmed to be.
Chapter 5 Analog Modules SMART I/O User’s Manual A complete list of the operate COMMANDS may be obtained by selecting a project from the ISaGRAF projects group, opening an application and observing the Common defines in the Dictionary pull-down menu. Note that not all calls in the list may be used within the SMART I/O environment however, the calls applicable to this module are : : The syntax and usage have already been explained.
SMART I/O User’s Manual Chapter 5 Analog Modules This page has been left blank intentionally.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.4 SM-ADC1 5.4.1 Introduction The SM-ADC1 provides a fast, 12-bit, bipolar (± 10V DC), 6-channel analog to digital converter. Two configurable red LEDs on the front panel form the user interface while an on-board EEPROM stores unique calibration data required by the signal converter. A version of the SM-ADC1 for current input (0 .. 20mA) is also available. 5.4.2 Specifications Isolation 1.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.4.3 Front Panel Layout Red LEDs User Descriptor Fields 5.4.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.4.5 Functional Description The SM-ADC1 has 6 differential voltage or current inputs depending on the ordered type. An on-board EEPROM contains board specific calibration data, module ID byte, sub ID byte and production data. A DC/DC converter generates the 5V to ±15V power requirements for the ADC converter and provides additional system isolation. 5.4.5.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.4.6 Configuration Although the SM-ADC1 has one solder jumper (J2) for EEPROM configuration, the user should not interfere with it. Jumper J4 likewise should not be interfered with as it is factory set at the time of ordering and controls the unipolar/bipolar mode of ADC operation . 5.4.7 Pinouts Screw Terminal Pinouts The following shows the pinout/signal relationship for the SM-ADC1 when connected to a particular screw terminal block.
Chapter 5 Analog Modules SMART I/O User’s Manual Connection: +Vcc (24V) IN5N IN2N IN5P IN2P IN4N IN1N IN4P IN1P IN3N IN0N IN3P IN0P Analog Sensors Pin 1 Pin 13 AGND Pin 14 AGND Pin 2 Gnd (0V) 5 Input Circuit: +15V +15V MAX358 MUX 1:8 124 220 k 1 nF +15V IN0N 220 k 4.7 k IN0P +5V MAX427 -15V 4.7 k MAX358 3.
SMART I/O User’s Manual Chapter 5 Analog Modules 5.4.8 ‘C’ Programming 5.4.8.1 SM-ADC1 Library The SM-ADC1 library of functions smartio.l provide a convenient way of accessing the SM-ADC1 module. • All functions are written in ANSI C; • Prototypes are to be found in the file adc1lib.h. Hardware Requirements • SMART I/O Base Module or Base Module and Extension unit; • SM-ADC1 Module. Software Requirements The compiler from one of the following: • Ultra C Version 1.1.2 or higher; • FasTrak 2.0.2 or higher.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.4.8.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.4.8.3 SMADC1GetVRaw Syntax error_code SMADC1GetVRaw(u_int8 PortNr, u_int8 Channel, int16 *pValue); Description This function fetches the conversion result of a selected channel without performing a gain or offset correction. The result is always a signed integer value.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.4.8.4 SMADC1GetV Syntax error_code SMADC1GetV(u_int8 PortNr, u_int8 Channel, int16 *pValue); Description This function fetches the conversion result of a selected channel. A gain and offset correction is performed and the result stored as a signed integer value.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.4.8.5 SMADC1SetLed Syntax error_code SMADC1SetLed(u_int8 PortNr, u_int8 LedNr); Description This function switches on one of the two LEDs fitted to the SM-ADC1. Input u_int8 PortNr u_int8 LedNr Output error_code SM-Port number to be accessed Number of the LED to switch on (1-2) SUCCESS E_SEEK if module was not initialised E-BMODE if the module is unknown or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 5 Analog Modules SMART I/O User’s Manual 5.4.8.6 SMADC1ClrLed Syntax error_code SMADC1ClrLed(u_int8 PortNr, u_int8 LedNr); Description This function switches off one of the two LEDs fitted to the SM-ADC1. Input u_int8 PortNr u_int8 LedNr Output error_code SM-Port number to be accessed Number of the LED to switch off (1-2) SUCCESS E_SEEK if module was not initialised E-BMODE if the module is unknown or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 5 Analog Modules SMART I/O User’s Manual 5.4.8.7 SMADC1DeInit Syntax error_code SMADC1DeInit(u_int8 PortNr); Description This function deinitialises the SM-ADC1 Module on the port PortNr by freeing the resources tied up with it and setting all outputs and inputs to zero. Input u_int8 PortNr Output error_code SM-Port number to de-initialise (from 0 to 10) SUCCESS E_SEEK if module not initialised or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 5 Analog Modules SMART I/O User’s Manual 5.4.9 ISaGRAF Programming 5.4.9.1 The ISaGRAF Board Parameters Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual. Figure 5.4.9.1.1 Typical Screen Section for the SM-ADC1 Module Logical Address The 6 inputs of this module may be clearly seen together with the logical address at which this particular board is residing.
SMART I/O User’s Manual Chapter 5 Analog Modules 5.4.9.2 The ISaGRAF Operate Calls Operate calls are built into a program using ST or FBD languages when defining the project. A typical use could be at the initialization stage to check that the SMART-Modules are in fact located where they have been programmed to be.
Chapter 5 Analog Modules SMART I/O User’s Manual A complete list of the operate COMMANDS may be obtained by selecting a project from the ISaGRAF projects group, opening an application and observing the Common defines in the Dictionary pull-down menu. Note that not all calls in the list may be used within the SMART I/O environment however, the calls applicable to this module are : : The syntax and usage have already been explained.
SMART I/O User’s Manual Chapter 5 Analog Modules O_ENABLE_LINE_CHECK: This operate call allows the user to enable openloop checking on the current version of the SMADC1. The syntax is as follows: := OPERATE(, O_ENABLE_LINE_CHECK, ); where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred.
Chapter 5 Analog Modules SMART I/O User’s Manual O_SET_LINE_LIMIT: This operate call allows the user to set the open loop detect level on the current version of the SM-ADC1. The syntax is as follows: := OPERATE(, O_SET_LINE_LIMIT, ); where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred.
SMART I/O User’s Manual Chapter 5 Analog Modules This page has been left blank intentionally.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.5 SM-DAC1 5.5.1 Introduction The SM-DAC1 provides a fast, 12-bit, bipolar (± 10V DC), 2/6-channel digital to analog converter. Two configurable red LEDs on the front panel form the user interface while an on-board EEPROM stores unique calibration data required by the signal converter. A version of the SM-DAC1 for current output (0 .. 20mA) is also available. 5.5.2 Specifications Isolation 1.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.5.3 Front Panel Layout Red LEDs User Descriptor Fields 5.5.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.5.5 Functional Description The SM-DAC1 has 2, 4 or 6 differential voltage or current outputs depending on the ordered type. An on-board EEPROM contains board specific calibration data, module ID byte, sub ID byte and production data. A DC/DC converter generates the 5V to ±15V power requirements for the D/A converter and provides additional system isolation. 5.5.5.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.5.6 Configuration Although the SM-DAC1 has one solder jumper for EEPROM configuration, the user should not interfere with it. 5.5.7 Pinouts Screw Terminal Pinouts The following shows the pinout/signal relationship for the SM-DAC1 when connected to a particular screw terminal block. Pin 1 Pin 13 Pin 2 Pin Nr. 1 3 5 7 9 11 13 Signal OUT0 AGND OUT1 AGND OUT2 AGND AGND Page 5 - 110 Description Analog Output Ch. 0 Analog GND Analog Output Ch.
Chapter 5 Analog Modules SMART I/O User’s Manual Connection: +Vcc (24V) OUT5 OUT2 OUT4 OUT1 OUT3 OUT0 Analog Sensors Pin 1 Pin 13 AGND AGND AGND AGND AGND AGND AGND Pin 14 AGND Pin 2 Gnd (0V) 5 Current Output Circuit: 0..
Chapter 5 Analog Modules SMART I/O User’s Manual Voltage Output Circuit: Software Controlled Switch 1/4 DG413 20k 1/2 LT112 DAC -2.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.5.8 ‘C’ Programming 5.5.8.1 SM-DAC1 Library The SM-DAC1 library of functions smartio.l provide a convenient way of accessing the SM-DAC1 module. • All functions are written in ANSI C; • Prototypes are to be found in the file dac1lib.h. Hardware Requirements • SMART I/O Base Module or Base Module and Extension unit; • SM-DAC1 Module. Software Requirements 5 The compiler from one of the following: • Ultra C Version 1.1.2 or higher; • FasTrak 2.0.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.5.8.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.5.8.3 SMDAC1OpenLoop Syntax error_code SMDAC1OpenLoop(u_int8 PortNr, u_int8 pStatus); Description This function should only be used for the current version of the SM-DAC1 module and checks the wires for open loop in a 4..20mA environment. The result is stored in a register with the following definition. Register value: 111110 101111 Input u_int8 PortNr u_int8 pStatus Output error_code -> channel 0 connected and o.k -> channel 4 connected and o.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.5.8.4 SMADAC1Operate Syntax error_code SMDAC1Operate(u_int8 PortNr); Description This function powers up the outputs as they are disconnected from the screw terminals by default. This is the software control of the software switch shown in the schematics earlier in this section of the manual.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.5.8.5 SMDAC1StandBy Syntax error_code SMDAC1StandBy(u_int8 PortNr); Description This function places the module connected on Port PortNr in standby mode where the outputs are disconnected from the screw terminal block. Input u_int8 PortNr Output error_code SM-Port number to be accessed SUCCESS E_SEEK if module was not initialised E-BMODE if the module is unknown or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 5 Analog Modules SMART I/O User’s Manual 5.5.8.6 SMDAC1PutVRaw Syntax error_code SMDAC1PutVRaw(u_int8 PortNr, u_int8 Channel, u_int16 Value); Description This function sets the selected DAC channel to the chosen value. No gain or offset correction is performed and the given value will always be masked to a 12-bit value.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.5.8.7 SMDAC1PutV Syntax error_code SMDAC1PutV(u_int8 PortNr, u_int8 Channel, int16 Value); Description This function sets the selected DAC channel to the chosen value. A gain and offset correction is performed with the use of the automatically selected conversion table depending whether a user-defined table has been specified or not. Hence, if a user-defined table exists then this will be used, otherwise the default factory set table will be used.
Chapter 5 Analog Modules SMART I/O User’s Manual 5.5.8.8 SMDAC1SetLed Syntax error_code SMDAC1SetLed(u_int8 PortNr, u_int8 LedNr); Description This function switches on one of the two LEDs fitted to the SM-DAC1. Input u_int8 PortNr u_int8 LedNr Output error_code SM-Port number to be accessed Number of the LED to switch on (1-2) SUCCESS E_SEEK if module was not initialized E-BMODE if the module is unknown or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 5 Analog Modules SMART I/O User’s Manual 5.5.8.9 SMDAC1ClrLed Syntax error_code SMDAC1ClrLed(u_int8 PortNr, u_int8 LedNr); Description This function switches off one of the two LEDs fitted to the SM-DAC1. Input u_int8 PortNr u_int8 LedNr Output error_code SM-Port number to be accessed Number of the LED to switch off (1-2) SUCCESS E_SEEK if module was not initialized E-BMODE if the module is unknown or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 5 Analog Modules SMART I/O User’s Manual 5.5.8.10 SMDAC1DeInit Syntax error_code SMDAC1DeInit(u_int8 PortNr); Description This function deinitialises the SM-DAC1 Module on the port PortNr by freeing the resources tied up with it and shuts down the outputs. Input u_int8 PortNr Output error_code SM-Port number to de-initialise (from 0 to 10) SUCCESS E_SEEK if module not initialised or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 5 Analog Modules SMART I/O User’s Manual 5.5.9 ISaGRAF Programming 5.5.9.1 The ISaGRAF Board Parameters Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual. Figure 5.5.9.1.1 Typical Screen Section for the SM-DAC1 Module Logical Address One of the outputs of this module may be clearly seen together with the logical address at which this particular board is residing.
SMART I/O User’s Manual Chapter 5 Analog Modules 5.5.9.2 The ISaGRAF Operate Calls Operate calls are built into a program using ST or FBD languages when defining the project. A typical use could be at the initialization stage to check that the SMART-Modules are in fact located where they have been programmed to be.
Chapter 5 Analog Modules SMART I/O User’s Manual A complete list of the operate COMMANDS may be obtained by selecting a project from the ISaGRAF projects group, opening an application and observing the Common defines in the Dictionary pull-down menu. Note that not all calls in the list may be used within the SMART I/O environment however, the calls applicable to this module are : : The syntax and usage have already been explained.
SMART I/O User’s Manual Chapter 5 Analog Modules O_DISABLE_CONV: This operate call tells ISaGRAF to disable the conversion of a particular channel of a connected SM-DAC1 module. The syntax is as follows: := OPERATE(, O_DISABLE_CONV, 0); where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred.
Chapter 6 Communications Modules SMART I/O User’s Manual Communications Modules for SMART I/O March 12, 1996 ©1996 PEP Modular Computers GmbH 6 Page 6 - 1
SMART I/O User’s Manual Chapter 6 Communications Modules Table of Contents 6. Communications Modules .......................6-5 6.1 SM-RS232 ............................................................................. 6-5 6.1.1 Introduction ......................................................................................... 6-5 6.1.2 Specifications ...................................................................................... 6-5 6.1.3 Front Panel Layout ....................................
Chapter 6 Communications Modules SMART I/O User’s Manual 6.2.8 MATCH Function .............................................................................. 6-26 6.2.9 Tested Sensors ................................................................................... 6-26 6.2.10 Configuration .................................................................................. 6-27 6.2.11 Pinouts ............................................................................................. 6-27 6.2.
SMART I/O User’s Manual Chapter 6 Communications Modules This page has been left blank intentionally.
Chapter 6 Communications Modules SMART I/O User’s Manual 6. Communications Modules 6.1 SM-RS232 6.1.1 Introduction The SM-RS232 provides serial communication observing a true RS232 interface definition. Interface parameters such as baud rate, stop bits, data bits and parity are defined by software. The hardware itself supports baudrates up to 120 kbaud but the delivered software only allows rates up to 19200 baud.
Chapter 6 Communications Modules SMART I/O User’s Manual 6.1.3 Front Panel Layout Yellow LED TxD Green LED RxD User Descriptor Fields SM-RS232 1 Serial Interface 6.1.
Chapter 6 Communications Modules SMART I/O User’s Manual 6.1.5 Functional Description Figure 4.3.5.1: SM-RS232 Schematic Diagram CTS sc Tra n RxD DTR eiv er TxD LED Driver System Interface GND The serial interface is realized using the TxD3 and RxD3 lines of the 68302 SCC3 port on the SMART-BASE and for this reason this module can only be used in the first slot on the SMART-BASE.
SMART I/O User’s Manual Chapter 6 Communications Modules 6.1.6 Configuration Jumper J1 - EEPROM Protection Jumper S e t t i n g s J1 set Description EEPROM is not hardware write protected open EEPROM is hardware write protected 6.1.7 Pinouts Screw Terminal Pinouts The following shows the pinout/signal relationship for the SM-RS232 when connected to a particular screw terminal block. Pin 1 Pin 2 Pin Nr.
Chapter 6 Communications Modules SMART I/O User’s Manual Connection GND TxD RxD DTR CTS Interface System Interface User Interface 6 TxD Vcc Connector MAX232A RxD DTR CTS GND March 12, 1996 ©1996 PEP Modular Computers GmbH Page 6 - 9
SMART I/O User’s Manual Chapter 6 Communications Modules 6.1.8 ISaGRAF Programming 6.1.8.1 The ISaGRAF Board Parameters Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual. Figure 6.1.8.1.1 Typical Screen Sections for the SM-RS232 Module Logical Address This particular module is accessed over an OS-9 device descriptor and driver which are already present in EPROM on the SMART-BASE.
Chapter 6 Communications Modules char_length : stop_bits : parity : baud_rate : xon_char : xoff_char : eor_char : SMART I/O User’s Manual This represents the number of data-bits within a transmitted character and may be 5, 6, 7 or 8 The number of stop-bits supported by the communication protocol may be : 0 for 1 stop-bit 1 for 1.
SMART I/O User’s Manual Chapter 6 Communications Modules 6.1.8.2 The ISaGRAF Operate Calls Operate calls are built into a program using ST or FBD languages when defining the project. A typical use could be at the initialization stage to check that the SMART-Modules are in fact located where they have been programmed to be.
Chapter 6 Communications Modules SMART I/O User’s Manual A complete list of the operate COMMANDS may be obtained by selecting a project from the ISaGRAF projects group, opening an application and observing the Common defines in the Dictionary pull-down menu. Note that not all calls in the list may be used within the SMART I/O environment however, the calls applicable to this module are : : The syntax and usage have already been explained.
SMART I/O User’s Manual Chapter 6 Communications Modules 6.1.9 OS-9 Programming Due to the fact that the device descriptor for the serial I/O is burnt into EPROM, it cannot be over-written with new values. Therefore a copy has to be generated in RAM where the parameters may be manipulated. This procedure is only useful for those users who wish to alter the default parameter settings.
Chapter 6 Communications Modules SMART I/O User’s Manual modify the settings, for example:$ xmode baud=19200 cs=7 par=none /scc3 check that the system has taken the parameters:$ xmode/scc3 /scc3 noupc bsp bsl echo if null=0 pause pag=24 bsp=08 del=18 eor=0D eof=1B reprint=04 dup=01 psc=17 abort=03 quit=05 bse=08 bell=07 type=00 baud=19200 xon=11 xoff=13 tabc=09 tabs=4 refer to the OS-9 help page for parameter descriptions by using the following: $ xmode -? and finally initiali
SMART I/O User’s Manual Chapter 6 Communications Modules This page has been left blank intentionally.
Chapter 6 Communications Modules SMART I/O User’s Manual 6.2 SM-SSI 6.2.1 Introduction The SM-SSI is an optoisolated single-channel, 24-bit RS422 interface for absolute encoders. Configurable data input together with flexibility afforded by software configurable encoder types transforms this SMART Module into an intelligent interface suitable for the most demanding applications. Data flow is indicated by the presence of two red LEDs on the front panel. 6.2.2 Specifications Isolation Input 2.
Chapter 6 Communications Modules SMART I/O User’s Manual 6.2.3 Front Panel Layout Red LEDs User Descriptor Fields An option to install a 12-bit DAC on a special piggyback is reserved for future use. 6.2.
Chapter 6 Communications Modules SMART I/O User’s Manual 6.2.5 Functional Description Figure 6.2.5.
Chapter 6 Communications Modules SMART I/O User’s Manual 6.2.6 SSI Operation With reference to figures 6.2.6.1 and 6.2.6.2, the operation of the SSI interface will be discussed. • The position of the encoder disk is continuously clocked. • Position data is ready for conversion by the parallel -> serial converter. • The controller (SM-SSI) demands the axis angle from the encoder which starts the SSI clock - the number of clock pulses required is dependent on the data width (24-bits). Figure 6.2.6.
Chapter 6 Communications Modules SMART I/O User’s Manual • The first HIGH to LOW clock edge (1) in figure 6.2.6.1, triggers the monoflop and allows the current parallel data word present in the parallel -> serial converter to be processed. The monoflop prevents other data transfers to this parallel to serial converter. • The crossing of the first LOW to HIGH clock edge after the trigger (2) in figure 6.2.6.1 allows the MSB of the Gray code or binary signal to be transferred.
SMART I/O User’s Manual Chapter 6 Communications Modules 6.2.7 Register Description The SM-SSI SMART-Module connected to a SMART I/O slot uses the SPI transparent mode for on-board data reading and writing and 5 parallel lines for data selection. On board are a set of registers and peripherals shown in the table below: No.
Chapter 6 Communications Modules SMART I/O User’s Manual 6.2.7.
Chapter 6 Communications Modules SMART I/O User’s Manual 6.2.7.5 Compare Register This 24-bit register indicates the comparison value and is cleared after a power-on reset. 6.2.7.6 Identification Register The identification register is read only and fixed at a value of $81. 6.2.7.
Chapter 6 Communications Modules SMART I/O User’s Manual Note Interrupt pending flags (IP0 - IP4) are set by the interrupt source if the corresponding line is not masked in the CTRL1 register. All flags are cleared when the STAT1 register is read. 6.2.7.
SMART I/O User’s Manual Chapter 6 Communications Modules 6.2.8 MATCH Function The match output, which is useful for detecting when an event occurs, is set using an A > B comparator where: A = the SSI data B = the compare register The MATCH output is set on an edge transition of the comparator output as follows: When counting up: MATCH is set when A passes from (A<=B) to (A>B) When counting down: MATCH is set when A passes from (A>B) to (A<=B) 6.2.
Chapter 6 Communications Modules SMART I/O User’s Manual 6.2.10 Configuration Jumper J1 - EEPROM Protection Jumper J1 Settings set open Description EEPROM is not hardware write protected EEPROM is hardware write protected 6.2.11 Pinouts Screw Terminal Pinouts The following shows the pinout/signal relationship for the SM-SSI when connected to a particular screw terminal block. Pin 1 Pin 2 Pin Nr.
Chapter 6 Communications Modules SMART I/O User’s Manual Connection EOR2 EOR1 EORC DIR- RESET- MATCH- COM+ DATA+ DATA- CLK- CLK+ +Vcc (24V) Pin 1 Pin 13 Pin 14 GND Pin 2 Gnd (0V) Input Circuit Encoder Wheel SchmittTrigger Parallel-Serial Converter Monoflop Input Switch Clock Si Shift SM-SSI SO Serial Data Photo Transmitter Photo Receiver Page 6- 28 Parallel Data Driver ©1996 PEP Modular Computers GmbH October 01, 1996
Chapter 6 Communications Modules SMART I/O User’s Manual 6.2.12 ‘C’ Programming 6.2.12.1 SM-SSI Library The SM-SSI library of functions smartio.l provide a convenient way of accessing the SM-SSI module. • All functions are written in ANSI C; • Prototypes are to be found in the file ssilib.h. Hardware Requirements • SMART I/O Base Module or Base Module and Extension unit; • SM-SSI1 Module. Software Requirements The compiler from one of the following: • Ultra C Version 1.1.2 or higher; • FasTrak 2.
Chapter 6 Communications Modules SMART I/O User’s Manual 6.2.12.2 SMSSIInit Syntax error_code SMSSIInit(u_int8 PortNr); Description This function initializes the SM-SSI Module on port PortNr, resetting and clearing the status of registers and allocating resource memory. Input u_int8 PortNr Output error_code SM-Port to initialize (from 0 to 10) SUCCESS E_BMODE if the module is unknown or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
Chapter 6 Communications Modules SMART I/O User’s Manual 6.2.12.3 SMSSIDeInit Syntax error_code SMSSIDeInit(u_int8 PortNr); Description This function deinitializes the SM-SSI Module on the port PortNr by freeing the resources tied up with this module. Input u_int8 PortNr Output error_code SM-Port number to de-initialize (from 0 to 10) SUCCESS E_BMODE if the module is unknown or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).
SMART I/O User’s Manual Chapter 6 Communications Modules 6.2.12.4 SMSSISetSetPoint Syntax error_code SMSSISetSetPoint(u_int8 PortNr, u_int32 Setpoint); Description This function copies the setpoint to an internal register which will only be sent to the SM-SSI when the function SMSSISetCtrlReg() is called. This function is used to set the preset value for the comparator if testing for a match.
Chapter 6 Communications Modules SMART I/O User’s Manual 6.2.12.5 SMSSISetCtrlReg Syntax error_code SMSSISetCtrlReg(u_int8 PortNr, long CtrlReg1, long CtrlReg2, long CtrlReg3, u_int32 *pData); Description This function sets the internal register images of all 3 parts of the 24-bit control register with values <> -1 and sends them to the SM-SSI. Simultaneously, the contents of the data register holding the last value is read back to the address pointed to by pData.
SMART I/O User’s Manual Chapter 6 Communications Modules 6.2.12.6 SMSSIGetStatus Syntax error_code SMSSIGetStatus(u_int8 PortNr, u_int8 *pStatus1, u_int8 *pStatus2); Description This function reads the status of the module selected on port PortNr.
Chapter 6 Communications Modules SMART I/O User’s Manual 6.2.12.7 SMSSIGetData Syntax error_code SMSSIGetData(u_int8 PortNr, u_int32 *pData); Description This function returns the absolute position data from the SM-SSI. If automatic mode is selected then a wait will not be performed otherwise SOT will be set and the read performed only when TC has been set.
Chapter 6 Communications Modules SMART I/O User’s Manual 6.2.13 ISaGRAF Programming 6.2.13.1 The ISaGRAF Board Parameters Because this module has not been defined as a physical board in the ISaGRAF project, it has been created as a function block as shown in figure 6.2.13.1.1. Figure 6.2.13.1.
Chapter 6 Communications Modules FB_SSI_READ SMART I/O User’s Manual In order that the current state of the encoder may be read, this command is issued - nor mally in a loop built into the ISaGRAF cycle. The read-back value appears in the position variable. As can be seen from figure 6.2.11.1.1, the inputs to the module are displayed on the left-hand side of the SSI block and the outputs are indicated on the right-hand side.
SMART I/O User’s Manual Chapter 6 Communications Modules This page has been left blank intentionally.