Home
5 - Pdfstream.manualsonline.com
Contents
1. xQ g Ro Bd ET BB ST4 S oz d Oo BH SMART Modules Baier EPROM FLASH Piggyback CRE UO Slot 0 UO Slot 1 UO Slot 2 SMPBBAT TAI elle e e ee Timer BS eee CADA OP C200 252 DA 72720729 027 SCR2 BU1 SCR1 SCR5 SCR4 SCR3 Rear View Fe 15 3e Full DUPLEX RS485 Option RTC Quartz Optional FLASH RS232 Driver March 12 1996 1996 PEP Modular Computers GmbH Page2 5 SMART I O User s Manual Chapter 2 SMART BASE 2 3 Functional Description Figure 2 3 0 1 SMART I O Block Diagram Serial Interfaces RS485 n RS232 Interface DC DC I O Controller SMART Module Timer Counter Interface Interface The MCU an MC68302 microprocessor operating at 20 MHz is responsible for handling all communication between the various interfaces and on board memory An RS485 highspeed PROFIBUS 2 wire interface is optically isolated from the system and may be configured for full duplex operation a 4 wire inter face available on request for OEM volume Likewise a fully configured RS232 modem interface is available for program downloading for example on SMART I O
2. 229 ero 22G eieegeg PEPPA ZPEPPZA 229 s eesoese ZPPP eee ere e eeiei coceren 1 4 2 SMART I O Module Installation The SMART I O Modules are fitted into the relevant sockets STI 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 1 SMART I O Module Installation S SMART Module SMART Module Socket WARNING Once fitted on the board the Module sockets and components should be on the right hand side of the Module March 12 1996 1996 PEP Modular Computers GmbH Page 15 SMART I O User s Manual Introduction 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 U1 il mim RJ45 Connector LUL B Te
3. Pin 14 Pin 2 Slot 3 5 7 9 Digital Side Process Side Pin 1 Slot B pin 13 eee AN e eje ee ee SAYRE EEE Pin 2 Pin Slot 4 6 8 10 14 SCRA SCRB WARNING Dangerous voltages may be present at the terminals Page 3 6 1996 PEP Modular Computers GmbH March 12 1996 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 Slot A from 65HC05C4 MCU port A STI Signal X Description Port A Pin 2 Port A Pin 4 Pin Nr Signa Description Pin Nr 5 PAS Port A Pin 5 6 PA6 Pot APin6 amp 7 PA7 PotAPin7z X 8 J PA8 Port A Pin 8 9 SysemGND GND 10 Serial Di RxD to SM BASE Reset Power ON OFF Reset Slot A Interrupt line INT4 to the I O Controller Slot B from 65HC05C4 MCU port B ST3 Pin Nr Signal Description Pin
4. e eo T st DN LO EI E Or CIE 2 z 2 2 2 2 O O O O OO Pn1 0 Pin 13 o Pin 2 4 4 e 4 ef Pin 14 A a OI a Di ar aq a Z Z Z Z Z Z Zz Z o o OO O O OO o lt L st Gnd 0V Current Output Circuit 0 20mA 1 2LT1112 AGND u October 01 1996 1996 PEP Modular Computers GmbH Page 5 111 SMART I O User s Manual Chapter 5 Analog Modules Voltage Output Circuit Software Controlled Switch 1 4 DG413 1 2 LT112 2 04V reference source for bipolar operation Page 5 112 1996 PEP Modular Computers GmbH October 01 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 5 8 C Programming 5 5 8 1 SM DACI Library The SM DACI library of functions smartio l provide a convenient way of accessing the SM DACI module All functions are written in ANSI C e Prototypes are to be found in the file dac lib h Hardware Requirements SMART I O Base Module or Base Module and Extension unit e SM DACI Module Software Requirements The compiler from one of the following Ultra C Version 1 1 2 or higher FasTrak 2 0 2 or higher The leftmost SM Module has number 0 assigned to it a far as programming is concerned although physically this is slot 1 Before a library function can be used the function SMDAC I Init must first be called Thi
5. Connection AGN INO INO TMP IN2 o o o O o o PT100 44 rel AGND IN1 IN1 TMP IN3 Input Circuit 5y 68k 47k BV 5y of o 5V E O 12V 10M a ii AD508F 12V z N Q MUX 8 1 AD508F 5V TOM 6 12V O O DN 47k 68k 5V AGND L Page 5 63 March 12 1996 1996 PEP Modular Computers GmbH SMART I O User s Manual Chapter 5 Analog Modules r 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 e SM THERM Module Software Requirements The compiler from one of the following Ultra C Version 1 1 2 or higher FasTrak version 2 0 2 or higher The leftmost SM Module has number 0 assigned to it a far as programming is concerned although physically this is slot 1 Before a library function can be used the function SMADCInit must first be called This allocates the requested resources Furthermore this function needs to be called for each SM THERM module called within the task Upon completion of the application the function SMADCDelnit needs to be called for each SM THERM module that has been initialized In order to illustrate the us
6. 0 PADAL Pin 2 Pin 14 4 10 Page 5 92 1996 PEP Modular Computers GmbH October 01 1996 Chapter 5 Analog Modules SMART I O User s Manual Connection O O Voc 24V Analog Sensors EEA III JL Pin 7 Pin 13 S Pin 2 Pin 14 O O Gnd OV Input Circuit October 01 1996 1996 PEP Modular Computers GmbH Page 5 93 SMART I O User s Manual Chapter 5 Analog Modules r 5 4 8 C Programming 5 4 8 1 SM ADCI Library The SM ADC I library of functions smartio l provide a convenient way of accessing the SM ADCI module All functions are written in ANSI C e Prototypes are to be found in the file adc lib h Hardware Requirements SMART I O Base Module or Base Module and Extension unit e SM ADCI Module Software Requirements The compiler from one of the following Ultra C Version 1 1 2 or higher FasTrak 2 0 2 or higher The leftmost SM Module has number 0 assigned to it a far as programming is concerned although physically this is slot 1 Before a library function can be used the function SMADC I Init must first be called This allocates the requested resources Furthermore this function needs to be called for each SM ADCI Module called within th
7. Connection ae Vcc 24V S Digital Sensors Pni Hu H Pini3 o o amp Pin 2 Pi e A E Pin 14 O O Gnd OV Input Circuit User Input Interface System Interface e SS e e eher E Vcc 24V Typ Common GND 8V2 LL4448 5K1 Gnd OV GOEXT u March 12 1996 1996 PEP Modular Computers GmbH Page 4 11 SMART I O User s Manual Chapter 4 Digital Modules r 4 1 8 C Programming 4 1 8 1 SM DINI Library The SM DINI library of functions smartio l provide a convenient way of accessing the SM DINI module All functions are written in ANSI C e Prototypes are to be found in the file din lib h Hardware Requirements SMART I O Base Module or Base Module and Extension unit SM DINI Module Software Requirements The compiler from one of the following Ultra C Version 1 1 2 or higher FasTrak 2 0 2 or higher The leftmost SM Module has number 0 assigned to it a far as programming is concerned although physically this 1s slot 1 Before a library function can be used the function SMDIN 1 Init must first be called This allocates the requested resources Furthermore this function needs to be called for each SM DINI Module called within the task Upon completion of the application the function SMDIN1 Delnit needs to be called for each SM DINI Module that has been initialized In order to illustrate the use of
8. Page 3 4 1996 PEP Modular Computers GmbH March 12 1996 Chapter 3 SMART EXT SMART I O User s Manual 3 3 Functional Description Figure 3 3 1 SMART EXT Block Diagram Interface Interface Connector Slot Detect Connector with Logic and with Integrated Buffer Integrated SPI SPI 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 The maximum bit transfer rate is set to 1 MHz which ensures a typical response time from an addressed extension slot of approximately SOLS The MCU Micro Controller Unit 68HC05C4 handles the SPI transfers and the slot dependent commands and actions through the SMART EXT firmware burned into the MCU mask or in an OTP One Time Programma ble PROM area In order to communicate with a particular SMART EXT slot a specific PEP defined protocol has to be observed All necessary functions are provided in the OS 9 C library SMAC L which should be included when writing a specific C application program u March 12 1996 1996 PEP Modular Computers GmbH Page3 5 SMART I O User s Manual 3 4 Pinouts Figure 3 4 0 1 SMART EXT Pinout Overview SPI Chapter 3 SMART EXT Pin 1 Slot A Pin13 eee ele ee ALP eee ee ee 0000 00
9. Pin 14 G47EXT O Gnd OV GO3EXT Output Circuit System Interface User Interface VO1EXT Vec 24V TIP125 Opto TLP521 BYMO05 100 Gnd 0V GO3EXT March 12 1996 1996 PEP Modular Computers GmbH Channel 0 Channel 1 Channel 2 Channel 3 u Page 4 23 SMART I O User s Manual Chapter 4 Digital Modules r 4 2 8 C Programming 4 2 8 1 SM DOUTI Library The SM DOUT1 library of functions smartio l provide a convenient way of accessing the SM DOUTI module All functions are written in ANSI C e Prototypes are to be found in the file doutllib h Hardware Requirements SMART I O Base Module or Base Module and Extension unit e SM DOUTI Module Software Requirements The compiler from one of the following Ultra C Version 1 1 2 or higher FasTrak 2 0 2 or higher The leftmost SM Module has number 0 assigned to it a far as programming is concerned although physically this is slot 1 Before a library function can be used the function SMDOUT Init must first be called This allocates the requested resources Furthermore this function needs to be called for each SM DOUTI Module called within the task Upon completion of the application the function SMDOUT I DelInit needs to be called for each SM DOUT1 Module that has been initialised In order to illustrate the use of th
10. 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 4 1 Screw Terminal Block Installation Page 1 16 1996 PEP Modular Computers GmbH March 12 1996 Introduction SMART I O User s Manual The battery piggyback SMPBBAT is fitted into the socket BU3 on the SMART BASE It is important that the piggyback 1s inserted in the correct way The figure below illustrates this procedure 1 4 5 Battery Installation Figure 1 4 5 1 Battery Piggyback Installation Battery SMPBBAT Battery Type 3V Lithium BR2032 3V Lithium CR14250 Battery Capacity 190mAh 850mAh Typical Data Retention Time 140 Days 590 Days this is the time without the main power being applied WARNING Once fitted on the board the battery should be on the right hand side of the SMPBBAT piggyback If the battery needs to be replaced it must only be done with a replacement SMPBBAT piggyback the order number of which is Shown in the Ordering Information section of this manual The temperature on the bat
11. 4 8 4 1 6 Configuration esses 4 9 SN ITA d To TL DR 4 10 4 1 0 C PPIOUF ammilig E 4 12 4 1 9ISAGRAF Programming 4 16 42 SM DOU T T eseeorire ti terceeer trienen u EREE 4 19 4 2 T INVOGUCUON ee naina 4 19 EE ee 4 19 4 2 3 Front Panel Layout cccseccsesecseeenseseeneeees 4 20 4 2 4 Board Overview osseeessseeneee 4 20 4 2 5 Functional Description 4 21 4 2 6 Configuration esses eren 4 22 Page 4 2 Manual ID 09901 Rev Index 0500 08 Jan 98 Digital Modules SMART I O User s Manual e Ee 4 22 4 2 9ISAGRAF Programming 4 29 OL en ee ee 4 33 4 3 1 Introduction a ce 4 33 4 3 2 Specifications 4 33 4 3 3 Front Panel Layout cscccsseecsseecsesenseeenaes 4 34 4 3 4 Board Overview essen 4 34 4 3 5 Functional Description 4 35 4 3 6 Configuration eese 4 36 AGT eilselP iL 4 36 43 9 G Programming es raies 4 38 44 SIMMJAGITa eiecti tte teet rte Ere eerie 4 53 EF WO OUCH ON ES a E 4 53 4 4 2 Specifications 4 54 4 4 3 Front Panel Layout ccccsseccsssecsesenaeeenaes 4 55 4 4 4 Board Overview uu sssecccccsesseeceeseseessnnensess 4 56 4 4 5 Functional Description 4 58
12. Buffer Explanation Bit Value 0 No input or not connected Input Active 4 4 9 ISaGRAF Programming 4 4 9 4 ISaGRAF Board Parameters Information on board parameters may be found in the PEP on line help and ISaGRAF on line help or user s manual Figure 4 9 Typical Screen Section for the SM ACI1Module Page 4 68 Manual ID 09901 Rev Index 0500 08 Jan 98 Digital Modules SMART I O User s Manual 08 Jan 98 e 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 1 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 2 ISaGRAF Operate Calls Logical Address Operate calls are built into a program using ST or FBD lan guages 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 The syntax of the operate call is as follows Syntax return variable OPERATE lt source var COMMAND lt source data Here the return variable 1s assigned a value associated with the selected COMMAND parameter Each SMART Module pos sesses its own set of such COMMANDS
13. Modular Computers 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 98 This page was intentionally left blank Preface SMART I O User s Manual e Preface Revision History 0 4 For Your Safety 0 5 Special Handling and Unpacking In StrUCtiOnNS esseeesessesseees seen 0 6 HV Safety Instructions 0 6 Two Years Warranty 0 7 Table of Contents 0 9 08 Jan 98 Manual ID 09901 Rev Index 0500 Page 0 3 Preface SMART LO User s Manual Revision History Manual Product Title SMART I O User s Manual Manual ID Number 09901 Brief Description of Changes PCB Index pani Dec 94 General Update SM DAD1 amp Software Library Added New MS Modules Added D5 Format New MS Modules Added Corrections Including Update of SM DAD1 C Pro gramming Section mE a mE This document contains proprietary information of PEP Modular Computers It may not be copied or transmitted by any means passed to others or stored in any retrieval system or media without the prior consent of PEP Modular Com puters or its authorized agents The information in this document is to the best of our knowledge entirely cor rect However PEP Modular Computers cannot accept liability for any inaccu racies or
14. Example error code OPERATE lt channel gt O INIT CODE 0 O INIT CODE is one of a number of distinct commands recog nized by the PEP Modular Computers implementation of board drivers and checks for example that the board is located where the program expects it to be Manual ID 09901 Rev Index 0500 Page 4 69 SMART I O User s Manual Digital Modules r Page 4 70 Channel provides channel specific information and in the exam ple shown here any of the 8 input channels may be used The last parameter is not usually used by PEP implementations and 1s set to O 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 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 Dictio nary 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 OW INIT CODE Syntax and usage as explained above Manual ID 09901 Rev Index 0500 08 Jan 98 Chapter 5 Analog Modules SMART I O User s Manual e Analog Modules for SMART 1 0 u March 12 1996 1996 PEP Modular Computers GmbH Page5 1 SMART I O User s Manual Chapter 5 Analog Modul
15. 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 Input into Becke SM Port to be accessed im Ante Channel Number of the ADC input channel to access 0 3 int16 pValue Pointer to the location where the conversion result will be stored Output error Code 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 Example RetVal SMDAD1GetVRaw 0 2 OxO7FF Value 16 bit HEX Unipolar Bipolar Positive Full Scale 0 0000 1LSB SFFFF u March 12 1996 1996 PEP Modular Computers GmbH Page 5 19 SMART I O User s Manual Chapter 5 Analog Modules 5 1 8 5 SMDAD1GetV Syntax error code SMDADIGetV u_int8 PortNr u int8 Channel intl6 pValuse 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
16. Description 5 Paz 68302PotAi2 6 PAS 68302 Port A13 7 Paa 68302 Pot Aid 8 PAS 68302 Port AT5_ 9 System END GND 30 Beta XD RD 18 CSSMi Por Select Module 0 INT3 to the Reset Power ON OFF EM SM1 Interrupt PIT INTR to e SMART Module location 1 ST3 pinouts Pin Nr Signal Description Pin Nr Signal Description 1 JI POConvolerPonto 2 PTE VO Controller Port B1 3 PITE2 lO ContollerPortB2 4 Pimes VO Controller Port B3 5 Prea lOConmolerPortB4 5 _ 7 Pires VO ContolerPortB6 8 PTE NO Controller Port B7 9 System GND OND 10 Serial XD RD TD TxD CS SM2 Port Select Module 1 Serial CLK INT2tothe Reset Power ON OFF SM2 Interrupt PUT Ve 0 the Page 2 10 1996 PEP Modular Computers GmbH March 12 1996 Chapter 2 SMART BASE SMART I O User s Manual SMART Module location 2 ST1 pinouts Pin Nr Signal Description Pin Nr Signal Description 5 Pma VOContolerPotA4 6 PITAS VO Controller Port A5 7 PITA6 VO ConiolerPotA6 8 PITA7 VO Controller Port A7 9 System GND Serial RxD System VCC IV VCC 12 Serial TxD TxD CS SM3 Port Select Module 2 Serial CLK CLK Reset Reset Power ON OFF 16 SM3 Interrupt DUT Meor to the I O Controller Pinouts process side ST6 ST4 and ST2
17. March 12 1996 1996 PEP Modular Computers GmbH Page 5 21 SMART I O User s Manual Chapter 5 Analog Modules 5 1 8 7 SMDADIPutV Syntax error code SMDADIPutV u_int8 PortNr u int8 Channel inclo 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 Input u_int8 PortNr SM Port number to be accessed u int8 Channel Number of the DAC output channel to access 0 1 int16 Value Value to be written Output error code 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 Example RetVal SMDAD1PutV 0 1 Ox7FF Unipolar Bipolar Positive Full Scale o 000 F 80000 Page 5 22 1996 PEP Modular Computers GmbH March 12 1996 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 DADI Input u 1nt8 PorcNr SM Port number to be accessed u int8 LedNr Number of the LED to switch on 1 2 Output error Code SUCCESS E S
18. 1996 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 The three green LEDs mentioned earlier show the state of e PROFIBUS SV e System 5V and Power ON u March 12 1996 1996 PEP Modular Computers GmbH Page 1 25 SMART I O User s Manual Introduction r 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 Two such programs the SM DEMO and 2 are discussed here SM DEMO should be used if the SMART I O has the SM DOUTI module in the first of the SMART Module slots and has SM DINI in slot 2 the last on the SMART BASE SM DEMOJ should be used if the modules are reversed To install the demonstrations correctly observe the following procedure and make sure the correct diskette is in place Run the Projects Program and select SM DEMOI or SM DEMO2 by double clicking on the icon Go to the Debug PC PLC Link Menu to ensure that the corr
19. 1996 1996 PEP Modular Computers GmbH Page 5 65 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 1s per formed by the HW task The user also has the facility to force the HW task to execute a calibration cycle by calling either SMADCCalibrate for one calibration or SMADCSetCyclicCalib Then a calibration is executed if a user defined interval has expired Deinitialization If the task calling the SMADC library function finishes the function SMADCDelnit should be called by this task to free memory and resources otherwise tied up with the application Other Functions For more information on other functions refer to the description of the functions later in this document or the example demoadc c LEDs Both LEDs on the SM THERM module are used to show the status of the HW task LED 1 is the upper one LED2 is the lower one LEDi LED2 Siatus ADC is not in use Calibration in progress AD conversion in progress Standardisation to reference value in progress Page 5 66 1996 PEP Modu
20. 1996 PEP Modular Computers GmbH Page 5 49 SMART I O User s Manual Chapter 5 Analog Modules 5 2 8 13 SMADCGetGain Syntax error code SMADCGetGain u int8 PortNr u int8 channel H into pBurtfer 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 Input u inte PortNr Port number to fetch the gain setting from 0 to 10 u_int8 channel Number of specified channel 0 to 3 u_int8 pBuffer Pointer to an user defined buffer Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCGetGain 0 1 amp Buffer Page 5 50 1996 PEP Modular Computers GmbH March 12 1996 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 1s 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
21. LSB of Gray code Gn MSB of Gray code tm Monoflop time Tp Pause time in SSI clock Binary code may also be converted Page 6 20 1996 PEP Modular Computers GmbH October 01 1996 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 gt 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 With every successive LOW to HIGH transition of the SSI clock the next bit in the data stream i1s transferred this action continues until all the data bits have been transferred The SSI clock continually retriggers the monoflop forcing it s output to remain low and thereby preventing unwanted data from being processed When the controller SM SSI has received the LSB of the data stream it stops the SSI clock as shown in point 3 of figure 6 2 6 1 The monoflop ceases to be triggered and after a time tm returns to a high state as shown in 4 of figure 6 2 6 1 This allows a new data value to be transferred to the parallel gt serial converter Figure 6 2 6 2 SM SSI Timing Diagram for serial transfer Pause Pause u October 01 1996 1996 PEP
22. Page 28 1996 PEP Modular Computers GmbH March 12 1996 Chapter 2 SMART BASE SMART I O User s Manual 1 Table of Contents 2 SMART BASE_ eer 2 3 P N Eee ze E CO CH 2 4 2 2 DOSE EE 2 5 2 3 Functional Description ciere t trs eter ER Tor Fees ba erase 2 6 24 E SE e E 2 8 2 4 1 Jumper J1 Boot Selection Pin Connector sseueuuussse 2 8 2 4 2 Jumper J6 LED Function Pin Connector 2 0 2 9 DBNHOU ee 2 9 2 5 1 SMART Module Piggyback Connectors suususssse 2 10 2 5 2 Screw Terminal PINOULS detre see 2 12 2 5 3 Timer I O Screw Terminal SCRI oo cccccccccceeeeeeeseseeeeeeeens 2 12 2 5 4 Supply Screw Terminals SCR2 0 cccccccccccccceeeeseseeseeeeseescsecsees 2 14 2 5 5 RS232 Telephone Connector BU1 oo cccccceeeeeeeeeeeeeeeeeens 2 15 2 5 6 RS485 D Sub Connector for Half Duplex Operation Profibus 2 15 2 5 7 SPI Connector S17 2 16 2 6 C Programming ccccccccessesssseseeeecececcceeeeeeeeeeaasasseesseeeees 2 17 2 6 1 SMART BASE LiDtary occ te Es EEEN 2 17 RE WE 2 18 PAL UNS eI SO sgt a de tac 2 20 NT T 2 21 SN IS e EE 2 23 PA ORNARI crass E ane ne nes ences ase 2 24 PA LAS Rr ee 2 25 pal UH 2 26 PNIS S hue MCT 2 27 DMS E 2 28 PAIN SM OR E E 2 29 OR EN A E R 2 30 2 8 MN OR A 2 31 Mar
23. 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 The syntax and usage have already been explained O ENABLE CONV This operate calls tells ISaGRAF to enable the conversion of a particular channel of a connected SM PT100 module The syntax is as follows analog var e OPERATE iovar O ENABLE CONV 0 where analog var represents the analog return variable and can be zero 1f the operate call is supported and the correct iovar is passed or non zero if an error occurred lt iovar gt is the variable name for the channel where the operate call is to take effect O DISABLE CONV This operate call tells ISaGRAF to disable the conversion of a particular channel of a connected SM PT100 module The syntax is as follows lt analog var gt OPERATE lt 10var gt O DISABLE CONV 0 Where lt analog var gt represents the analog return variable and can be zero if the operate call is supported and the correct iovar is passed or non zero if an error occurred lt iovar gt is the variable name for the channel where the operate call is to take effect Page 5 58 1
24. The input circuitry of the SM ADCI consists of an R C first order low pass filter to prevent noise and signals greater than 10kHz from entering the system a 1 6 channel multiplexer followed by a differential amplifier divider and a 12 bit fast analog to digital converter ADC Figure 5 4 5 1 SM ADC1 Input Shematic Diagram Voltage Low Pass Input System Source Filter Amplifier Interface 10 10V I Single Ended LU The ADC using successive approximation and input track and hold is referenced by its own on chip voltage source supplying 4 096V To cater for bipolar full scale inputs this reference source is split 2 048V 2 048V The incoming voltage signals are multiplexed and reduced via a 1 5 divider network so that the ADC is supplied with a scalable input voltage range u October 01 1996 1996 PEP Modular Computers GmbH Page 5 91 SMART I O User s Manual Chapter 5 Analog Modules r 5 4 6 Configuration Although the SM ADCI has one solder jumper J2 for EEPROM configura tion 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 ADCI when connected to a particular screw terminal block Pin 1 Pin 13 e o o ooo PPRHPEP IN A o
25. User 23mW min 160mW max Standard 0 C to 70 C 61g 20 read by the SPI Interface u March 12 1996 1996 PEP Modular Computers GmbH Page 4 33 SMART I O User s Manual Chapter 4 Digital Modules 4 3 3 Front Panel Layout User Descriptor Fields Yellow LEDs Green LED Yellow LED 4 3 4 Board Overview Component Side LED 7 LED 0 Optocouplers s sech C Driver Page 4 34 1996 PEP Modular Computers GmbH March 12 1996 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 Load LED Driver System Digital Interface Output 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 Conversely a logical 1 appearing on the external VCC line suggests that this supply 1s connected and active The operational life of the relays 1s recorded in terms of operating cycles and refers to mechanical failure The contacts however could be damaged through excessive load switching causing sparks to break down the contact surface This in turn could increase the resistance and lead to an MTBF that is shorter than that quoted in the specifications 256 bytes of serial EEPROM c
26. approx Low Level en lt 8V Green LEDs ON when Input gt 10V Options User configurable R C filter on the DU iasi cnannel for INTx generation 5mW min 100mW max Standard 0 C to 70 C Extended 40 C to 85 C Module Weight 40g ID Byte 01 read by the SPI Interface March 12 1996 1996 PEP Modular Computers GmbH Page 4 5 SMART I O User s Manual Chapter 4 Digital Modules 4 1 3 Front Panel Layout User Descriptor Fields Green LEDs Page 4 6 1996 PEP Modular Computers GmbH March 12 1996 Chapter 4 Digital Modules SMART I O User s Manual 4 1 4 Board Overview Component Side LED 7 LED 0 Optoisolation Digital Input and LED Drivers Pin 2 Pin 16 Pin 2 Pin 16 Solder Side LED 0 LED 7 Pin 16 Pin 2 Pin 16 Pin 2 March 12 1996 1996 PEP Modular Computers GmbH Page 4 7 SMART I O User s Manual Chapter 4 Digital Modules 4 1 5 Functional Description Figure 4 1 5 1 SM DINI Schematic Diagram User Input System Interface Interface oe Digital LED Filter pat Bid 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 Circuit After the optoisolation part of the circuit an R C first order low pass filter prevents noise and signals greater than 200Hz from entering the
27. 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 Example RetVal SMTselIn MODEOO The counter timer contains a 24 bit synchronous down counter that is loaded from three 8 bit counter preload registers The 24 bit counter may be clocked by the output of a 5 bit divide by 32 prescaler or by an external timer input TIN If the prescaler 1s used it may be clocked by the system clock 6 MHz CLK pin or by the TIN external input The counter signals the occurrence of an event primarily through zero detection A zero is when the counter of the 24 bit timer is equal to zero This sets the zero detect status ZDS bit in the timer status register It may be checked by the proces sor or may be used to generate a timer interrupt The ZDS bit can be reset by writing a one to the timer status register in that bit position independent of timer operation The general operation of the timer is flexible and easily programmable The timer is fully configured and controlled by programming the 8 bit timer control register It controls 1 the choice between Simple I O operation and the timer operation of the three timer pins 2 whether the counter is loaded from the counter preload registers or rolls over when zero
28. 10 u int8 channel Number of specified channel 0 to 3 BOOLEAN enable Flag for enabling or disabling reading of the specified channel Output error Code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCEnableRead 0 1 FALSE Page 5 80 1996 PEP Modular Computers GmbH March 12 1996 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 lt gt 0 then conversion of raw values to degrees Celsius is executed else if enable FALSE no conversion takes place The function invalidates converted data 1f enable 1s set to FALSE Input u int8 PortNr Port number to enable data conversion from 0 to 10 u int8 channel Number of specified channel 0 to 3 BOOLEAN enable Flag for enabling or disabling conversion of raw values Output Grror code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified E BMODE If conversion can t be enabled because a bad or no sensor
29. 1996 PEP Modular Computers GmbH Page 2 3 Page 2 4 SMART I O User s Manual 2 1 Specifications Nominal Input Voltage Input Voltage Range Input Current Main Output Voltage Auxiliary Output Voltage Switching Frequency Main Output Ripple Max Efficiency Galvanic Isolation Chapter 2 SMART BASE DC DC 24V DC 18V 36V DC 140mA typ 24V static 400mA typ 24V full load 5V DC 1 2A 2 5 5V DC 150mA PROFIBUS RS485 5 100kHz 10mV typ 6896 typ between 74 and 100 load 500V DC max to from supply source Controlling Unit CPU EPROM or FLASH FLASH DRAM SRAM EEPROM Galvanic Isolation Temperature Range Storage Operating Extended Operating Humidity Weight Option 1996 PEP Modular Computers GmbH MC68302 20MHz 1 MByte or 256 kByte on Jedec 32 pin sockets 16 bit access 1 MByte or 256 kByte additionally soldered on rear side of the board 16 bit access 512 kByte byte word access 16 bit 64 kByte byte word access 16 bit 93C46 32 byte system data 2 5kV DC to from process I O Common 40 C to 85 C without battery 0 C to 70 C 40 C to 85 C 0 to 95 non condensing 640g typ without SMART Modules blank panels or screw terminals March 12 1996 Chapter 2 SMART BASE SMART I O User s Manual 2 2 Board Overview Front view RS485 Isolated PROFIBUS SPI
30. 3 8 6 SMADCGetSensorType Syntax error code SMADCGetSensorType u int8 PortNr u_int8 channel u intl16 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 A list of PEP supported sensor types can be found in the file inear h Input H inte PortNE Port number from which to fetch sensor type from 0 to 10 u int8 channel Number of specified channel 0 to 3 u intl6 pBuffer Pointer to a user defined buffer Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCGetSensorType 0 1 amp Buffer Page 5 72 1996 PEP Modular Computers GmbH March 12 1996 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 1s valid It sets the precision of the AD Converter The valid precision values are defined in the file smadc h Note that large preci sion filter values ca
31. 4 Digital Modules SMART I O User s Manual 4 3 8 4 SMREL1Reset Syntax error code SMRELIReset 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 SMRELIIDelInit function call but it does ensure that the relay status and LEDs is as expected Input u int8 PortNr Number of the SM port to reset Output error code SUCCESS E BMODE if the module 1s unknown or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMRELIReset 0 u March 12 1996 1996 PEP Modular Computers GmbH Page 4 41 SMART I O User s Manual Chapter 4 Digital Modules 4 3 8 5 SMREL1GetRly Syntax error code SMREL1IGetRly u_int8 PortNr U_1nts ourrfer 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 relay open Bits 6 and 7 are cleared Input u int8 PortNr SM Port number to get data u int8 buffer Pointer to Buffer where data 1s written Output Grror code SUCCESS E BMODE if the module 1s unknown or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMRELIGetRIy 0 buffer Page 4 42 1996 PEP Modular Computers GmbH March 12 1996 Chapter 4 Digital Modules SMART I O User s Manual 4 3 8 6 SMRELI
32. 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 Example RetVar SMwdtrig Page 2 30 1996 PEP Modular Computers GmbH March 12 1996 Chapter 2 SMART BASE SMART I O User s Manual 1 2 6 13 SMwdoff Syntax error code SMwdort 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 Example RetVar SMwdoff u March 12 1996 1996 PEP Modular Computers GmbH Page 2 31 SMART I O User s Manual Chapter 2 SMART BASE r 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 Eem 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 t in represents a variable for the counter timer and is used for the operate call to decide which port to access Page 2 32 1996 PEP Modular Computers GmbH March 12 1996 Chapter 2 SMART BASE SMART I O User s Ma
33. 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 type ch V type ch3 V Logical Address The 4 inputs of this module may be clearly seen together with the logical address at which this particular board is residing Remember this logical address 1s the same as the physical slot position In the example shown here the board being addressed is in slot 3 1 e the third 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 Module Specific Information calib period This is the time in seconds for cyclic calibration if required An entry of zero disables the function type ch x This parameter is set depending on the sensor type or may be V if the measured values are required in microvolts with a module in bipolar mode March 12 1996 1996 PEP Modular Computers GmbH Page 5 85 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 The syntax of the operate call is as follows Syntax retu
34. 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 param eter settings The procedure is therefore as follows From the prompt that is displayed under OS 9 copy the descriptor to the ramdisk thus save scc3 lt return gt change the revision number from 0 to 1 so that OS 9 selects the newest fixmod ua 8001 scc3 lt return gt Module scc3 Fixing header parity Fixing module CRC now load the new revision into memory i e a copy from the ramdisk load ld scc3 return load loaded scc3 delete the copy held on the ramdisk to free the space del scc3 return check the port settings xmode scc3 return Secs noupc bsp bal 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 9600 xon 11 xoff 13 tabc 09 tabs 4 Page 6 14 1996 PEP Modular Computers GmbH March 12 1996 Chapter 6 Communications Modules SMART I O User s Manual modify the settings for example xmode baud 19200 cs 7 par none scc3 lt return gt check that the system has taken the parameters xmode scc3 lt return gt ose noupc bsp bsl echo if null 0 pause pag 24 bsp 08 del 18 eor 0D eof 1B
35. Data Parity Software configurable data bits parity encoder type Software detection of line break SSI defined RS422 type Clock Output 62 5 125 250 or 500kHz programmable Tx Pulse Freq Data flow controlled by software and indicated by LED status Up to 24 bit Compare Register with pass through compare Interrupt software and LED control of Match Result 325 mW min 375mW max Standard 0 C to 70 C Extended Storage 40 C to 85 C Operating Humidity 0 to 95 non condensing T All outputs are referenced to the common Ext Vcc u October 01 1996 1996 PEP Modular Computers GmbH Page 6 17 SMART I O User s Manual Chapter 6 Communications Modules 6 2 3 Front Panel Layout Red LEDs User Descriptor ields An option to install a 12 bit DAC on a special piggyback is reserved for future use 6 2 4 Board Overview Component Side LED1 LEDO EEPROM PROM J1 sexe D 15 E 1 15 1996 PEP Modular Computers GmbH Page 6 18 October 01 1996 Chapter 6 Communications Modules SMART I O User s Manual 6 2 5 Functional Description Figure 6 2 5 1 SM SSI Schematic Diagram SSI Interface lt LM Deta Selection End of Decoder S can E v Last Value EOR 24 bit Control Log P EORCOM2 bs Status Pome Encoder Control Configuration FPGA LED 0 Data Flow The Synchronous Serial Interface working together with a photographically etched encoder disk allows absolute c
36. Disk 2 2 for DOS Profibus FMS for ISaGRAF Documentation Disk 1 1 Target Disk 1 2 for OS 9 Target Disk 2 2 for OS 9 Page 1 18 1996 PEP Modular Computers GmbH March 12 1996 Introduction SMART I O User s Manual 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 1 5 2 Installation of the ISaGRAF for Windows Workbench e Start Windows Insert diskette Workbench Disk 1 4 into the floppy drive usually A e Select File from the Windows Program Manager and select Run Type A UNSTALL in the command field and select OK The ISaGRAF installation will start automatically Figure 1 5 2 1 illustrates a typical opening screen Install ISaGRAF 3 00 The workbench will be installed on the following directory If you want to install the workbench on another disk or directory please change this pathname Install on C MSAWIN Figure 1 5 2 1 Typical Opening Screen March 12 1996 1996 PEP Modular Computers GmbH Page 1 19 SMART I O User s Manual Introduction r 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 Install ISaGRAF 3 00 4 Install sample applications X Install stand
37. If the flag enable is TRUE lt gt 0 then cyclic ADConversion is executed else enable FALSE and cyclic conversion is disabled The function invalidates RAW and Converted data within the data module Input UW 1nt8 PortNr Port number to enable the reading function from 0 to 10 u int8 channel Number of specified channel 0 to 3 BOOLEAN enable Flag for enabling or disabling reading of the specified channel Output error Code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCEnableRead 0 1 FALSE u March 12 1996 1996 PEP Modular Computers GmbH Page 5 51 SMART I O User s Manual Chapter 5 Analog Modules 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 lt gt 0 then conversion of raw values to degrees Celsius is executed else 1f enable FALSE no conversion takes place The function invalidates converted data 1f enable 1s set to FALSE Input u int8 PortNr Port number to enable data conversion from 0 to 10 u int8 channel Number of specified channel 0 to 3 BOOLEAN
38. March 12 1996 1996 PEP Modular Computers GmbH u Page 5 15 SMART T O User s Manual Chapter 5 Analog Modules r 5 1 8 C Programming 5 1 8 1 SM DADI Library The SM DADI library of functions smartio l provide a convenient way of accessing the SM DADI module All functions are written in ANSI C e Prototypes are to be found in the file dad lib h Hardware Requirements SMART I O Base Module or Base Module and Extension unit e SM DADI Module Software Requirements The compiler from one of the following Ultra C Version 1 1 2 or higher FasTrak 2 0 2 or higher The leftmost SM Module has number 0 assigned to it a far as programming is concerned although physically this is slot 1 Before a library function can be used the function SMDAD I Init must first be called This allocates the requested resources Furthermore this function needs to be called for each SM DADI Module called within the task Upon completion of the application the function SMDADIDelnit needs to be called for each SM DADI Module that has been initialized In order to illustrate the use of the SM DADI library an application example called demodadl c can be found in the SMART I O application directory normally found in device APPLIC SMART CMDS Page 5 16 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual Note If the same SM DAD1 Module is to be accessed from diff
39. Modular Computers GmbH Page 6 21 SMART I O User s Manual Chapter 6 Communications Modules 6 2 7 Register Description The SM SSI SMART Module connected toa 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 Description Direction Internal 16 bit Status Register Read Only Internal 24 bit Control Register Write Only nternal 8 bit Identification Register Read Only l Internal 24 bit Data Register Read Only Internal 24 bit Compare Register Write Only SPI compatible serial EEPROM Read Write Optional SPI compatible serial Digital to Analog Converter Read Write Due to the fact that SPI transmissions are full duplex some read only regis ters are accessed at the same time as write only registers in order to optimize data transmission Therefore when the Control Register 1s written to simul taneously the Status Register 1s read and similarly when writing to the Compare Register the Data Register is read 256 bytes of serial EEPROM contain the module ID number and production data although and further space has been allocated for future use 6 2 7 1 Control Register The 24 bit control register is divided into three sub registers which are cleared after a power on reset and control FDL Format Data Length e AR Automatic Reading Mode P Parity Enable Disable RST En
40. Nr Signal Description 5 Pe PotBPin5 6 Pee PotBPn6 7 Per PotBPin7 8 Pee PotBP8 9 System GND GND 10 Sera RD D from SM BASE March 12 1996 1996 PEP Modular Computers GmbH Page 3 7 SMART I O User s Manual Chapter 3 SMART EXT 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 BEER EES Screw Terminal 13 Screw Terminal 13 Screw Terminal LR Screw Terminal 4 Screw Terminal 8 Screw Terminal The PC board connections to the screw terminals are capable of absorbing a continuous current of up to 3A each However pins 13 and 14 can support up to 6 Amps WARNING Dangerous voltages may be present at the terminals 3 4 2 Parallel I O Screw Terminals SCRA and SCRB The screw terminal blocks are individually composed of 7 free connections which when stacked provide 14 free connections per I O slot The pinout functionality depends on the type of SMART Modules fitted and the relevant module should be referred to in the appropriate section of this manual Page 3 8 1996 PEP Modular Computers GmbH March 12 1996 Chapter 3 SMART EXT SMART I O User s Manual e 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 3 4 3 SPI Connector
41. O User s Manual Chapter 2 SMART BASE r 2 6 10 SMLed Syntax error code SMLed u inte Led i into value Description This function switches on off user LED s Input u int8 led 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 u int8 value Indicates the status of the LED 0 Switch LED off Not 0 Switch LED on Output Grror code SUCCESS E_BMODE LED does not exist or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMLed USERLI 0 Page 2 28 1996 PEP Modular Computers GmbH March 12 1996 Chapter 2 SMART BASE SMART I O User s Manual 2 6 11 SMwdon Syntax error code SMwdon u inEt32 Cin Description This function activates the watchdog timer of the 68302 If timeout 1s reached the system 1s reset in normal operating mode this must be avoided by periodically triggering the watchdog using the function SMwdtrig Input int32 time Time in ms The range is from 1ms to approx 13 seconds The function returns the real set time in time Output error code SUCCESS E BMODE Time is out of range or subse quent error or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMwdon time u March 12 1996 1996 PEP Modular Computers GmbH Page 2 29 SMART I O User s Manual Chapter 2 SMART BASE r 2
42. OA_LED1_ON or OA_LEDI OFF O ENABLE CONV This operate calls tells ISaGRAF to enable the conversion of a particular channel of a connected SM DADI module The syntax is as follows lt analog Var gt OPERATE iovar O ENABLE CONV 0 where analog var represents the analog return variable and can be zero if the operate call is supported and the correct iovar 1s passed or non zero if an error occurred lt iovar gt is the variable name for the channel where the operate call is to take effect u March 12 1996 1996 PEP Modular Computers GmbH Page 5 27 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 DAD1 module The syntax is as follows analog var e OPERATE lt iovar gt O DISABLE CONV 0 where analog var represents the analog return variable and can be zero if the operate call is supported and the correct iovar is passed or non zero if an error occurred lt iovar gt is the variable name for the channel where the operate call 1s to take effect Page 5 28 1996 PEP Modular Computers GmbH March 12 1996 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 a
43. SMART BASE timer I O Pack of 5 2x3 array SCR 2 7 For the SMART Modules Pack of 5 2x7 array Dummy FP For unused SMART Module slots Available in packs of 20 3V 190mAh lithium batery button BR2032 for use in the standard temperature range 0 C to 70 C 3V 850mAh lithium batery cylinder CR14250 for use in the extendedtemperature range 40 C to 85 C Battery Battery 1 3 Product Information The SMART BASE is a control module possessing an RS485 PROFIBUS and serial RS232 interface as standard and provision for up to three SMART Modules The modules currently available are discussed later Normally the base unit is mounted on a DIN rail see Weights amp Measures section which in turn may be fixed in a cabinet SMART EXT units may be attached in a similar manner Page 1 10 1996 PEP Modular Computers GmbH March 12 1996 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 posi tioned The 24V supply source should possess the following characteristics min max Continuous Peak 400mA X 1 5A 2ms Because of power limitations it should be noted that although up to 11 SMART Modules are possible in a complete configuration attention should be paid to the following tables that show the individual component power requirements The maximum of 6750mW should not be
44. This function starts the counter counting down When the counter reaches zero it rolls over to the maximum value of OXFFFFFF on the following clock pulse and starts afresh The syntax 1s as follows lt RetVar gt OPERATE lt iovar gt O_START_CNTDWN lt prevar gt where the lt iovar gt 1s a variable attached to the Timer I O typically t_in and lt prevar gt may be one of OA_PITCLOCK for selection of the 6 MHz 32 clock input or OA TIN for selection of t in inputs Page 2 36 1996 PEP Modular Computers GmbH March 12 1996 Chapter 2 SMART BASE SMART I O User s Manual 1 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 or dered If an application is stored in FLASH then it will be loaded into the system at start up 2 8 Flash Utility The main features of this utility are Erase memory Fill memory Append memory Read memory The following syntax should be observed flash b board lt parameter s gt Examples To erase the FLASH Isa flash b SMART p ff To write a file to FLASH base address is D00000 flash b SMART d d00000 i path filename To append a file to existing FLASH contents flash b SMART d d00000 u i path filename u March 12 1996 1996 PEP Modular Computers GmbH Page 2 37 SMART I O User s Manual Chapter 2 SMAR
45. VCCEXT 77 O Vcc 24V o NO1 J i PC829 i 1000 e COM ULN2002 GNDEXT B Load O Gnd 0V u March 12 1996 1996 PEP Modular Computers GmbH Page 4 37 SMART I O User s Manual Chapter 4 Digital Modules r 4 3 8 C Programming 4 3 8 1 SM REL1 Library The SM REL I library of functions smartio l provide a convenient way of accessing the SM REL1 module All functions are written in ANSI C e Prototypes are to be found in the file re 1lib h Hardware Requirements SMART I O Base Module or Base Module and Extension unit e 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 The leftmost SM Module has number 0 assigned to it a far as programming is concerned although physically this is slot 1 Before a library function can be used the function SMREL I Init must first be called This allocates the requested resources Furthermore this function needs to be called for each SM REL1 Module called within the task Upon completion of the application the function SMREL Delnit needs to be called for each SM REL1 Module that has been initialized In order to illustrate the use of the SM REL1 library an application example called demrell c can be found in the SMART I O application directory normally found in device APPLIC SMART CMDS Page 4 38 1996 PEP Modular Computers GmbH March 12 19
46. a configurable filter on the last channel used for INTx interrupts that can be mounted on the specific interrupt slots envisaged for this purpose _ 08 Jan 98 Manual ID 09901 Rev Index 0500 Page 4 53 SMART I O User s Manual Digital Modules 4 4 2 Specifications Table 4 1 Specifications 2 5 kV optoisolated towards the system Input 8 channels 80 V AC 264 V AC Common neutral lt 0 5 mA input current Input frequency range 47 63 Hz Overvoltage protection continu 350 V AC Ous lt 21 ms Switch ON delay lt 16 ms Switch OFF delay gt 20V High level lt 10V Low level Front panel Green LEDs switched on when INPUT is active O ptions User configurable RC filter on the last channel for INTx generation Power con 3 mW min 70 mW max sumption Temperature Standard 0 C to 70 C range Extended 40 C to 85 C ID Byte 02 read by the SPI interface Page 4 54 Manual ID 09901 Rev Index 0500 08 Jan 98 Digital Modules SMART I O User s Manual e 4 4 3 Front Panel Layout Figure 4 1 Front Panel Layout User Descriptor Fields _ 08 Jan 98 Manual ID 09901 Rev Index 0500 Page 4 55 SMART I O User s Manual Digital Modules 4 4 4 Board Overview Figure 4 2 Component Side LED 7 LED 0 Digital Input and LED Drivers Pin 15 Pin 2 Pin 16 Pin 2 Pin 16 Page 4 56 Manual ID 09901 Rev Index 0500 08 Jan 98 Digital Modules 08 Jan 98 SMART LO User s Manua
47. an edge transition of the comparator output as follows When counting up MATCH is set when A passes from A lt B to A gt B When counting down MATCH is set when A passes from A gt B to A lt B 6 2 9 Tested Sensors The sensors from the following manufacturers have been tested in conjunc tion with the SM SSI in an SSI environment and conform to the high stand ards set by PEP Modular Computers Hohner SSI AVM 10 10 Multi turn axial 24 bit Gray code Hengstler RAS8S Single turn 12 bit Gray code Balluff BTL 3 S11 0250 F S50 Trans sonar distance gauge 24 bit Gray code Page 6 26 1996 PEP Modular Computers GmbH October 01 1996 Chapter 6 Communications Modules SMART I O User s Manual 6 2 10 Configuration Jumper J1 EEPROM Protection EEPROM is not hardware write protected open 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 13 D WW e 6 7 7 000 CAC C2 Pin 2 Pin 14 5 COM Common 6 MATCH Match RESET jEncoderReset 8 DIR Direction 9 EORC EOR Common EOR1 End of Range 1 EOR2 End of Range 2 13 Reserved 14 Reserved u October 01 1996 19
48. and J4 exist on the board they should remain at their manufacturer settings unless a user spe cific filter 1s required that for instance cuts off at higher fre quencies If a user specific filter is required then contact please PEP Modular Computers for any further advice and refer to the diagram of the filtering components shown in figure 4 5 Manual ID 09901 Rev Index 0500 Page 4 59 Digital Modules SMART LO User s Manual Figure 4 5 SM ACI1 Configurable Filter O Vcc 330k IC10 1k INT Ay J1 Ve As HCT14 08 Jan 98 Manual ID 09901 Rev Index 0500 Page 4 60 Digital Modules SMART I O User s Manual Surface Mounted Devices SMDs are used in the production of SM ACII 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 4 3 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 For this purpose it is suggested that only the capacitor be changed Hence for a doubling of the filter frequency input the value of the capacitor should be reduced by half 4 4 7 Screw Terminal Pinouts In the following the pinout signal relationship for the SM ACII when connected to a particular screw terminal block is shown Figure 4 6 Screw T
49. effect 1f this jumper is set accordingly Processor HALT function monitor User defined function 2 5 Pinouts Figure 2 5 0 1 SMART BASE Connector Overview 3 a DOE DOC DOE DOC DO OoOoooo00 2 KR 2 N Bg Pn2 B pint Slot 1 Digital Side Process Side Pin 16 BH Pin 15 sl 68302FC20 sr4 BH in in Pin 2 Pin 14 Pin 2 Pin Pin 2 Slot 0 Slot 1 Slot 2 Pi SCR1 SCR5 SCR4 SCR3 WARNING Dangerous voltages may be present at the terminals March 12 1996 1996 PEP Modular Computers GmbH Page 2 9 SMART I O User s Manual Chapter 2 SMART BASE 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 STI ST3 and STS SMART Module location 0 ST5 pinouts Pin Nr Signal Description Pin Nr Signal
50. error code SMRELISethed u_ints PortNr u dnte Dburrer Description This function sets the status of the User LED on the port PortNr with the contents of the buffer If a bit 1s set to 0 then the LED is OFF otherwise it is ON Input u int8 PortNr SM Port number to write data u int8 buffer Pointer to buffer where data is stored 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 SMREL1SetLed 0 buffer u March 12 1996 1996 PEP Modular Computers GmbH Page 4 45 SMART I O User s Manual Chapter 4 Digital Modules 4 3 8 9 SMREL1GetExtVcc Syntax error code SMRELIGetEXtVce u_ints PortNr u inte bDbutrer 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 Input u_int8 PortNr SM Port number to get data u inte butter pointer to buffer where data is written 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 SMRELIGetExtVcc 0 buffer Page 4 46 1996 PEP Modular Computers GmbH March 12 1996 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
51. exceeded as damage to the on board DC DC converter may result due to overheating or entering a reset status due to the thermal cutoff protection switching mechanism m Power Consumption max CPU Core 1500mW 1700mW Profibus 5O0mW 750mW Maud Power Consumption being Power Consumption max SM DIN1 100mW SM ADC1 350mW 450mW SM DOUTI 270mW SM DACI 400mW SM DADi 350mW 4560mW SM DAC 350mW 660mW SM PT100 400mW 500mW SM SSI SM THERM 400mW 500mW SM RS232 u March 12 1996 1996 PEP Modular Computers GmbH Page 1 11 SMART I O User s Manual Introduction r 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 D3 D4 E F1 0 60A M In the event of a blown fuse replace it with the same size and type as the one installed Page 1 12 1996 PEP Modular Computers GmbH March 12 1996 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 s
52. for Modules 0 to 2 E NE Smeal jp Duo SET ocrew Terminal 13 ocrew Terminal 13 ocrew Terminal 1 ocrew Terminal 2 Screw Terminal3 6 Screw Terminal 4 7 Screw Terminal 8 Screw Terminal 6 o Screw Terminal 10 Screw Terminal 8 The PC board connections to the screw terminals are capable of absorbing a continuous current of up to 3A each However pins 13 and 14 can support up to 6 Amps WARNING Dangerous voltages may be present at the terminals N March 12 1996 1996 PEP Modular Computers GmbH Page2 11 SMART I O User s Manual Chapter 2 SMART BASE 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 o o oo ooo AIN 21 0107 Pin 2 Pin 14 2 5 3 Timer I O Screw Terminal SCR1 Signal Signal Description External VCC IV VCC TO Timer OUT Pin Nr External GND Giround for TIN TOUT lt 6 External GND Ground for TGATE GATE GATE Connection Page 2 12 1996 PEP Modular Computers GmbH March 12 1996 Chapter 2 SMART BASE SMART I O User s Manual To understand the functionality of the counter timer it 1s necessary to understand the purpose of TIN TOUT and TGATE Figure 2 5 3 1 shows the bl
53. 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 O POWERFAIL SET The purpose of this operate call is to detect when 1f the power to the PLC SMART I O has failed The function is normally built into the initialization stage of an application and has the following syntax RetVar OPERATE s time O POWERFAIL SET 0 When the application 1s initialized the start time is recorded in battery backed ram 1 at the given address s_time If the power to the PLC fails 2 and recovers at a later stage 3 the software makes a comparison with the actual clock time via the RTC and the time stored in this memory location If a discrepancy exists then the RetVar will record this fact Refer to the PEP online help for more information pertaining to the implementation of this operate call Voltage Time Page 2 34 1996 PEP Modular Computers GmbH March 12 1996 Chapter 2 SMART BASE SMART I O User s Manual O START COUNTER This call starts the counter it s syntax is as follows RhetVar OPERATE lt 1Ovar O START COUNTER mLlc where the lt iovar gt is typically t in O READ COUNTER With this call the contents of the counter register ma
54. 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 Logical Address The 6 outputs 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 3 1 e the third 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 Module Specific Information reset on close This variable allows ISaGRAF to set all the output relays to open when the application closes u March 12 1996 1996 PEP Modular Computers GmbH Page 4 47 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 The syntax of the operate call is as follows Syntax return variable OPERATE lt source var COMMAND source data Here the return variable is assigned a value associated with the selected COMMAND parameter Each SMART Module possesses its own set of these COMMANDS Example error code OPERAT
55. port E PRCABT If starting of the HW task failed or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCInit 0 Page 5 68 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 3 8 3 SMADCCalibrate Syntax error code SMADCCalibrate u_ints 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 Input 1nts PorcNr Port number of module to calibrate from 0 to 10 Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCCalibrate 0 u March 12 1996 1996 PEP Modular Computers GmbH Page 5 69 SMART I O User s Manual Chapter 5 Analog Modules 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 Input u int8 PortNr Port number of module for calibration from
56. product It does not cover products which have been modified altered or repaired by any other party than PEP Modular Computers or their authorized agents Furthermore any product which has been or is suspected of being damaged as a result of negligence improper use incorrect handling servicing or maintenance or which has been damaged as a result of excessive current voltage or tempera ture or which has had its serial number s any other markings or parts thereof altered defaced or removed will also be excluded from this warranty If the customer s eligibility for warranty has not been voided in case of any claim he may return the product at the earliest possible convenience to the original place of purchase together with a copy of the original document of purchase a full description of the application the product is used on and a description of the defect Pack the product in such a way as to ensure safe trans portation see our safety instructions PEP provides for repair or replacement of any part assembly or sub assembly at their own discretion or to refund the original cost of purchase if appropriate In the event of repair refunding or replacement of any part the ownership of the removed or replaced parts reverts to PEP Modular Computers and the remaining part of the original guarantee or any new guarantee to cover the repaired or replaced items will be transferred to cover the new or repaired items Any extensions to t
57. requested resources Furthermore this function needs to be called for each SM PT100 module called within the task Upon completion of the application the function SMADCDeinit needs to be called for each SM PT100 module that has been initialized In order to illustrate the use of the SM PT100 library an application example called demoadc c can be found in the SMART I O application directory normally found in device APPLIC SMART CMDS March 12 1996 1996 PEP Modular Computers GmbH Page 5 35 SMART I O User s Manual Chapter 5 Analog Modules r To compile the source execute the following commands at the shell prompt gt chd lt dev gt APPLIC SMART gt make all To execute the example load lt dev gt BSP SMART SMADC adc task load HW task load lt dev gt 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 SM PT100 and SM THERM modules Initialization To start the HW Task the OS 9 module adc_task must be loaded then the function MADCInit must be called To read data from a channel the type of sensor attached to it must be known The PEP header file BSP SMART SMADC DEFS smadc h contains a list of sensors that are supported To set the sensor type the function SMADCSetSensorType needs to be called Read RAW Data To force the HW task to read RAW da
58. 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 Input u_int8 PortNr Port number to fetch the gain setting from 0 to 10 u_int8 channel Number of specified channel 0 to 3 u int8 pBuffer Pointer to an user defined buffer Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCGetGain 0 1 amp Buffer u March 12 1996 1996 PEP Modular Computers GmbH Page 5 79 SMART I O User s Manual Chapter 5 Analog Modules 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 If the flag enable is TRUE lt gt 0 then cyclic ADConversion is executed else enable FALSE and cyclic conversion is disabled The function invalidates RAW and Converted data within the data module Input u int8 PortNr Port number to enable the reading function from 0 to
59. systems supporting FLASH memory for this task or to the RAM disk etc Page 2 6 1996 PEP Modular Computers GmbH March 12 1996 Chapter 2 SMART BASE SMART I O User s Manual 1 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 commu nication between the base unit and SMART Modules attached either directly Or on extension units Up to three SMART Modules are supported on the SMART BASE unit with connection to the outside world being provided by industrial standard screw terminals The same calibre of terminal 1s used for the counter timer which is directly coupled to the system I O controller A more detailed description of the counter timer appears in the pinout section of this chapter Figure 2 3 0 2 shows the interrupt handling capability of the I O controller It should be noted that the controller can only be programmed with the use of a PEP defined software protocol that ensures compatibility in case of hardware changes Figure 2 3 0 2 IRQ Capabilities LA Se eel Programmable March 12 1996 1996 PEP Modular Computers GmbH Page 2 7 SMART I O User s Manual Chapter 2 SMART BASE r 2 4
60. the SM DINI library an application example called demodin1 c can be found in the SMART I O application directory normally found in A device APPLIC SMART CMDS Page 4 12 1996 PEP Modular Computers GmbH March 12 1996 Chapter 4 Digital Modules SMART I O User s Manual 4 1 8 2 SMDIN1 Init Syntax error code SMDINlInit u int8 PortNr Description This function initialises the SM DINI Module on port PortNr by allocating space in memory for resources and resetting all inputs Input u int8 PortNr SM Port number to initialise from 0 to 10 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 SMDINIInit 0 u March 12 1996 1996 PEP Modular Computers GmbH Page 4 13 SMART I O User s Manual Chapter 4 Digital Modules 4 1 8 3 SMDIN1DelInit Syntax error code SMDINIDeInit u_int8 PortNr Description This function de initialises the SM DINI Module on port PortNr by releas ing all resources assigned to it thereby freeing memory for other uses Input u int8 PortNr SM Port number to de initialise Output error code SUCCESS or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMDIN1DeInit 0 Page 4 14 1996 PEP Modular Computers GmbH March 12 1996 Chapter 4 Digital Modules SMART I O User s Manual 4 1 8 4 SMDIN1Get Synta
61. twin output 12 bit DAC with external on board 10 0V reference and an operational amplifier for unipolar bipolar outputs 5 1 5 2 Output Circuitry Figure 5 1 5 2 SM DAD1 Output Schematic Diagram Load System Output Interface Amplifier 10V 10V 0 10V Uni Bipolar Switch J4 J5 The DAC is a complete dual 12 bit multiplying DAC without the need for external trimming Bipolar unipolar mode is selected via jumpers J4 and J5 which allow both output channels to be configured separately It should be noted that in bipolar mode the power up condition is not glitch free Therefore it is suggested that the connected load be switched a short time later to provide enough time for the DAC to initialize u March 12 1996 1996 PEP Modular Computers GmbH Page 5 11 SMART I O User s Manual Chapter 5 Analog Modules 5 1 6 Configuration The SM DADI 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 Settings Description pa pst EEPROM is not hardware write protected open EEPROM is hardware write protected Jumper J4 and J5 DAC Output Jumper Settings Description Edi S VOUTO epee 40V 10V 1 A set VOUT1 bipolar 10V 10V Note If altering the mode unipolar bipolar of the DAC output be sure that software is aware of the change Page 5 12 1996 PEP Modular Computers GmbH
62. 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 Input u int8 PortNr Port number to set precision from 0 to 10 u int8 channel Number of specified channel 0 to 3 u int8 precision Resolution of ADC filter value Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified E BMODE Illegal precision value must be within 19 to 2000 or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCSetPrecision 0 1 0x100 Page 5 44 1996 PEP Modular Computers GmbH March 12 1996 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 intl16 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 Input u int8 PortNr Port number from which to get data from 0 to 10 u int8 channel Number of speci
63. 0 to 10 u intl16 secs Time in seconds between two calibration cycles Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCSetCyclicCalib 0 120 Page 5 70 1996 PEP Modular Computers GmbH March 12 1996 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 intl16 sensorCode Description This function checks if an SM THERM board is fitted on the specified port if the channel is valid if the sensorCode 1s known and sets the gain preci sion and mode to their default values for the type of sensor connected Input Ants PortNt Port number om module to set from 0 to 10 u int8 channel Number of specified channel 0 to 3 u intl16 sensorCode Code of the sensor a list of PEP defined sensor types can be found in the file linear h Output error Code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified E pryP If sensor type is not known or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCSetSensorType 0 1 B_TYPE u March 12 1996 1996 PEP Modular Computers GmbH Page 5 71 SMART I O User s Manual Chapter 5 Analog Modules 5
64. 10 Output error code SUCCRSS E SEEK if module not initialised or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMDAC1DeInit 0 Page 5 122 1996 PEP Modular Computers GmbH October 01 1996 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 DACI 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 Remember this logical address is the same as the physical slot position In the example shown here the board being addressed is in slot 3 1 e the third 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 Logical Address u October 01 1996 1996 PEP Modular Computers GmbH Page 5 123 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 The syntax of the oper
65. 2 7 S MS5SIGEUDAS geegent 6 35 6 2 13 ISaGRAF Programming eeeeseeseeeeeeeeeeeeennene nnns 6 36 6 2 13 1 The ISaGRAF Board Parameters eeeeeeeee 6 36 March 12 1996 1996 PEP Modular Computers GmbH Page 6 3 SMART I O User s Manual Chapter 6 Communications Modules r This page has been left blank intentionally Page 6 4 1996 PEP Modular Computers GmbH March 12 1996 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 baud rates up to 120 kbaud but the delivered software only allows rates up to 19200 baud Communication tasks are handled directly by the SCC3 port of the 68302 chip on the SMART BASE hence this module can only be used in the first slot of the SMART BASE as this is the only slot where the CPU port lines can be used serially Two LEDs showing data transmission provide the user interface 6 1 2 Specifications Input Transceiver RxD and CTS Up to 19200 Baud Transceiver TxD and DIR 1 Lad Up to 19200 Baud EEPROM 256 Byte Serial EEPROM Green RxD LED SE Yellow TxD LED Power Consumption 23mW min 7omW max Module Weight ID Byte 80 Read by the SPI Interface CTS DTR lines are NOT sup
66. 4 4 6 Configuration eese 4 59 4 4 7 Screw Terminal Pinouts 4 61 4 4 8 C Programming eeseseseeeee 4 64 4 4 9 SaGraf Programming sss 4 68 08 Jan 98 Manual ID 09901 Rev Index 0500 Page 4 3 This page was intentionally left blank Chapter 4 Digital Modules SMART I O User s Manual 4 Digital Modules 4 1 SM DINI 4 1 1 Introduction The SM DINI provides 8 optoisolated 24V DC digital inputs arranged in 6 independent groups with respect to the ground connections The maximum input switching frequency 1s 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 A low pass filter restricts signals exceeding the filter limit and registers a logical 0 with the system The user interface is realized by 8 green LEDs one per input channel which illuminate when the input exceeds 10V DC and a configurable filter on the last channel for INTx interrupts where x lies between 1 and 4 depending on which slot the module is located 4 1 2 Specifications 2 5 kV optoisolated from the system Input 8 Digital Channels 24V DC 10 6 Independent Groups Common GND lt 5mA Input Current Filter set to 200 Hz 5ms Overvoltage Protection rate Overvoltage Protection continuous ee S Switch ON Delay 2ms approx Switch OFF Delay e AE High Level 2ms
67. 6 Communications Modules SMART I O User s Manual 6 2 12 7 SMSSIGetData Syntax error code SMSSIGetData u int8 PortNr u xnrts2 pDara Description This function returns the absolute position data from the SM SSI If auto matic mode 1s selected then a wait will not be performed otherwise SOT will be set and the read performed only when TC has been set Input u int8 PortNr SM Port number to get data H int 2 pData Pointer to the value returned from the data register 0x0 gt FFFFFF 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 SMSSIGetData 0 amp pData u October 01 1996 1996 PEP Modular Computers GmbH Page 6 35 SMART I O User s Manual Chapter 6 Communications Modules r 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 1 Function block of the SM SSI Module command sm ssi setpoint eem pot eem X memor ctregl eem position ctleg eem status I ptuiredd status Command One of FB SSI INIT This 1s the command that must be executed to initialize the module before operating the SSI interface normally at the beginning of an ISaGRAF program cycle Also pri
68. 6 PEP Modular Computers GmbH Pagel 1 SMART I O User s Manual Introduction r This page has been left blank intentionally Page 1 2 1996 PEP Modular Computers GmbH March 12 1996 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 In most cases controllers are situated in close vicinity to electromechanical devices like relays transformers motor controllers and high frequency switches etc In such situations a variety of disturbance sources are present and effect the performance characteristics of the controller However by observing the following precautions many of the bad effects can be mini mized Earth protect the controller fixing Use screened shielded cable connections Place cables according to relevant standards Observe the use of the correct cable diameter and type For unused module sockets install a blank front panel Leave enough room between a hot body and the controller for air to circulate freely Place the controller as far away as possible from noisy components e Separate digital and analog cabling Only replace insert modul
69. 6 SMADCGetSensorType E 5 43 5 2 8 7 SMADCSetPrecision EEN 5 44 SEENEN 5 45 5 2 8 9 SMADCSetMode io sccscsdcstcccccdusitnnndendadiwasesadacndanebacetidedeneecdaeesieies 5 46 5 2 8 10 SMAD QGCGietMOdge ieeii ennt ioo hrrshestasenetenannssreteceeeseies 5 47 5 2 0 LL SMA DOS Iur RT 5 48 D OR SMADC tC IIN ad a de a nc 5 49 5 2 8 13 SMADCGetGain nn dede ia 5 50 5 2 8 14 SMADCEnableRead E 5 5 5 2 8 15 SMADCEnableConversion eese 5 52 5 2 8 16 SM AIDC ege Ee 5 53 5 2 8 17 SMADCReadConverted essen 5 54 328 SMADC De MET 5 55 5 2 9 ISaGRAF Programming cccccccccccccceccccceccccceeeeeeseseseseseessscssseaeeaeees 5 56 5 2 9 1 The ISaGRAF Board Parameters ccccccccsccccceceeeeeeceeeeees 5 56 5 2 9 2 The ISaGRAF Operate Calls eeesesseeeeen 5 57 MIN a ete ee eee 5 59 OC EE 5 59 3 9 2 Te Te E 5 59 93 5 Front Panel OUR En 5 60 5 3 4 Board E TE 5 60 3 3 9 Puncti onal DESCTIDHON soesscesiis ssai ann EE 5 61 3 3 0 Configuration eege Ee 5 62 s MIDI ME TN TU n 5 62 35 2 0 C Propran ing aiio dodi Stop EI SERERE PEERS IA rest eaa aaa aiara 5 64 So T Vie dR IVI IDEAE EE 5 64 330 2 VAC AE E 5 68 sop ME IOS e E EE 5 69 3 3RA SMADCSertCvchecCaib 5 70 March 12 1996 1996 PEP Modular Computers GmbH Page 5 3 SMART I O User s Manual Chapter 5 Analog Modules r 5 3 8 5 SMADCSetSensorType ss 5 71 5 3 8 6 SMADCGetSensorTyp
70. 66 Input u int8 PortNr SM Port number to initialize Output error cod e 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 SMACI1Delnit Syntax error code SMACI1DeInit u_int8 PortNr Description This function de initializes the SM ACII Module on port PortNr by releasing all resources assigned to it thereby freeing memory for other uses Input u int8 PortNr SM Port number to de initialize Output error code SUCCESS or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Manual ID 09901 Rev Index 0500 08 Jan 98 Digital Modules SMART I O User s Manual 08 Jan 98 e Example RetVal SMACIIDeInit 0 4 4 8 4 SMACH Get Syntax error code SMACIIGet u_int8 PortNr u int8 DUE Ler 3 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 O 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 1s to be stored Output error code SUCCESS or OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMACI1Get 0 buffer _ Manual ID 09901 Rev Index 0500 Page 4 67 SMART I O User s Manual Digital Modules
71. 96 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 SMREL 1 Init Syntax error code SMRELlInit u 1nt9 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 Input u int8 PortNr SM Port to initialize from 0 to 10 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 SMRELIInit 0 u March 12 1996 1996 PEP Modular Computers GmbH Page 4 39 SMART I O User s Manual Chapter 4 Digital Modules 4 3 8 3 SMREL1DelInit Syntax error code SMRELIDeInit u_int8 PortNr Description This function deinitializes the SM RELI 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 Input Mints POrCNE SM Port number to de initialize from 0 to 10 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 SMREL1DeInit 0 Page 4 40 1996 PEP Modular Computers GmbH March 12 1996 Chapter
72. 96 PEP Modular Computers GmbH Page 6 27 SMART I O User s Manual Chapter 6 Communications Modules Connection OSS 0 4Ncc 24V gt gt A I t Lu Oo a dl ve l a 2 ol Je x e S E z x uc o O ojl OO alol S a a w wy wi Pin 13 Pin 1 Pin 2 Pin 14 O Gnd 0V Input Circuit Encoder Schmitt Parallel Serial Input Wheel Trigger Converter Monoflop Switch Driver Photo Photo Parallel Transmitter Receiver Data Page 6 28 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 e Prototypes are to be found in the file ssilib h Hardware Requirements SMART I O Base Module or Base Module and Extension unit e SM SSII Module Software Requirements The compiler from one of the following Ultra C Version 1 1 2 or higher FasTrak 2 02 or higher The leftmost SM Module has number 0 assigned to it a far as programming is concerned although physically this 1s slot 1 Before a library function can be used the function SMSSIInit must first be call
73. 996 PEP Modular Computers GmbH March 12 1996 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 measure ment 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 1 0 kV Optoisolated from the system 4 Thermocouple groups 1 PT100 for Cold Junction 2 wire Open Sensor Detection Self Calibration Overvoltage Protection 25V power connected 85V power disconnected Temperature Range Refer to table below Temperature Drift 1 LSB C not compensated Conversion Time typ 125 ms max 500 ms depends on filter settings Input Impedance 10 MQ min Resolution 16 bit Absolute Accuracy 0 2 C sensor errors excluded Linearization by software EEPROM 256 bit serial EEPROM for Calibration Data 2 Red EDs 350mW min 450mW max Standard 0 C to 70 C Extended 40 C to 85 C 40g 61 read by the SPI Interface Temperaturg Temperature Temperaturd Temperature R c vec T 2700 4C B oc 3c Kk vc not CC u March 12 1996 1996 PEP Modular Computers GmbH Page 5 59 SMART I O User s Manua
74. ANSI C programming under real time OS All this power is provided with excellent price performance characteristics Page 1 8 1996 PEP Modular Computers GmbH March 12 1996 Introduction SMART I O User s Manual 1 2 Ordering Information Micro PLC amp real time computer 1 MByte EPROM 512 kByte DRAM 64kByte SRAM OS 9 v3 0 ISaGRAF v3 0x PROFIBUS v3 12 Layer 2 amp 7 RTC full modem RS232 8 pin RJ45 connector 190 mAh battery housing and terminal block for the 24V DC power supply As product 13843 but with additional 1 MByte Flash memory TSOP on solder side Expansion module for the SMART BASE supporting 2 SMART Modules Delivered without terminal blocks SMART Modules or blank panels SMART Module with 8 optoisolated 24V DC digital inputs SMART Module with 8 optoisolated 24V DC 500mA digital outputs SMART Module with 4 channel A D 10V 2 channel D A 10V 0 10V SMART Module with 4 optoisolated 2 3 or 4 wire PT100 inputs SMART Module with 4 optoisolated thermocouple inputs SMART Module with 6 optoisolated normally open relay outputs SMART Module with RS232 Rx amp Tx interface SMART Module with 1 SSI channel providing a 24V DC digital input and a 24V DC 500mA digital output SMART Module with 6 12 bit 10V optoisolated analog inputs SMART Module with 6 12 bit 0 20mA optoisolated analog inputs SMART Module with 2 12 bit 10V optoisolated analog outputs SMART Module with 2 12 bit 0 20mA optoisolated analog outpu
75. C 0 20mA 12 bit DAC with 1 bit non linearity Output 11 bit Repeating Accuracy Glitch Free Power On Reset 2mA max output current voltage version 75us Conversion Time 1MHz SCLK 2 Red LEDs User Configurable 660mW max voltage version 400mW max current version Standard 0 C to 70 C Ext Storage 40 C to 85 C Module Weight 700 ID Byte 40 read by the SPI Interface The conversion time applies per channel for a full scale voltage swing of 10V 10V October 01 1996 1996 PEP Modular Computers GmbH Page 5 107 SMART I O User s Manual 5 5 3 Front Panel Layout Bae LEOS User Descriptor 1e10s 5 5 4 Board Overview Component Side LED 1 LEDO TD o e o am D Gi o Page 5 108 1996 PEP Modular Computers GmbH Chapter 5 Analog Modules October 01 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 5 5 Functional Description The SM DACI has 2 4 or 6 differential voltage or current outputs depending on the ordered type An on board EEPROM contains board specific calibra tion data module ID byte sub ID byte and production data A DC DC converter generates the SV to 15V power requirements for the D A con verter and provides additional system isolation 5 5 5 1 Output Circuitry The output stage of the SM DACI comprises a fast D A converter followed by a software controlled switch that ensures the on board op amp remains inactive and produces
76. Codes Section Example RetVal SMTstasto TMR STRTI u March 12 1996 1996 PEP Modular Computers GmbH Page 2 23 SMART I O User s Manual Chapter 2 SMART BASE 2 6 6 SMTrd Syntax error code SMIrd _int32 values Description This function reads the actual timer count value NOTE A stable read value can only be achieved if the timer is not running There fore a read request to the running timer terminates with E_DEVBSY Input int32 value Pointer to a variable in which to place the read value Output error code SUCCESS E DEVBSY Timer is currently running or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMTrd buffer Page 2 24 1996 PEP Modular Computers GmbH March 12 1996 Chapter 2 SMART BASE SMART I O User s Manual 2 6 7 SMTtin Syntax error code SMItin u_ante value Description This function reads the current level present on TIN PC2 Input u ints value Pointer to a variable in which to place the read value 0 represents low 1 represents high Output error Code SUCCESS or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMTin buffer u March 12 1996 1996 PEP Modular Computers GmbH Page 2 25 SMART I O User s Manual Chapter 2 SMART BASE 2 6 8 SMTstat Syntax error code SMTstat u int8 value Description This function reads the timer status r
77. Configuration The SMART BASE has 2 configurable jumpers which are explained in the following sections The jumper settings marked in italics 1n the tables are default Figure 2 4 0 1 SMART BASE Jumper Layout Front View RS485 Isolated PROFIBUS SPI STS au J13 ST3 mug Ji ab 4 N Wa 88889 5 N Status Piggyback SMPBLED 00000000 No 4 O DEER Ooo00000 SMART Modules Eoi Battery Piggyback IO Slot 0 IO Slot 1 IO Slot 2 SMPBBAT eee le ee e e le ee e e Timer VIP IP 222229 w eeecoe D eeeeeee eeeee eeeee 0000 00 DADO LISCI SCR2 BU1 SCRI SCR5 SCR4 SCR3 2 4 1 Jumper J1 Boot Selection Pin Connector The jumper J1 selects whether the SMART I O boots directly from OS 9 or from ISaGRAF Jumper J Description Application Boot ISaGRAF OS 9 Shell Boot Page2 8 1996 PEP Modular Computers GmbH March 12 1996 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 1s supported in software will only take
78. E lt channel gt E INIT CODE 0 O INIT CODE is one of a number of distinct commands recognized by the PEP Modular Computers implementation of board drivers and checks for example that the board is located where the program expects it to be channel provides channel specific information and in the example shown here any of the 8 input channels may be used The last parameter 1s 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 other wise it returns a non zero value depending on the error encountered A list of these error codes may be found in the PEP online help Page 4 48 1996 PEP Modular Computers GmbH March 12 1996 Digital Modules SMART I O User s Manual 08 Jan 98 A complete list of the operate COMMANDS may be obtained by selecting a project from the ISaGRAF projects group open ing an application and observing the Common defines in the Dic tionary 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 O SET LED This operate call allows the user to control the yellow LED on the board s front panel The syntax is as follows analog var OPERATE iovar O SET LED lt var gt where lt analog var gt represents the analog return variable and can be zero if the operate call
79. EEK 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 Example RetVal SMDAD1SetLed 0 2 u March 12 1996 1996 PEP Modular Computers GmbH Page 5 23 SMART I O User s Manual Chapter 5 Analog Modules 5 1 8 9 SMDADICIrLed Syntax error code SMDAD1ClrLed u int8 PortNr u int8 LedNr Description This function switches off one of the two LEDs fitted to the SM DADI Input u int8 PortNr SM Port number to be accessed u int8 LedNr Number of the LED to switch off 1 2 Output error code 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 Example RetVal SMDADICIrLedi 0 2 Page 5 24 1996 PEP Modular Computers GmbH March 12 1996 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 2 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 Remember this logical address is the same as the physical slot position In the exam
80. 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 1 Specifications Controller MC68HC705C8A Frequency 4 MHz Firmware PEP Firmware for OTP device Interface Speed Set to 1 MHz Power Consumption Typ 25 mW Temperature Range Storage 20 C to 125 C Standard 0 C to 70 C Extended 40 C to 85 C Operating Humidity 0 to 95 non condensing Weight 260g without modules blank panels or screw terminals The SPI follows a Motorola defined communication protocol which 1s beyond the scope of this manual to describe More information may be found by referring to the relevant data sheets March 12 1996 1996 PEP Modular Computers GmbH Page 3 3 SMART I O User s Manual Chapter 3 SMART EXT 3 2 Board Overview SPI 3 1 From SMART BASE To further SMART EXT or other SMART EXT MCU Modules Modules 68HC05C4 lt lt ST4 Q MART Modules I O Slot A I O Slot B o o o o o Vm e 0 0 0 ISOS SCRA SCRB
81. 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 pro grammed to be The syntax of the operate call is as follows Syntax return variable OPERATE lt source var COMMAND source data Here the return variable is assigned a value associated with the selected COMMAND parameter Each SMART Module possesses its own set of these COMMANDS Example error code OPERATE lt channel gt O INIT CODE 0 O INIT CODE is one of a number of distinct commands recognized by the PEP Modular Computers implementation of board drivers and checks for example that the board 1s located where the program expects it to be 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 1f no error was detected other wise it returns a non zero value depending on the error encountered A list of these error codes may be found in the PEP online help Page 5 102 1996 PEP Modular Computers GmbH October 01 1996 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 g
82. Init 0 Page 4 26 1996 PEP Modular Computers GmbH March 12 1996 Chapter 4 Digital Modules SMART I O User s Manual 4 2 8 4 SMDOUT1Get Syntax error code SMDOUTIGet u int9 PortNr u int88 butfrer 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 int PortNr SM Port number to fetch data u_int8 buffet Pointer to a buffer where data is to be stored Output error code SUCCESS or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMDOUTIGet 0 buffer Buffer Explanation Bit Value 0 Output is ON Output is OFF u March 12 1996 1996 PEP Modular Computers GmbH Page 4 27 SMART I O User s Manual Chapter 4 Digital Modules 4 2 8 5 SMDOUTISet Syntax error code SMDOUTISer u inta PortNr u intg butfer 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 Input u int8 PortNr SM Port number to fetch data u int8 buffer Pointer to buffer where the data is to be written Output error code SUCCESS or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMDOU
83. MADCSetCyclicCalib 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 Input u int8 PortNr Port number of module for calibration from 0 to 10 u intl6 secs Time in seconds between two calibration cycles Output error Code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCSetCyclicCalib 0 120 u March 12 1996 1996 PEP Modular Computers GmbH Page 5 41 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 intl16 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 Input u int8 PortNr Port number om module to set from 0 to 10 u int8 channel Number of specified channel 0 to 3 u intl16 sensorCode Code of the sensor a list of PEP defined sensor types can be found in the file linear h Output Grror code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified E BTYP If
84. March 12 1996 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 DADI when connected to a particular screw terminal block Pin 1 Pin 13 F 27220 0 0 CA CON AO Pin 2 Pin 14 C C NSN u March 12 1996 1996 PEP Modular Computers GmbH Page 5 13 SMART I O User s Manual Chapter 5 Analog Modules Connection Analog Sensors INOP IN2P INON IN2N IN1P IN3P IN1N IN3N Pin 1 Pin 13 Pin 2 r 77 Pin 14 AGND AGND VOUTO VOUT1 AGND AGND Analog Actuators Gnd OV A D Circuit Page 5 14 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual D A Circuit 15V 415V i 20k 20k a d x oO J4 15V 0 15V 0 20 k H 15V REF MAX876 o lt VOUTO S AGND S 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
85. OV at it s output during power up The current version has an additional MOSFET after this op amp Figure 5 5 5 1 SM DAC1 Output Shematic Diagram System Software Interface Controlled Operational Switch Amplifier T AGND The current version of this module utilizes current sensing that detects open loads or broken lines The individual comparators of this sensing circuit alarm the software when currents below 4mA are detected u October 01 1996 1996 PEP Modular Computers GmbH Page 5 109 SMART I O User s Manual Chapter 5 Analog Modules r 5 5 6 Configuration Although the SM DACI 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 DACI when connected to a particular screw terminal block Pin 1 Pin 13 e o oo ooo TAN D ed rcie Ze Pin 2 Pin 14 Analog GND AGND Analog GND AGND Analog GND AGND Analog GND AGND Analog GND Pin Nr a 7 AGND Analog GND 8 9 OUT2 Analog Output Ch 2 Analog Output Ch 5 Page 5 110 1996 PEP Modular Computers GmbH October 01 1996 Chapter 5 Analog Modules SMART I O User s Manual Connection e O Vcc 24V Analog Sensors
86. PEP Modular Computers GmbH March 12 1996 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 The syntax of the operate call is as follows Syntax return variable OPERATE lt source var COMMAND source data Here the return variable is assigned a value associated with the selected COMMAND parameter Each SMART Module possesses its own set of these COMMANDS Example lt error code gt OPERATE lt channel gt INIT CODE 0 O INIT CODE is one of a number of distinct commands recognized by the PEP Modular Computers implementation of board drivers and checks for example that the board is located where the program expects it to be 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 other wise it returns a non zero value depending on the error encountered A list of these error codes may be found in the PEP online help u March 12 1996 1996 PEP Modular Computers GmbH Page 4 17 SMART I O User s Manual Chapter 4 Digital Mod
87. ReadRaw 0 1 amp Buffer u March 12 1996 1996 PEP Modular Computers GmbH Page 5 53 SMART I O User s Manual Chapter 5 Analog Modules 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 1s large enough to store the data Input u int8 PortNr Port number from which the input is read from 0 to 10 u int8 channel Number of the channel to be read 0 to 3 double pBuffer Pointer to a user defined buffer Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified E NOTRDY If no data is available at the moment or the sensor 1s defect or values are returned that cannot be converted wait or poll the input or check sensor or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCReadConverted 0 1 amp Buffer Page 5 54 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 2 8 18 SMADCDeinit Syntax error code SMADCDeinit u intS8 PortNr Description This function frees the resources attached to this module 1f it was initialised Input u nt8 PortNr Number of the port to de
88. SetRIy Syntax error code SMRELISetRly u_int8 PortNr u dnte burrer 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 Input u int8 PortNr SM Port number to set data u int8 buffer Pointer to buffer where data 1s stored Output Grror eode SUCCESS E BMODE if the module 1s unknown or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMRELISetRIy 0 buffer u March 12 1996 1996 PEP Modular Computers GmbH Page 4 43 SMART I O User s Manual Chapter 4 Digital Modules 4 3 8 7 SMREL1GetLed Syntax error code SMREL1IGetLed u_int8 PortNr into ourter 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 Input u_int8 PortNr SM Port number to get data u_int8 buffer Pointer to buffer where data is written Output error code SUCCESS E BMODE if the module 1s unknown or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMREL1IGetLed 0 buffer Page 4 44 1996 PEP Modular Computers GmbH March 12 1996 Chapter 4 Digital Modules SMART I O User s Manual 4 3 8 8 SMREL1SetLed Syntax
89. T BASE Example to download ISA11 module and store in FLASH Start the isa terminal in MS Windows Press the lt ENTER gt key three times to display the following screen prompt ISa Start kermit on the target system Isa kermit ri lt ENTER gt 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 1d dd APL flash Start kermit on the target system again Isa kermit ri lt ENTER gt Select the menu item transfers send binary file from the windows terminal and select the file isa11 on the PC to transfer Append the file to the existing flash contents flash b SMART d d00000 u i dd APL isall Page 2 38 1996 PEP Modular Computers GmbH March 12 1996 Chapter 3 SMART EXT SMART I O User s Manual e Table Of Contents 3 SMART EXT wooo ecc cece ecceeenees 3 3 EN Hs DECO ae ee et E T 3 3 2 2 Board EE 3 4 3 3 Functional Description 3 5 IAP te EE 3 6 3 4 1 SMART Module Piggyback Connectors M 3 7 3 4 2 Parallel I O Screw Terminals SCRA and SCRB 3 8 3 4 3 SPI Connectors ST5 and BUI 3 9 March 12 1996 1996 PEP Modular Computers GmbH Page 3 SMART I O User s Manual Chapter 3 SMART EXT r 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 E The SMART
90. T1Set 0 buffer Buffer Explanation D7 DO Bit Value 0 Output is ON 1 Output is OFF Page 4 28 1996 PEP Modular Computers GmbH March 12 1996 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 logical address 1 reset on close true Logical Address The 8 outputs 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 1 1 e the first 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 Module Specific Information reset on close This variable allows ISaGRAF to return the status of all the output channels to zero 0V when the appli cation is closed u March 12 1996 1996 PEP Modular Computers GmbH Page 4 29 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 t
91. Value 16 bit HEX unipolar Bipolar Positive Full Scale Positive Full Scale 1LSB 0 0000 0 0000 u October 01 1996 1996 PEP Modular Computers GmbH Page 5 97 SMART I O User s Manual Chapter 5 Analog Modules 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 ADCI Input int88 PortNr SM Port number to be accessed u_int8 LedNr Number of the LED to switch on 1 2 Output error code 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 Example RetVal SMADCISetLedi 0 2 Page 5 98 1996 PEP Modular Computers GmbH October 01 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 4 8 6 SMADCICIrLed Syntax error code SMADCIClrled u_ints PortNr u 1ntS LedNr Description This function switches off one of the two LEDs fitted to the SM ADCI Input into PortNr SM Port number to be accessed u_int8 LedNr Number of the LED to switch off 1 2 Output error Code 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 Example RetVal SMADC1ClrLed 0 2 u October 01 1996 1996 PEP Modular Computers GmbH Page 5 99 SMART I O User s Manual Chapter 5 Analog M
92. Vcc common Digital Output Load 2 5 4 Supply Screw Terminals SCR2 Pin 1 Pin 3 Page 2 14 1996 PEP Modular Computers GmbH March 12 1996 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 Signal Data Set Ready Pin Nr Ready to Send System GND Transmit Line Receive Line a EN Data Carrier Detect Clear to Send 8 Data Terminal Ready 2 5 6 RS485 D Sub Connector BU2 for Half Duplex Operation Profibus Pin Nr Signal Description Pin Nr Signal Description 1 SHIELD Shield Isolation TG A 5V Auxiliary 5V 3 URxD Transmit ReceiveLine 8 PD Transmit Receive Line 4 ONTR amp Control Line 9 CNTR Control Line optional for full duplex operation u March 12 1996 1996 PEP Modular Computers GmbH Page 2 15 SMART I O User s Manual Chapter 2 SMART BASE r The full duplex description may be found in the SMART I O Advanced User Guide Note There 1s no internal line termination as laid down in DIN 19245 Part 1 and must be performed externally Aux 5V 90mA The line termination is achieved as shown in the figure Assuming a power supply vo
93. a starts the task accessing the Hardware HW task prepares parameters depending on the used SM PT100 module Input u int8 PortNr Port number of module to initialize from 0 to 10 Output Grror Code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PRCABT If starting of the HW task failed or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCInit 0 u March 12 1996 1996 PEP Modular Computers GmbH Page 5 39 SMART I O User s Manual Chapter 5 Analog Modules 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 Input u int8 PortNr Port number of module to calibrate from 0 to 10 Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCCalibrate 0 Page 5 40 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 2 8 4 S
94. a description of the register please refer to the relevant section appearing earlier u 1996 PEP Modular Computers GmbH Page 6 37 SMART I O User s Manual Chapter 6 Communications Modules r This page has been left blank intentionally Page 6 38 1996 PEP Modular Computers GmbH October 01 1996
95. al ID 09901 Rev Index 0500 08 Jan 98 SMART LO User s Manual Preface do ORERE T eea E 4 33 OMA EE 4 51 Chapter 5 Analog Modules eee 5 7 Del ONMEDA nette seen 5 7 5 2 SM PT100 eege 5 29 5 3 SM THERM eene nnne 5 59 54 SGMADC NEE 5 89 55 SM DACT Lassen estas se eee een 5 107 Chapter 6 Communications Modules 6 5 6 1 SM 6 5 62 SMS 6 17 08 Jan 98 Manual ID 09901 Rev Index 0500 Page 0 11 This page was intentionally left blank Introduction SMART I O User s Manual e Table of Contents General Information 1 3 MODS EE 1 4 1 1 Product Overview nus 1 8 1 2 Ordering Information 1 9 1 3 Product Information 2 0 0 eee ceeeccsecccescccescceeecensecensecees 1 10 1 4 Installation EEN 1 13 BRE o NR T 1 13 1 4 2 SMART I O Module Installatnon eee 1 15 1 4 3 RJ45 Telephone Connector Installation essesssess 1 16 1 4 4 Screw Terminal Block Installation een 1 16 1 4 5 Battery Installation esssessseeeeeeeeeeeeeee nnns 1 17 1 5 ISaGRA F Installation eene 1 18 eh Brell geess 1 18 1 5 2 Installation of the ISaGRAF for Windows Workbench 1 19 1 5 3 Installation of PEP Library Functions ccccccceeeeeesseesseeeeeeeees 1 21 1 5 4 Demo Application essen eene nnnn nnns 1 26 March 12 1996 199
96. anual Error Codes Section Example RetVal SMTpre 0 u March 12 1996 1996 PEP Modular Computers GmbH Page 2 21 SMART I O User s Manual Chapter 2 SMART BASE Example for a Square Wave Generator The Timer Control Register 7 6 5 4 3 2 1 0 TOUT TIAC Z D Clock Timer Control Control Control Enable 0 1 X 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 When the 24 bit counter passes from 000001 to 000000 the ZDS status bit is set and the TOUT is toggled At the next clock to the 24 bit counter it 1s again loaded with the contents of the CPRs and thereafter decrements Page 2 22 1996 PEP Modular Computers GmbH March 12 1996 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 Two modes are available They are IMR SIRI Start timer TMR_STOP Stop timer Output error Code SUCCESS E BMODE Unsupported mode or standard OS 9 error code refer to the OS 9 Technical Manual Error
97. ard libraries J Install help files Figure 1 5 2 2 Installation Selection The default 1s for a complete installation 1 e all files Once confirmed the installation copies the required files to the installation directory and unpacks their contents This procedure will take a few minutes Upon completion the windows desktop will show a new program group containing the files shown in figure 1 5 2 3 Page 1 20 1996 PEP Modular Computers GmbH March 12 1996 Introduction SMART I O User s Manual Program Manager ME File Options Window Help e 3 Projects Diagnosis Libraries Archive 4 gt Ib sia amp ike GI sia amp Ile sib alg Main StartUp Applications Games Accessories Profibus 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 u March 12 1996 1996 PEP Modular Computers GmbH Page 1 21 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 e Start Windows if not already started Insert diskette Lib Appli Help Disk 1 2 into the floppy drive e Select File from the Windows Program Manager and select Run e Type A UNSTALL in the command field and select OK Figure 1 5 3 1 il
98. ary according to encoder type If 0 is set the result in the data register is binary PT parity type 0 Odd 1 Even according to encoder type E October 01 1996 1996 PEP Modular Computers GmbH Page 6 23 SMART I O User s Manual Chapter 6 Communications Modules 6 2 7 5 Compare Register This 24 bit register indicates the comparison value and 1s 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 7 Status Register The 16 bit status register 1s divided into two sub registers which are partly cleared after a power on reset and show e IP Interrupt Pending flags e DF Data Flow e PE Parity Error e ERI End of Range 1 e TC Transmission Complete ER2 End of Range 2 e OL Open Line MH Match IP PE TC OL DF and MH flags are cleared after a reset ERI and ER2 represent the current hardware condition 6 2 7 8 STATI Register ST1 7 S ST1 5 ST1 4 ST1 3 ST1 2 STI 1 IP4 MH IPS ER2 IP2 ER1 IP1 TC IPO PE interrupt pending on parity error IP1 TC interrupt pending on transmission complete IP2 ERI interrupt pending on end of range switch 1 IP3 ER2 interrupt pending on end of range switch 2 IP4 MH interrupt pending on comparison match DF SSI data flow True False OL open line True False Page 6 24 1996 PEP Modular Computers GmbH October 01 1996 Chapter 6 Communications Modules SMART I O Us
99. at 24V Max Frequency 1 kHz square wave Output ON Intern Logical 0 Output OFF Intern Logical 1 Outputs after Reset OFF Front Panel Yellow LEDs ON when the output is ON Power Consumption 5mW min 270mW max Temperature Range Standard 0 C to 70 C Extended 40 C to 85 C Module Weight ID Byte 10 read by the SPI Interface u March 12 1996 1996 PEP Modular Computers GmbH Page 4 19 SMART I O User s Manual Chapter 4 Digital Modules 4 2 3 Front Panel Layout User Descriptor Fields Yellow LEDs 4 2 4 Board Overview Component Side LED 7 LED 0 Optoisolation I Laos Digital Output Network Di gt cos Wad GE o o Pin 1 Pin 15 Pin 1 Pin 15 Pin 2 Pin 16 Pin 2 Pin 16 Page 4 20 1996 PEP Modular Computers GmbH March 12 1996 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 User Output o V sc e sce y Digital Interface Output Driver Load z 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 The driving output device is a Darlington transistor pair protected against inductive loads by an additional clamp diode Furthermore because each output stage requires three termina
100. ate call is as follows Syntax return variable OPERATE lt source var COMMAND source data Here the return variable is assigned a value associated with the selected COMMAND parameter Each SMART Module possesses its own set of these COMMANDS Example error code OPERATE lt channel gt E INIT CODE 0 O INIT CODE is one of a number of distinct commands recognized by the PEP Modular Computers implementation of board drivers and checks for example that the board is located where the program expects it to be channel provides channel specific information and in the example shown here any of the 8 input channels may be used The last parameter 1s 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 other wise it returns a non zero value depending on the error encountered A list of these error codes may be found in the PEP online help Page 5 124 1996 PEP Modular Computers GmbH October 01 1996 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 O_INIT_CODE The syntax and usage have already bee
101. atically The sense lines being connected to a high impedance differential amplifier 1OMQ introduce almost zero error resulting from line resistances Table 5 2 5 2 shows the deviation from the required temperature for both class A and class B PT100 sensors Table 5 2 5 2 Tolerances between Class A and Class B Sensors Temperature P Tolerance pe fa ye 7 a T Hn I L 9 305 E 03 EE 700 0 1 1 I H 3 8 PS 8 8 3 6 8 3 I I 2 3 3 4 6 OOo N Oj ia d I OI N I Driver software running under OS 9 supplies linearization data for use with DIN standard PT100 sensors The on board EEPROM contains board specific calibration data for self calibration purposes Page 5 32 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 2 6 Configuration Jumper J1 EEPROM Protection Jumper Settings Description Ji 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 o o o O S P N Pin 2 Pin 14 GND between 2 sensors 9 In2 In 3 Sense line 3 positi
102. board is located where the program expects it to be channel provides channel specific information and in the example shown here any of the 8 input channels may be used The last parameter 1s 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 other wise it returns a non zero value depending on the error encountered A list of these error codes may be found in the PEP online help Page 5 26 1996 PEP Modular Computers GmbH March 12 1996 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 O_INIT_CODE The syntax and usage have already been explained O SET LED This operate call allows the user to control the yellow LED on the board s front panel The syntax is as follows analog war OPERATE i0var O SET LED var where analog var represents the analog return variable and can be zero 1f the operate call 1s supported and the correct var is passed or non zero if an error occurred lt iovar gt represents any module variable and lt var gt represents the LED to be controlled and must be one of
103. calls tells ISaGRAF to enable the conversion of a particular channel of a connected SM THERM module The syntax is as follows analog var OPERATE lt iovar gt O ENABLE CONV 0 where analog var represents the analog return variable and can be zero if the operate call 1s supported and the correct iovar is passed or non zero if an error occurred lt iovar gt is the variable name for the channel where the operate call is to take effect O DISABLE CONV This operate call tells ISaGRAF to disable the conversion of a particular channel of a connected SM THERM module The syntax 1s as follows analog var OPERATE i0var O DISABLE CONV 0 where analog var represents the analog return variable and can be zero if the operate call 1s supported and the correct iovar is passed or non zero if an error occurred lt iovar gt is the variable name for the channel where the operate call 1s to take effect u March 12 1996 1996 PEP Modular Computers GmbH Page 5 87 SMART I O User s Manual Chapter 5 Analog Modules r This page has been left blank intentionally Page 5 88 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 4 SM ADC1 5 4 1 Introduction The SM ADCI 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 boa
104. ceeded If batteries are present their tem perature restrictions must be taken into account In performing all necessary installation and application operations please follow only the instructions supplied by the present manual Keep all the original packaging material for future storage or warranty shipments If it is necessary to store or ship the board warranty ship ments If it is necessary to store or ship the board please re pack it in the original way DW 08 Jan 98 Manual ID 09901 Rev Index 0500 Page 0 5 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 oi Do not handle this product out of its protective enclosure while it is not being worked with or unless it is otherwise protected oi Whenever possible unpack or pack this product only at EOS ESD safe work stations oi Where safe work stations are not guaranteed it is important for the user to be electrically discharged before touching the product with his her hands or tools This is most easily done by touching a metal part of your system housing amp Particularly observe standard anti static precautions when changing pig gybacks ROM devices jumper settings etc If the product contains bat teries for RTC or memory back up ensure t
105. ch 12 1996 1996 PEP Modular Computers GmbH Page 2 SMART I O User s Manual Chapter 2 SMART BASE r 2 7 ISaGRAF Programming esse 2 32 2 7 1 The ISaGRAF Board Parameters nnnnnnnnnnneseseessssssesssssrererreeee 2 32 2 1 2 The ISaGRAF Operate Calls tee horto eo Eo sn 2 33 EE Be me de E 2 37 Page 2 2 1996 PEP Modular Computers GmbH March 12 1996 Chapter 2 SMART BASE SMART I O User s Manual 2 SMART BASE E 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 The SMART BASE complete with built in RS232 and RS485 PROFIBUS interfaces is connected to the outside world by RJ45 and 9 pin D Sub connectors respectively Connected SMART Modules use industrial stand ard plug in screw terminals Program code is stored in EPROM or FLASH memory thereby doing away with disk accesses and ensuring data security in harsh industrial environ ments A SMART BASE unit with additional IMByte FLASH memory may be ordered as an option in which to extend the standard code and supply user specific functionality March 12 1996
106. coder Reset Control ENT Interrupt Masks e PT Parity Type Odd Even SOT Start Transmission e DT Data Type Gray Binary CF Data Clock Frequency CM Clear Match output Page 6 22 1996 PEP Modular Computers GmbH October 01 1996 Chapter 6 Communications Modules SMART I O User s Manual e CTRL1 7 CTRL1 6 CTRL1 5 CTRL1 4 CTRL1 3 CTRL1 2 CTRL1 1 RST AR SOT DIR EN13 MH EN12 EOR ENI TC 6 2 7 2 CTRL1 Register ENIO P enable disable 1 0 interrupt on parity error ENII TC enable disable 1 0 interrupt on transmission complete ENI2 EOR enable disable 1 0 interrupt on end of range switch 1 2 ENI3 MH enable disable 1 0 interrupt on comparison match DIR direction control 1 activates the optocouplers SOT start transmission control 1 set single shot set by lib AR select automatic repeat mode when set gt 1 RST set clear 1 0 Reset output 6 2 7 3 CTRL2 Register CTRL2 7 CTRL2 6 CTRL2 5 CTRL2 4 CTRL2 3 CTRL2 2 CTRL2 1 C1 CFO P j FD FDL3 FDL2 FDL FDLO 4 number of data bits excluding parity minus 1 P enable disable 1 0 use of parity encoder dependent CF 1 0 data transmission frequency 0 0 62 5 kHz 1 0 125 kHz 0 1 250kHz 1 1 500 kHz 6 2 7 4 CTRL3 Register CTRL3 7 CTRL3 6 CTRL3 5 CTRL3 4 CTRL3 3 CTRL3 2 CTRL3 1 CM A logical 1 clears the MATCH output and LED DT data type 0 Gray 1 Bin
107. d only be used for the current version of the SM DACI 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 gt channel 0 connected and ok 101111 gt channel 4 connected and ok Input int9 PortNr SM Port to be accessed int8 pStatus Pointer to the location where the status is stored 0 gt line connected and o k gt line below 4mA Output error code 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 Example RetVal SDAClOpenLoop 0 amp Status Note If this function is called and requested for use with a voltage version of the SM DACI module then an error will be returned Likewise if a channel is requested that is out of range then an error is returned u October 01 1996 1996 PEP Modular Computers GmbH Page 5 115 SMART I O User s Manual Chapter 5 Analog Modules 5 5 8 4 SMADAC1 Operate Syntax error code SMDACIOperate 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 Input u int8 PortNr SM Port to be accessed Output error code SUCCESS E SEEK if module was not initialised E BMODE if the module i
108. detect is reached 3 the clock input 4 whether the prescaler is used and 5 whether the timer is enabled March 12 1996 1996 PEP Modular Computers GmbH Page 2 19 SMART I O User s Manual Chapter 2 SMART BASE 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 1s high see diagram Output error code SUCCESS E BMODE Unsupported mode or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMTsettout MODE SQUARE t The high state of TOUT illustrated in the above diagram shows that the output 1s deactivated 1 e OFF Only when TOUT is in the low state can a load be driven Page 2 20 1996 PEP Modular Computers GmbH March 12 1996 Chapter 2 SMART BASE SMART I O User s Manual 2 6 4 SMTpre Syntax error_code SMTpre u_int32 value Description This function reads sets the timer preload register Input u_int32 value 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 Output error Code SUCCESS E BMODE Requested value is out of range or standard OS 9 error code refer to the OS 9 Technical M
109. dular Computers GmbH Page 6 7 SMART I O User s Manual Chapter 6 Communications Modules 6 1 6 Configuration Jumper J1 EEPROM Protection Jumper Settingg Description J1 set 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 13 erd ed e e eee ee Foie die Pin 2 Pin 14 A A GND Pin Nr RS i Clearto Send 8 Page 6 8 1996 PEP Modular Computers GmbH March 12 1996 Chapter 6 Communications Modules SMART I O User s Manual Connection GND TxD RxD DTR CTS Interface System Interface User Interface lt gt lt MAX232A 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 ISAGRAE 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 hw handshake
110. e 5 4 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 4 9 2 The ISaGRAF Operate Call 5 102 Dig BEER Ca IR RS TR 5 107 M lere OR a TT 5 107 3 9 2 SPECICATION eege EE 5 107 5 5 Front Paner I3 OUR a 5 108 5 9 4 EE BR 5 108 5 5 5 Functional leet 5 109 3 3 3 l Output CATCUIE eege ses 5 109 IAO CONH CUr OT aosan a 5 110 SE EE 5 110 3 5 0 C PEOSTOIEEBIT ecc a da a ee 5 113 5 5 8 1 SM DACI Library 5 113 Eege 5 114 5 5 8 3 SMDACIOpenLoop ss 5 115 5 5 87 SMADAC LO EEN geg 5 116 5 5 8 5 SMDACI Stand By sess 5 117 EEN ege 5 118 5 5 8 7 SMDAC 1 PutV de ds neue 5 119 s MD Ue a a di de cn once 5 120 5 5 8 9 SMDACICIFLEG 5 121 ISLO SMDAC IDe IMi NR 5 122 5 5 9 ISaGRAF Programming eseesessssseeeneee nennen nnns 5 123 5 5 9 1 The ISaGRAF Board Parameters ccccccccsscceeceeceeeeeeeeeees 5 123 5 5 9 2 The ISaGRAF Operate Call 5 124 March 12 1996 1996 PEP Modular Computers GmbH Page 5 5 SMART I O User s Manual Chapter 5 Analog Modules r This page has been left blank intentionally Page 5 6 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 Analog Modules 5 1 SM DADI 5 1 1 Introduction The SM DADI 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 un
111. e EE 5 72 5 3 8 7 SMADCSetPrecision usines serres sense seems 5 73 e 9 MADCC IPEeCISION scrcas aa 5 74 5 3 8 9 SMADCSetMode ou ceeccccccccceseeccccsessescccccssuaeseesccssuaaensess 5 75 53 8 10 S VIA DCG VIO EE 5 76 5 3 8 11 SMADOCSetSignal EE 5 77 3 9 912 SNA DC SUG ashen ee nt de een 5 78 5 3 8 13 SMADCGetGain oo ceeeccccccsesssecccccesssssscccccesssssescssesesssecs 5 79 553 0 14 SIMA DCE MA DICR CAG EEN 5 80 5 3 8 15 SMADCEnableConversion ss 5 81 5 25 5 106 SMA DCR EE 5 82 5 3 8 17 SMADCReadConverted sus 5 83 Bis Woe pode ERR RE a era ee ee 5 84 5 3 9 ISaGRAF Programming eene eene 5 85 5 3 9 1 The ISaGRAF Board Parameters eee 5 85 5 3 9 2 The ISaGRAF Operate Calls sseesseeeene 5 86 54 SM ADC EEN 5 89 S AOC EE 5 89 SE SPeCUICAU OMS E 5 89 53 4 93 Pront Panel Lay OUR aa 5 90 2304 4 Board OVI E 5 90 5 4 5 Functional DeSCEIDEHOD nci iio eege geet 5 9 5 4 5 1 Input Car Cui RETIA 5 9 EE a see 5 92 S POU sc stenoses races a Id LO NES 5 92 2345 C PEOSPIIMEIII ee 5 94 5 4 8 1 SM ADCI Library ss 5 94 E OMAD EE 5 95 5 4 8 3 SMADCIGetVRaw ceeeeeeeeeeeeeeeneenen eene nennen nennen nans 5 96 E EEN RI EE 5 97 5d 3o ENEE Cd ee Do ec MID E UE 5 98 SASO NAS DOI erh E 5 99 S2 9 NA DE he Mii Ramayesesaneceaantennes 5 100 5 4 9 ISaGRAF Programming 5 101 5 4 9 1 The ISaGRAF Board Parameters eee 5 101 Pag
112. e ISaGRAF Operate Calls seesseeeeennee 6 12 0 1 9 05 9 eg te 6 14 MAS Dos EE 6 17 Dal im OCC Gl OAM ua soni apro Lan cdd ne SIUS DUTIES nc 6 17 5 2 2 DEC MUN AUN INS oe ee apie Sines ahs tose de tmn RO ete oo 6 17 0 2 3 Front Panel D3y QUE auedeteseastons 6 18 iE DOME OVC E eeh 6 18 6 2 5 Functional iere 6 19 6 26 SS OPEratiON ces ae a me seS aqu dEnEee 6 20 6 2 7 e E ET nn demo 6 22 B S MOOD RE ae Da ec ee 6 22 OCR RS ARR en iode EU era 6 23 027S TRE RE DIR ne ane ce me me 6 23 OL NUES ESI S NER 6 23 o3 Bin CORDE tcc i Lo sn de on 6 24 6 2 F0 Id nirticalom Register E 6 24 0217 Stama REL E E 6 24 De EC 6 24 OLTI STAF RS SR a ec ee 6 25 5 2 I0 Data RS OS a REDE ee RUE 6 25 Page 6 2 1996 PEP Modular Computers GmbH March 12 1996 Chapter 6 Communications Modules SMART I O User s Manual 6 2 8 MATCH Function ei c2ccicsszescesdacesdedencashinetocsuobhestantaaeiastecsstuenctehteadsdonees 6 26 0 2 9 Tested SCHSOLS a a ess sans con cs a en 6 26 6 2 10 COMMPUTAUOM nana eee der tee enter 6 27 OP RE Tx 6 27 6 2 12 C Programim nn on eege annee e es tin 6 29 o2 II EC ES CIE En op E A 6 29 SUM e tr UE RE Re 6 30 6 212 SMSS IDe iif annis aa a E 6 31 6 2 12 4 SMSSISetSetPoint 0 ccccsscssssssoocesseccsvssssesnsonessscevessessoceonees 6 32 602 125 MS OSGI CER CO ea anne SI aa DE EU NOU M IRR UM 6 33 6 2 12 6 SMSSIGetStatus s 00scccsssesssersosccssccsesssssesnsnneccssevssversseennsnes 6 34 56 2 1
113. e SM DOUT1 library an application example called demdoutl c can be found in the SMART I O application directory normally found in device APPLIC SMART CMDS Page 4 24 1996 PEP Modular Computers GmbH March 12 1996 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 1s ensured by using for example semaphores within OS 9 4 2 8 2 SMDOUT Init Syntax error code SMDOUTLInitiu_ints PorcNnr Description This function initializes the SM DOUT1 Module on port PortNr and sets all output lines to OFF Input u_int8 PortNr SM Port number to initialize from 0 to 10 Output error code SUCCESS E BMODE Ifthe module is unknown or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMDOUTIInit 0 u March 12 1996 1996 PEP Modular Computers GmbH Page 4 25 SMART I O User s Manual Chapter 4 Digital Modules 4 2 8 3 SMDOUT1DelInit Syntax error code SMDOUT1DeInit u_int8 PortNr Description This function de initializes the SM DOUTI Module on port PortNr by releasing all resources assigned to it thereby freeing memory for other uses Input u int POrCNE SM Port number to de initialize Output error code SUCCESS or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMDOUT1De
114. e acillib h Hardware Requirements e SMART I O Base Module or Base Module and Extension unit e SM ACII Module Page 4 64 Manual ID 09901 Rev Index 0500 08 Jan 98 Digital Modules SMART I O User s Manual 08 Jan 98 e The compiler belonging to one of the following environments e Ultra C Version 1 1 2 or higher e FasTrak for Windows version 2 02 or higher Software Requirements 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 SMACIIInit must be called first By this the requested resources are allo cated Beyond this function needs to be called for each SM ACII Module called within the task Upon completion of the application the function SMACT Delnit needs to be called for each SM ACII Module that has been initialized In order to illustrate the use of the SM ACII library an applica tion facsimile called demoacil c can be found in the SMART I O application directory normally to be found in lt device gt APPLIC SMART SRC 4 4 8 2 SMACI1Init Syntax error code SMACIlInit u int8 PortNr Description This function initializes the SM ACII Module on port PortNr by allocating space in memory for resources and resetting all inputs WW Manual ID 09901 Rev Index 0500 Page 4 65 SMART I O User s Manual Digital Modules r Page 4
115. e data register holding the last value 1s read back to the address pointed to by pData Input u int8 PortNr SM Port number to send register 0 to 10 long CntrlRegl Control register 1 value 0x0 gt OxFF long CntrlReg2 Control register 2 value 0x0 gt OxFF long CntrlReg3 Control register 3 value 0x0 gt OxFF int32 pData Pointer to the value returned from the data register 0x0 gt OxFFFFFF 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 SMSSISetCtrlReg 0 0x80 0x17 Oxl amp Data u October 01 1996 1996 PEP Modular Computers GmbH Page 6 33 SMART I O User s Manual Chapter 6 Communications Modules 6 2 12 6 SMSSIGetStatus Syntax error code SMSSIGetStatus u xnt8 PortNr u into pstatusl U 1nes bStatusz Description This function reads the status of the module selected on port PortNr Input inte POFtNE SM Port number to get status u int8 pStatusl Pointer to the value read in the status register 1 0x0 gt OxFF u int8 pStatus2 Pointer to the value read in the status register 2 0x0 gt OxFF Output error code SUCCESS E BMODE if the module 1s unknown or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMSSIGetStaus 0 amp Statusl amp Status2 Page 6 34 1996 PEP Modular Computers GmbH October 01 1996 Chapter
116. e error codes may be found in the PEP online help Page 6 12 1996 PEP Modular Computers GmbH March 12 1996 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 O_INIT CODE The syntax and usage have already been explained O SERIAL READ This operate call prevents the system from being blocked due to polling of incoming characters Hence during every ISaGRAF cycle the program checks 1f the buffer for incoming data contains data If so the data will be collected The syntax 1s as follows chars in OPERATE lt ser_in gt O_SERIAL READ lt chars gt where chars in represents the actual number of characters read from the buffer ser in is the input device name chars the number of characters expected to be read Example ret OPERATE keyboard O SERIAL READ 10 If the default value OD hex 1s used for the eor char then the scanning of the input will terminate when either the RETURN key is pressed or 10 characters have been read u March 12 1996 1996 PEP Modular Computers GmbH Page 6 13 SMART I O User s Manual Chapter 6 Communications Modules 6 1
117. e of the SM THERM library an application example called demoadc c can be found in the SMART I O application directory normally found in device APPLIC SMART CMDS Page 5 64 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual To compile the source execute the following commands at the shell prompt gt chd lt dev gt APPLIC SMART gt make all To execute the example load lt dev gt BSP SMART SMADC adc task load HW task load lt dev gt 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 Initialization To start the HW Task the OS 9 module adc_task must be loaded then the function SMADClnit must be called To read data from a channel the type of sensor attached to it must be known The PEP header file BSP SMART SMADC DEFS smadc h contains a list of sensors that are supported To set the sensor type the function SMADCSetSensor Type needs to be called Read RAW Data To force the HW task to read RAW data from a channel the function SMADCEnableRead must be called As soon as the HW task has received data from this channel a flag is set indicating a valid RAW value Now the user s application 1s able to read this value by using the function SMADCReadRaw u March 12
118. e task Upon completion of the application the function SMADCIDelnit needs to be called for each SM ADCI Module that has been initialised In order to illustrate the use of the SM ADCI library an application example called demoadc c can be found in the SMART I O application directory normally found in device APPLIC SMART CMDS Page 5 94 1996 PEP Modular Computers GmbH October 01 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 4 8 2 SMADCIInit Syntax error code SMADClInit u intg PortNnr Description This function initialises the SM ADCI Module on port PortNr and tests the module s ID test the module s sub ID for the determination of bipolar or unipolar operation voltage current input reads the conversion table held in EEPROM allocates space for the fetched resources Input u int8 PortNr Port number of module to initialise from 0 to 10 Output error code SUCCESS or E BMODE if wrong or no module E MEMFUL if no memory resources available or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCIInit 0 u October 01 1996 1996 PEP Modular Computers GmbH Page 5 95 SMART I O User s Manual Chapter 5 Analog Modules 5 4 8 3 SMADC1GetV Raw 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 gai
119. ease remember that no PEP Modular Computers employee dealer or agent is authorized to make any modification or addition to the above specified terms either verbally or in any other form written or electronically transmitted with out the company s consent Page 0 8 Manual ID 09901 Rev Index 0500 08 Jan 98 SMART LO User s Manual Preface Table of Contents Chapter 1 General Information 1 3 1 1 Product Overview eeeeeeeeeee nennen 1 8 1 2 Ordering Information seeesseeesss 1 9 1 3 Product Information eese 1 10 1 4 Installation eese 1 13 1 5 ISaGRAF Installation 1 18 Chapter 2 SMARI DBDASE EE 2 3 MEE eise EE 2 4 2 2 Board Overview eeessseesssese eene 2 5 2 3 Functional Description 2 6 24 CONN OUVANOW ee 2 8 08 Jan 98 Manual ID 09901 Rev Index 0500 Page 0 9 Preface SMART I O User s Manual r A ME Lo TEE 2 9 20 C PIOGIANNMING eet 2 17 2 7 ISaGHAF Programming 11cccccecccseeeecseeeseneees 2 32 26 Flas n OU er EEEE 2 37 Chapter EE WE 3 3 Sel CD CCHICAUONS ed 3 3 3 2 Board Overview esses 3 4 3 8 Functional Description 3 5 o ME n 3 6 Chapter 4 Digital Modules sussees 4 5 4 1 SM DINT LL 4 5 42 ON BO TR re eee 4 19 Page 0 10 Manu
120. ect COM port is selected for communication to the SMART I O ISaGRAF SM DEMO Programs vl Files Dictionary Make Debug Options Help Debug Simulate PC PLC link e When confirmed select Debug Debug From the Debugger Window select File from the pull down menu if an application is already executing indicated by Run in the status line Page 26 1996 PEP Modular Computers GmbH March 12 1996 Introduction SMART I O User s Manual e Finally from the Files Download pull down menu select Motorola Target Code 2 1 1SaGRAF SM DEMOT Debugger LJ Files Control Spy Options Help Stop PLC Activate PLC Download Update application Realize update Get version number 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 SM DOUT1 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 The program will wait for 1 second in this state before reversing the action The effect is that the second and third LED illuminate alternately with a pause of 1 second between u March 12 1996 1996 PEP Modular Computers GmbH Page 1 27 SMART I O User s Manual Introduction r This page has been left blank intentionally
121. ed This allocates the requested resources Furthermore this function needs to be called for each SM SSI Module called within the task Upon completion of the application the function SMSSIDelInit needs to be called for each SM SSI Module that has been initialized In order to illustrate the use of the SM SSI library an application example called demssi c can be found in the SMART I O application directory nor mally found in device APPLIC SMART CMDS October 01 1996 1996 PEP Modular Computers GmbH Page 6 29 SMART I O User s Manual Chapter 6 Communications Modules 6 2 12 2 SMSSIInit Syntax error cod SMSSLInit mt into PorcNr 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 SM Port to initialize from 0 to 10 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 SMSSIInit 0 Page 6 30 1996 PEP Modular Computers GmbH October 01 1996 Chapter 6 Communications Modules SMART I O User s Manual 6 2 12 3 SMSSIDelnit Syntax error code SMSSIDeInit u_ints PorctNr 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 SM Port number to de initialize from 0 to 10 Outpu
122. ed 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 u March 12 1996 1996 PEP Modular Computers GmbH Page 4 31 SMART I O User s Manual Chapter 4 Digital Modules r This page has been left blank intentionally Page 4 32 1996 PEP Modular Computers GmbH March 12 1996 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 2 Specifications Isolation system 2 5 KV Optoisolated Between Channels 1 5 kV Between Contacts 1 0 kV Surge Voltage 1 5 kV Output 6 Normally Open Relay Contacts Max Switching Voltage 250V AC 220V DC Max Switching Current 2A Max Switching Load Resistive 60W 125 VA owitch ON Current Rate GA 3ms Sustained Current 3A Switch OFF Current Rate 2A 2ms Max Switching Frequency 100 Hz Contact Resistance 50mQ Settling Time 4ms Power ON OFF Protection Glitch free Power ON Expected Life 2 Million Cycles Ext VCC 24V DC 20 100mA Front Panel 6 Yellow LEDs Relay CLOSED 1 Green LED Ext VCC Ready 1 Yellow LED
123. egister and clears it 1f set Input u int8 value Pointer to a variable in which to place the read value 0 represents not set 1 represents set Output error code SUCCESS or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMTstat buffer Description of the Timer Status Register TSR 6 5 4 3 2 1 0 7 Lt 7 RAS The timer status register contains one bit from which the zero detect status can be determined The ZDS status bit bit 0 is an edge sensitive flip flop that is set to one when the 24 bit counter decrements from 000001 to 000000 The ZDS status bit 1s cleared to zero following the direct reset operation or when the timer is halted This register 1s always readable without consequence A write access performs a direct reset operation if bit 0 in the written data 1s one Page 2 26 1996 PEP Modular Computers GmbH March 12 1996 Chapter 2 SMART BASE SMART I O User s Manual 2 6 9 SMTout Syntax error code SMIout u intg value Description This function reads the actual status of the TOUT pin Input u ints value Pointer to a variable in which to place the read value 0 represents a low level while a 1 represents a high level Output error Code SUCCESS or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMTout buffer u March 12 1996 1996 PEP Modular Computers GmbH Page 2 27 SMART I
124. enable Flag for enabling or disabling conversion of raw values Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified E BMODE If conversion can t be enabled because a bad or no sensor type 1s specified or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCEnableConversion 0 1 FALSE Page 5 52 1996 PEP Modular Computers GmbH March 12 1996 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 ntlo pBurrer Description This function checks if an SM PT100 board is fitted on the specified port and if the channel 1s 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 1s large enough to store the data Input Wants PortNr Port number from which raw data is to be read from 0 to 10 u_int8 channel Number of the channel to be read 0 to 3 u intl16 pBuffer Pointer to a user defined buffer Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified E NOTRDY If no data is available at the moment wait or poll the input or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADC
125. eparately to meet the requirements of indi vidual specifications TUM u March 12 1996 1996 PEP Modular Computers GmbH Page 1 13 SMART I O User s Manual Introduction e Up to 4 SMART EXT units can be cascaded depending on the power con sumption of the individual SMART Modules DON Hl IN HI 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 Page 1 14 1996 PEP Modular Computers GmbH March 12 1996 Introduction SMART I O User s Manual 1 Screw terminal connectors are available in packs of 5
126. er s Manual Note Interrupt pending flags IPO IP4 are set by the interrupt source if the corresponding line is not masked in the CTRL 1 register All flags are cleared when the STAT register is read 6 2 7 9 STAT2 Register ST2 7 ST2 6 ST2 5 ST2 4 ST2 3 ST2 2 ST2 1 PE parity error on last transmission True False TC transmission complete True False ER current status of end of range switch 1 ER2 current status of end of range switch 2 MH comparison match True False Note The MH flag is set internally as soon as the encoder reaches the preset register value with the flag being cleared immediately the status 1s read This feature 1s intended for use with the board in automatic mode to allow slow polling of the status registers while ensuring that a match is not lost 6 2 7 10 Data Register The data register cleared after a power on reset 1s a 24 bit register containing the result of the last encoder reading When using encoders with less than 24 bit data the result is always aligned from the lowest significant bit and the used upper bits are always cleared u October 01 1996 1996 PEP Modular Computers GmbH Page 6 25 SMART I O User s Manual Chapter 6 Communications Modules r 6 2 8 MATCH Function The match output which is useful for detecting when an event occurs is set using an A gt B comparator where A the SSI data B the compare register The MATCH output is set on
127. erate call is supported and the correct iovar is passed or non zero if an error occurred lt iovar gt is the variable name for the channel where the operate call 1s to take effect O GET LINE STATE This operate call allows the user to check the line state on the current version of the SM DACI The syntax is as follows lt analog var OPERATE lt iovar gt O GET LINE STATE Var where analog var represents the analog return variable and is zero if an open loop is detected Otherwise it returns 1 lt iovar gt is the variable name for the channel where the operate call is to take effect lt var gt is not used Page 5 126 1996 PEP Modular Computers GmbH October 01 1996 Chapter 6 Communications Modules SMART I O User s Manual e Communications Modules for SMART 1 0 u March 12 1996 1996 PEP Modular Computers GmbH Page 6 1 SMART I O User s Manual Chapter 6 Communications Modules r Table of Contents 6 Communications Modules 6 5 MESI 292 6 5 Dr Eege ea el 6 5 AE DECO OS a E T 6 5 6 1 3 pront Panel Lay OR cocesctraciecetedeorestenestnesonedndacaapatacesduatepeasadseaencast 6 6 E eg ee 6 6 6 1 5 Functional Description ere aan E SCR RE ed cube cce 6 7 D IO CO ie MOIR et 6 8 ETO a E E E E A 6 8 6 1 8 ISaGRAF Programming asensin aai 6 10 6 1 8 1 The ISaGRAF Board Parameters cccccccssccccecccceeeeeeeeeeeees 6 10 6 1 8 2 Th
128. erent tasks the user must make sure that the actual output status is ensured by using for example semaphores within OS 9 5 1 8 2 SMDAD1Init Syntax error code SMDADIInit u into POrENE Description This function initializes the resources needed to use the SM DADI on port PortNr including testing of the SM Module ID reading the factory set conversion table held in the EEPROM setting the ADC to bipolar mode and the DAC to unipolar mode fetching the resources Input u int8 PortNr SM Port number to initialize from 0 to 10 Output error code SUCCESS or E BMODE if wrong or no module E MEMFUL if no memory resources available or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMDAD1Init 0 u March 12 1996 1996 PEP Modular Computers GmbH Page 5 17 SMART I O User s Manual Chapter 5 Analog Modules 5 1 8 3 SMDAD1DelInit Syntax error code SMDAD1DeInit u_int8 PortNr Description This function de initializes the SM DADI Module on the port PortNr by freeing the resources tied up with it and setting all outputs and inputs to zero Input u into POFCNE SM Port number to de initialize from 0 to 10 Output error code SUCCRSS E SEEK if module not initialized or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMDAD1DeInit 0 Page 5 18 1996 PEP Modular Computers GmbH March 12 1996
129. erminal Pinout Pin 13 Pin 14 WARNING u 08 Jan 98 Manual ID 09901 Rev Index 0500 Page 4 61 Dangerous voltages are present at the terminals SMART I O User s Manual Digital Modules r Table 4 3 Pinout Signal Relationship 3 Phase Phase channel 0 channel 4 5 Pl Phase P5 Phase channel 1 channel 5 7 N1 Neutral N5 Neutral channel 1 channel 5 P2 Phase 10 Phase channel 2 channel 6 11 P3 Phase 12 P7 Phase channel 3 channel 7 13 N23 Neutral 14 N67 Neutral channels 2 3 channels 6 7 Page 4 62 Manual ID 09901 Rev Index 0500 08 Jan 98 Digital Modules SMART I O User s Manual Figure 4 7 Connection O NEUTRAL _ 08 Jan 98 Manual ID 09901 Rev Index 0500 Page 4 63 SMART I O User s Manual Digital Modules r Figure 4 8 Example Input Circuit Only One Channel Shown User Input Interface System Interface Vcc 24V O A IT Es 80 V AC 264 V AC Gnd 0V O 4 4 8 ANSI C Programming 4 4 8 1 SM ACI Library The SM ACII library of functions smartio l provide a conve nient way of accessing the SM ACII module e All functions are written in ANSI C e Prototypes are to be found in the fil
130. es r Table of Contents 5 Analog Modules eeeeeeeneeseeresseeen 5 7 SN DA a 5 7 SH D Ree re e o cett ee Ru FERIA ENIM USD OPES 5 7 a PAS DECO OR E TTE 5 7 5 1 9 Front Panel eege 5 8 AN Nic auc s 5 0 S T5 Functional Description eege Egeter 5 10 D LS AO CON a ne 5 10 LS OWUPDHT CLEO e 5 11 SEOC Ol OU Al eege 5 12 PO OT 5 13 SN BM C EEN 5 16 DM SR ND RD E EE E 5 16 SN D Re Rm 5 17 SL SN D SR EE 5 18 EE 5 19 ASS ND ER E sence feces T A E 5 20 3 1 8 6 S MIDAGD UR I5 IW iets covet a en mn 5 21 SA MESDUUBTPII es 5 22 EE o 5 23 SANE RON Os E HR 5 24 5 1 0 TSaAGRAP POP AMEN sen tee 5 25 5 1 9 1 The ISaGRAF Board Parameters ccccccccscccccceececeeeeeeeeeees 5 25 5 1 9 2 The ISaGRAF Operate Calls ccccccseeescccccceeeeeeeeeeeeenens 5 26 SMS EE 5 29 Sd oll MN COMIC e a ne nr om no 5 29 2 2 2 5DEEEHOdHO E 5 29 5 2 3 Front Panel T messes nee acer 5 30 524 Board OVC te Wy geusvedustuec N e PS ipeuS eM zT du ERU EUSU eene 5 30 5 2 Tusnctonal DCS Ci OM a de 5 31 240 OMA UNE een 5 33 Page 5 2 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual 952 PO a A EN 5 33 3226 C PRO MAN T UU TL 5 35 5 2 8 1 O MEP T TOO LIDTATY a ets ets 5 35 SPP SOUPE DO AR a ee 5 39 5 2 8 3 SMADCCalibrate 5 40 5 2 8 4 SMADC SetCyclicCalib ri ecitivcnnnasinasatacansnacecnessderadeetncceceseenaane 5 41 5 2 8 5 SMADCSetSensorType ses 5 42 5 2 8
131. es in the carrier unit with the power OFF Handle the controller components with care Modules containing highly integrated CMOS components are very sensitive to static discharges Try to separate analog modules from their digital cousins u March 12 1996 1996 PEP Modular Computers GmbH Page 1 3 SMART I O User s Manual Introduction Weights amp 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 A DIN Rail Mounting 1996 PEP Modular Computers GmbH March 12 1996 Introduction SMART I O User s Manual Optional Bracket Mounting March 12 1996 1996 PEP Modular Computers GmbH Page 1 5 Introduction SMART I O User s Manual 1996 PEP Modular Computers GmbH March 12 1996 Page 6 Introduction SMART I O User s Manual SMPTION 4og March 12 1996 1996 PEP Modular Computers GmbH Page 1 7 SMART I O User s Manual Introduction r 1 1 Product Overview SMART I O is based on a cost effective open system for industrial automa tion 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 rea
132. etect the end of record is usually set to OD hex The input and output devices are represented by keyboard and display respectively March 12 1996 u 1996 PEP Modular Computers GmbH Page 6 11 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 The syntax of the operate call is as follows Syntax return variable OPERATE lt source var COMMAND source data Here the return variable is assigned a value associated with the selected COMMAND parameter Each SMART Module possesses its own set of these COMMANDS Example error code OPERATE lt channel gt E INIT CODE 0 O INIT CODE is one of a number of distinct commands recognized by the PEP Modular Computers implementation of board drivers and checks for example that the board is located where the program expects it to be channel provides channel specific information and in the example shown here any of the 8 input channels may be used The last parameter 1s 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 other wise it returns a non zero value depending on the error encountered A list of thes
133. face The SM PT100 has provision for 4 sets of 4 wire PT100 sensors driven by an on board generated 400LLA constant current source The differential analog input consists of a channel multiplexer operational amplifier voltage feedback impedance converter and a high resolution 16 bit delta sigma converter 1000V DC system isolation is provided by an optoisolated DC DC converter while system flexibility 1s provided by a 256 bytes of serial EEPROM for ID number production and board specific calibration data Two front panel LEDs show the conversion calibration activity Impedance Converter ND Conver Lei SENSE LINE on e AAA e SUPPLY LINE Ri The PT100 is a platinum resistance which at 0 C has a resistance of 100Q and conforms to the international DIN IEC 751 standard for Industrial Platinum Resistance Thermometer Sensors Two classes A and B exist under this standard with class B experiencing a slightly worse initial error Figure 5 2 5 2 Supported Sensor Connections Red White Red Red White Red Red White Red Pt 100 2 Pt 100 3 Pt 100 4 u March 12 1996 1996 PEP Modular Computers GmbH Page 5 31 SMART I O User s Manual Chapter 5 Analog Modules 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 1s the 4 wire system shown in figure 5 2 5 1 which eliminates all line resistances autom
134. false hw handshake false echo tue ooo parity 0 DEL i amm xoff char 13 S z 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 Because the SM RS232 module can only occupy the first slot on the SMART BASE the descriptor 1s able to access the module directly without the need of a manu ally entered logical address Module Specific Information dev file name This must be set to scc3 dev mod name This must be set to scc3 hw handshake A hardware handshaking flag that is not supported for SMART I O applications echo A boolean flag allowing incoming characters to be echoed to the screen Page 6 10 1996 PEP Modular Computers GmbH March 12 1996 Chapter 6 Communications Modules SMART I O User s Manual char_length SIOD ut parity baud rate xon char xoil char eor char E 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 communi cation protocol may be 0 for 1 stop bit 1 for 1 5 stop bits or 2 for 2 stop bits The parity bit of a data string may be 0 for no parity 1 for odd parity or 2 for even parity The board rates supported by the SM RS232 are standard values up to 19200 baud XON character typically set to 11 hex XOFF character typically set to 13 hex Character to be used to d
135. fied channel 0 to 3 u intl6 pBuffer Pointer to a user defined buffer Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCGetPrecision 0 1 amp Buffer u March 12 1996 1996 PEP Modular Computers GmbH Page 5 45 SMART I O User s Manual Chapter 5 Analog Modules 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 Input u_int8 PortNr Port number to set mode 0 to 10 u int8 channel Number of specified channel 0 to 3 u int8 mode Mode of ADC BIPOLAR or UNIPOLAR Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified E BMODE Illegal mode or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCSetMode 0 1 BIPOLAR Page 5 46 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 2 8 10 SMADCGetMode Syntax error code SMADCGetMode u int8 PortNr u
136. gnal to signal code sigCode Signal code to be sent Output Grror code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified E SIGNAL Illegal signal code used it must be 0x100 or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCSerSignal 0 1 0 0x100 Page 5 48 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 2 8 12 SMADCSetGain Syntax error code SMADCSetGain u_ints PortNr u int8 channel H inte gain Description This function checks if an SM PT100 board 1s 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 The default values for the attached sensor are substituted here when the sensor type 1s selected Input u int8 PortNr Port number to set gain from 0 to 10 u int8 channel Number of specified channel 0 to 3 u int8 gain Value of gain amplifier 0 to 7 for gain factors from 1 to 128 Output Srror eode SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified E BMODE Illegal gain value or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCSetGain 0 1 2 gain of 4 u March 12 1996
137. hat the board is not placed on conductive surfaces including anti static plastics or sponges They can cause short circuits and damage the batteries or tracks on the board HV Safety Instructions This chapter of the safety instructions applies to HIGH VOLTAGE APPLIANCES gt 60 V only Your new PEP product was developed and tested carefully to provide all fea tures necessary to ensure the renown electrical safety requirements However serious electrical shock hazards exist during all installation repair and mainte nance operations with this product Therefore always unplug the power cable to avoid exposure to hazardous voltage All operations on this device have to be carried out by sufficiently skilled per sonnel only Page 0 6 Manual ID 09901 Rev Index 0500 08 Jan 98 SMART LO User s Manual Preface e PEP Modular Computers grants the original purchaser of PEP products a TWO YEARS LIMITED HARDWARE WARRANTY as described in the following How ever 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 Two Years Warranty PEP Modular Computers warrants their own products excluding software to be exempt of manufacturing and material defects for a period of 24 consecutive months from the date of purchase This warranty is not transferable nor extend ible to cover any other users or long term storage of the
138. he OS 9 Technical Manual Error Codes Section Example RetVal SMDAC1PutVRaw 0 1 OxOFFF Unipolar Bipolar X Positive Full Scale O 000 0 0800 Negative Full Scale Page 5 118 1996 PEP Modular Computers GmbH October 01 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 5 8 7 SMDAC1PutV Syntax error code SMDACIPutV 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 1f a user defined table exists then this will be used otherwise the default factory set table will be used Input u intg PorcNr SM Port number to be accessed u_int8 Channel Number of the DAC output channel to access 0 5 int16 Value Value to be written Output error Code 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 Example RetVal SMDACIPutV O 1 OxOFFF Unipolar Bipolar Positive Full Scale 0 000 0 J 000 u October 01 1996 1996 PEP Modular Computers GmbH Page 5 119 SMART I O User s Manual Chapter 5 Analog Modules 5 5 8 8 SMDAC1SetLed Syntax error code SMDAC1SetLed u_int8 PortN
139. he initialization stage to check that the SMART Modules are in fact located where they have been programmed to be The syntax of the operate call is as follows Syntax return variable OPERATE lt source var COMMAND source data Here the return variable is assigned a value associated with the selected COMMAND parameter Each SMART Module possesses its own set of these COMMANDS Example error code OPERATE lt channel gt E INIT CODE 0 O INIT CODE is one of a number of distinct commands recognized by the PEP Modular Computers implementation of board drivers and checks for example that the board is located where the program expects it to be channel provides channel specific information and in the example shown here any of the 8 input channels may be used The last parameter 1s 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 other wise it returns a non zero value depending on the error encountered A list of these error codes may be found in the PEP online help Page 4 30 1996 PEP Modular Computers GmbH March 12 1996 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 us
140. he original guarantee are considered gestures of DW 08 Jan 98 Manual ID 09901 Rev Index 0500 Page 0 7 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 result ing directly or indirectly from any warranty claim other than the above speci fied repair replacement or refunding Particularly all claims for damage to any system or process in which the product was employed or any loss incurred as a result of the product not functioning at any given time are excluded The extent of PEP Modular Computers liability to the customer shall not exceed the origi nal purchase price of the item for which the claim exist PEP Modular Computers issues no warranty or representation either explicit or implicit with respect to its products reliability fitness quality marketabil ity or ability to fulfil any particular application or purpose As a result the prod ucts are sold as is and the responsibility to ensure their suitability for any given task remains of the purchaser In no event will PEP be liable for direct indirect or consequential damages resulting from the use of our hardware or software products or documentation even if PEP were advised of the possibil ity of such claims prior to the purchase of the product or during any period since the date of its purchase Pl
141. initialise Output Grror Code SUCCESS or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCDeinit 0 u March 12 1996 1996 PEP Modular Computers GmbH Page 5 55 SMART I O User s Manual Chapter 5 Analog Modules 5 2 9 SaGRAF 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 fegical_address 3 kalib perod 20 pe al resistono hype ai resistonoo type_ch3 resistorl 00 type ch4 resistor100 wla E E E E E oes el Si Si Logical Address The 4 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 3 1 e the third 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 Module Specific Information calib_period This is the time in seconds for cyclic calibration 1f required An entry of zero disables the function type ch x This parameter is either resistor100 or PT100 depending whether the returned value should be raw ohmic or calibrated in degrees Ce
142. int8 channel uinte pBufter 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 1s large enough to store the data Input Wants PortNr Port number to fetch the mode 0 to 10 u_int8 channel Number of specified channel 0 to 3 u_int8 pBuffer Pointer to a user defined buffer Output error Code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCGetMode 0 1 amp Buffer u March 12 1996 1996 PEP Modular Computers GmbH Page 5 47 SMART I O User s Manual Chapter 5 Analog Modules 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 1s 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 Input EK inte PortNr Port number of SM PT100 to set the signal from 0 to 10 u_int8 channel Number of specified channel 0 to 3 process 1d procID ID of the process to send the si
143. ipolar bipolar 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 obtained in steady state conditions at 25 C STP required by the signal converters 5 1 2 Specifications 4 Differential Voltage Inputs Input Range 10V 12 bit ADC with 1 bit non linearity 10 bit repeating accuracy Overvoltage Protection 35V Input Impedance approx 450 kQ Filter set to 10kHz On chip Reference Voltage 13us Conversion Time 1MHz SCLK 2 Unipolar Bipolar Outputs Short Circuit Protected 12 bit DAC with 1 bit non linearity Output Range 10V or 0 10V SDN 5mA max Output Current Power up Reset without glitch Unipolar 4mV Zero Code Offset Error Unipolar Settling Time 40us 10V to 10V 350mW min 450mW max 6 LSB max across temp range 40 C to 85 C ADC Rue 4 LSB max across temp range 40 C to 85 C DAC Input Module Weight ID Byte 50 read by the SPI Interface March 12 1996 1996 PEP Modular Computers GmbH Page 5 7 SMART I O User s Manual Chapter 5 Analog Modules 5 1 3 Front Panel Layout ER User Descriptor Fields Page 5 8 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 1 4 Board Overview mponent Si Component Side E Multiplexer Solder Side LEDO LED1 Pin 16 Pin 2 Pin 16 Pin 2 March 12 1996 1996 PEP Modular Compute
144. is supported and the correct lt var gt is passed or non zero if an error occurred lt iovar gt represents any module variable and lt var gt represents the LED to be controlled and must be one of OA_LEDI ON or OA LEDI OFF O EXT POWER This operate call can detect whether the external power has failed or not and has the following syntax Manual ID 09901 Rev Index 0500 Page 4 51 analog var e OPERATE lt iovar gt SMART I O User s Manual Digital Modules r Page 4 52 O EXT POWER 0 where analog var represents the analog return variable and can be zero if the operate call is supported and the correct var is passed or non zero if an error occurred lt LOvar gt represents any module variable Manual ID 09901 Rev Index 0500 08 Jan 98 Digital Modules SMART I O User s Manual e 4 4 SM ACI1 4 4 1 Introduction The SM ACII 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 47 63 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 The user interface is realized by eight green LEDs one per input channel which switch on when the inputs are energized and by
145. l e Figure 4 3 Solder Side fei LED LED 7 ma Pin 16 Pin 2 Pin 16 Pin 2 _ Manual ID 09901 Rev Index 0500 Page 4 57 Digital Modules 4 4 5 Functional Description Figure 4 4 SM ACI1 Schematic Diagram User Input Interface 80 V AC 264 V AC SMART LO User s Manual System Interface Digital LED Pass i 08 Jan 98 Manual ID 09901 Rev Index 0500 Page 4 58 Digital Modules SMART I O User s Manual 08 Jan 98 Downstream the optoisolation part of the circuit an RC first order 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 This interrupt will only be acknowledged under OS 9 if the module is on the SMART BASE or occupies the first slot of the attached SMART EXT unit This channel is manufacturer set at 40 Hz but other frequencies may be catered for The table below shows the settings of the solder jumpers for this filter configuration Table 4 2 Jumper Settings FOU 7T 39 Standerdinputfiler40 Hz input filter 40 Hz 1 3 Customer specific input filter 1 2 Standard input filter 40 Hz 1 3 Customer specific input filter 4 4 6 Configuration Although two solder jumpers J3
146. l Chapter 5 Analog Modules 5 3 3 Front Panel Layout Red LEDs User Descriptor Fields 5 3 4 Board Overview Component Side LED1 LEDO Optocouplers Opt ptocouplers e EEPROM 15 Page 5 60 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 3 5 Functional Description Figure 5 3 5 1 SM THERM Schematic Diagram LED Driver Thermo Sensor SHIELD LINE a SENSE LINE aE SENSE LINE Multiplexer Impedance Converter A D Converter SUPPLY SENSE LINE External PT100 Sensor 2 wire Cold Junction Input The SM THERM allows four sets of three wire thermocouples to be con nected together with one additional PT100 element used as a cold junction point reference The differential analog input consists of a channel multi plexer operational amplifier voltage feedback impedance converter and a high resolution 16 bit delta sigma converter 1000V system isolation is provided by an optoisolated DC DC converter while system flexibility is provided by 256 bytes of serial EEPROM for ID number production and board specific calibration data Two front panel LEDs show the conversion calibration activity In principle any thermocouple conforming to the DIN43710 or IEC584 specifications can be connected Sensor breakdown recognition is performed by the software which also caters for and corrects absolute temperature readings with a connec
147. l time programming the SMART I O can be used as a micro PLC and as a real time computer system Equipped with the standard real time fieldbus PROFIBUS it allows the use of the SMART I O in a fully transparent real time network architecture This architecture provides open communication between PEP systems and third party I O systems as well as MMI PROFIBUS not only allows I O commu nication but also file transfer remote login and remote debugging facilities SMART I O is designed around the MC68302 CPU from Motorola which has two on chip microprocessors One is the industry standard 68HC000 running at 20MHz and the second is a communication orientated RISC processor Fieldbus protocols use the power of this RISC CPU freeing the 68HC000 for other tasks Communication between the 68HC000 and the communication processor is made using on chip dual ported RAM Nonvola tile memory battery backed SRAM and FLASH memory allows a secure and long term backup of the application program and data Well suited for machinery manufacturers and all OEMs the SMART I O is an ideal companion for VME9000 and IUC9000 systems Connected to gether with these high end VME or IUC computers and PLCs SMART I O allows the decentralization of I O functions through the world wide accepted PROFIBUS fieldbus SMART I O systems provide more power than dumped remote I O systems since they support local intelligence an IEC1131 3 programming environ ment as well as
148. lar Computers GmbH March 12 1996 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 1 SM THERM Programming Flow Diagram START SMADCInit Install Signal Handler OS Intercept SMADCSetSensorType for a channel SMADCEnableRead for a channel SMADCEnableConversion for a channel SMADCSetSignal for a channel SMADCSetCyclicCalib for a channel Sleep 0 SMADCReadConverted for a channel No v Yes SMADCDeinit END u March 12 1996 1996 PEP Modular Computers GmbH Page 5 67 SMART I O User s Manual Chapter 5 Analog Modules 5 3 8 2 SMADCInit Syntax error code SMADCInit u_ints POortNr Description This function initializes the SM THERM Module on port PortNr and identifies boards supported by this library provides an internal list of known sensors contact PEP Modular Computers for advice on sensors not included in this list creates or links the data module for communication with HW task the module name is ADC Data starts the task accessing the Hardware HW task prepares parameters depending on the used SM THERM module Input u int8 PortNr Port number of module to initialize from 0 to 10 Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected
149. large enough to store the data Input u int8 PortNr Port number to fetch the mode 0 to 10 u int8 channel Number of specified channel 0 to 3 u int8 pBuffer Pointer to a user defined buffer Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCGetMode 0 1 amp Buffer Page 5 76 1996 PEP Modular Computers GmbH March 12 1996 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 Input u int8 PortNr Port number of SM THERM to set the signal from 0 to 10 u int8 channel Number of specified channel 0 to 3 process id procID ID of the process to send the signal to signal code sigCode Signal code to be sent Output Grror eode SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified E SIGNAL Illegal signal code used it must be 0x100 or standard OS 9 e
150. lowed 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 e Start the ZSA Terminal program e Switch on the power supply to the SMART I O three green LEDs should illuminate on the control panel not the SMART Modules The terminal should display the messages shown in figure 1 5 3 2 Terminal ISAWDS TRM Datei Bearbeiten Einstellungen Telefon bertragung Hilfe 0S 9 68K System Bootstrap Found 0S 9 kernel module at 00C018018 Software configuration ISaGRAF v3 02 I1 0 Profibus U3 12 12 0 Created 16 Nou 95 setenu HOME dd makdir dd SVS makdir can t make dd SVS Error 000 218 makdir dd CMDS makdir can t make dd CMDS Error 000 218 makdir dd APL makdir can t make dd RPL Error 000 218 echo super user 0 0 130 dd CMDS dd shell gt dd SYS password chx dd cmds dd startup shell can t execute dd startup Error 000 216 chd dd APL ex startprg t s p isatst t term lt gt gt gt nil amp sleep s 2 ex isakersm lt gt gt gt nil a 16 Application ER Enr Ree _systom _deltsens___ A Figure 1 5 3 2 Power Up Messages Page 24 1996 PEP Modular Computers GmbH March 12
151. ls to remain independent and only 14 such terminals are available the common Vcc and GND lines have been grouped Hence each pair of outputs is coupled to one Vcc line and to each pair of Vcc lines is one ground Warning Individual outputs should not be cascaded as it cannot be guaranteed that power sharing will be proportional due to the transistor characteristics u March 12 1996 1996 PEP Modular Computers GmbH Page 4 21 SMART I O User s Manual Chapter 4 Digital Modules 4 2 6 Configuration There are no jumpers to configure on the SM DOUTI 4 2 7 Pinouts Screw Terminal Pinouts The following shows the pinout signal relationship for the SM DOUTI when connected to a particular screw terminal block Pin 1 Pin 13 o o o o o o AOAO ALD 522553 Pin 2 Pin 14 Pin Nr Signal Description Pin Nr Signal Description 5 on Oupui 6 Our Outputs Output 7 Ve3EXT Vecforchannels2 amp 3 8 V67EXT Vcc for channels 8 amp 7 9 OUT oup 10 OUT Outputs Page 4 22 1996 PEP Modular Computers GmbH March 12 1996 Chapter 4 Digital Modules SMART I O User s Manual Vcc Common 24V VO1EXT Connection O Vcc 24V Pin 13
152. lsius respectively Page 5 56 1996 PEP Modular Computers GmbH March 12 1996 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 pro grammed to be The syntax of the operate call is as follows Syntax return variable OPERATE lt source var COMMAND source data Here the return variable is assigned a value associated with the selected COMMAND parameter Each SMART Module possesses its own set of these COMMANDS Example lt error code gt OPERATE lt channel gt O INII CODE Q0 O_INIT_CODE 1s one of a number of distinct commands recognized by the PEP Modular Computers implementation of board drivers and checks for example that the board 1s located where the program expects it to be 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 other wise it returns a non zero value depending on the error encountered A list of these error codes may be found in the PEP online help u March 12 1996 1996 PEP Modular Computers GmbH Page 5 57
153. ltage R 3900 of 5V emanating from the PROFIBUS connector pin 6 the following resistor values are recommended R 1500 T RXD R 150Q 2 min 0 25W T RxD R 390Q 2 min 0 25W R 390Q 2 min 0 25W R 3900 Aux GND 2 5 7 SPI Connector ST7 The SPI connector is a 2x5 standard pinrow connector located on the right hand side of the SMART BASE to enable easy connection of the SMART EXT module using a flat ribbon cable connection Pin Nr Signal Pin Nr Signal 1 System VCC 2 Serial RxD i Pin 2 3 System VCC 4 Serial TxD Serial Ext Select 6 Serial CLK mE System GND 8 eet Serial Ext Interrupt SMART BASE EM EUIS RM Controller VO IRQ4 Page 2 16 1996 PEP Modular Computers GmbH March 12 1996 Chapter 2 SMART BASE SMART I O User s Manual 1 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 e Prototypes are to be found in the file BSP SMART DEFS SMAC R 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 The examples provided here are primarily concerned with the timer counter Other aspects of SMART BASE programming may be found in the Ad va
154. lustrates the Installation Start up screen New components must be installed with ISaGRAF 3 00 executable files Enter the pathname of the ISaGRAF directory if workbench is not installed on the standard ISAWIN architecture COMPLETE OFEN SYSTEMS Figure 1 5 3 1 The Installation Start up Screen Page 22 1996 PEP Modular Computers GmbH March 12 1996 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 ZSA 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 The installation of the ISaGRAF development tool is now complete and access 1s provided to a full IEC1131 3 programming platform The following sections deal with the application of this tool with the SMART I O and other PEP PLCs Note that C programming is not an option for the SMART I O Starter Kit and if required must be ordered separately through one of the PEP offices or agents u March 12 1996 1996 PEP Modular Computers GmbH Page 1 23 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 fol
155. marked with an asterisk in figure 4 1 6 1 need not necessarily be SMD Refer to the Board Overview solder side for the approximate position of these jumpers It should be noted that when calculating component values for a specific filter the capacitor resistor relationship is almost linear Therefore it is suggested that only the capacitor should be changed Hence for a doubling of filter fre quency input the value of the capacitor should be reduced by half u March 12 1996 1996 PEP Modular Computers GmbH Page 4 9 SMART I O User s Manual Chapter 4 Digital Modules 4 1 7 Pinouts Screw Terminal Pinouts The following shows the pinout signal relationship for the SM DINI when connected to a particular screw terminal block Pin 1 Pin 13 o o 00 0 AL ALAG 522553 Pin 2 Pin 14 Signal Description Signal Description GOEXT GND for channel 0 Input Channel 0 INT Input Channel 1 IN Input Channel 2 Input Channel 3 G23EXT GND for channels 2 amp 3 Input Channel 6 Input Channel 7 G67EXT GND for channels 6 amp 7 Pin Nr H RSC 7 GIEXT_ GND for channel 8 GSEXT_ GND for channels 9 m2 Page 4 10 1996 PEP Modular Computers GmbH March 12 1996 Chapter 4 Digital Modules SMART I O User s Manual
156. n loop checking on the current version of the SM ADCI The syntax 1s as follows analog var OPERATE iovar O ENABLE LINE CHECK Var S where analog var represents the analog return variable and can be zero 1f the operate call is supported and the correct iovar is passed or non zero if an error occurred xovar is the variable name for the channel where the operate call is to take effect lt var gt is not used O DISABLE LINE CHECK This operate call allows the user to disable open loop checking on the current version of the SM ADCI The syntax 1s as follows analog var OPERATE iovar O DISABLE LINE CHECK SVO where analog var represents the analog return variable and can be zero 1f the operate call is supported and the correct iovar is passed or non zero if an error occurred LOVE is the variable name for the channel where the operate call is to take effect lt var gt is not used Page 5 104 1996 PEP Modular Computers GmbH October 01 1996 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 ADCI The syntax is as follows analog var OPERATE iovar O SET LINE LIMIT lt var gt where analog var represents the analog return variable and can be zero 1f the operate call 1s supported and the correct iovar is passed or no
157. n explained O SET LED This operate call allows the user to control the two red LEDs on the board s front panel The syntax is as follows analog war OPERATE i10var O SET LED var where analog var represents the analog return variable and can be zero 1f the operate call 1s supported and the correct var is passed or non zero if an error occurred lt iovar gt represents any module variable and lt var gt represents the LED to be controlled and must be one of OA_LED1_ON OA LED2 ON OA LED1 OFF or OA LED2 OFF O ENABLE CONV This operate calls tells ISaGRAF to enable the conversion of a particular channel of a connected SM DACI module The syntax 1s as follows analog var OPERATE i0var O ENABLE CONV 0 where analog var represents the analog return variable and can be zero if the operate call 1s supported and the correct iovar 1s passed or non zero if an error occurred lt iovar gt is the variable name for the channel where the operate call is to take effect October 01 1996 1996 PEP Modular Computers GmbH Page 5 125 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 DACI I module The syntax is as follows analog var e OPERATE iovar O DISABLE CONV 0 where analog var represents the analog return variable and can be zero if the op
158. n or offset correction The result is always a signed integer value Input u int8 PortNr SM Port to be accessed inte Channel Number of the ADC input channel to access 0 3 int16 pValue Pointer to the location where the conversion result will be stored Output error code 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 Example RetVal SMADC1GetVRaw 0 2 OxO7 FF Value 16 bit HEX Unipolar Bipolar Positive Full Scale Positive Full Scale 1LSB HL 0000 1LSB Negative Full Scale Page 5 96 1996 PEP Modular Computers GmbH October 01 1996 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 intl16 pValue Description This function fetches the conversion result of a selected channel A gain and offset correction 1s performed and the result stored as a signed integer value Input u into PorcNr SM Port to be accessed u_int8 Channel Number of the ADC input channel to access 0 3 int16 pValue Pointer to the location where the conversion result will be stored Output error code 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 Example RetVal SMADC1GetV 0 2 OxOYFF
159. n zero if an error occurred lt iovar gt is the variable name for the channel where the operate call is to take effect lt var gt is the current value in mA and calculated using the following formula var OxFFFO mA 0x14 O GET LINE STATE This operate call allows the user to check the line state on the current version of the SM ADCI The syntax 1s as follows analog var OPERATE iovar O GET LINE STATE lt var gt where lt analog var gt represents the analog return variable and is zero if an open loop is detected Otherwise it returns 1 lt iovar gt is the variable name for the channel where the operate call is to take effect lt Var gt is not used u October 01 1996 1996 PEP Modular Computers GmbH Page 5 105 SMART I O User s Manual Chapter 5 Analog Modules r This page has been left blank intentionally Page 5 106 1996 PEP Modular Computers GmbH October 01 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 5 SM DACITI 5 5 1 Introduction The SM DACI 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 calibra tion data required by the signal converter A version of the SM DAC1 for current output 0 20mA is also available 5 5 2 Specifications 1 0 kV Optoisolated from the system 2 6 Outputs Output Range 10V D
160. nced User s guide u March 12 1996 1996 PEP Modular Computers GmbH Page 2 17 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 configu rations utilizing the 6MHz internal counter timer clock Input u int8 mode This represents the four input configurations They are MODEOO The Simple I O TIN input pin carries the Simple I O and the CLK and prescaler are used The prescaler 1s decremented on the falling transition of the clock pin the 24 bit counter is decremented rolls over or is loaded from the counter preload registers when the prescaler rolls over from 00 to SIE MODEO1 The Simple I O TIN serves as a timer input and the CLK and prescaler are used The prescaler and counter are decremented as in MODEO0 MODE10 The Simple I O TIN pin serves as a timer input and the prescaler is used The prescaler is decremented following the rising transition of the TIN pin after being synchronized with the internal clock The 24 bit counter is decremented rolls over or 1s loaded from the counter preload registers when the prescaler rolls over from 00 to 1F Page 2 18 1996 PEP Modular Computers GmbH March 12 1996 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
161. nd 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 2 Specifications 4 PT100 groups 4 wire connection supported Open Sensor Detection Self Calibration Overvoltage Protection 25V power connected 85V power disconnected Temperature Range 200 C to 850 C Temperature Drift 1 LSB C not compensated Conversion Time typ 125 ms max 500 ms depends on filter settings Input Impedance 10 MO min Resolution 16 bit Absolute Accuracy 0 2 C sensor errors excluded Linearization by software 256 bit serial EEPROM for Calibration Data 2 Red LEDs 350mW min 450mW max Standard 0 C to 70 C Extended 40 C to 85 C 40g 60 read by the SPI Interface u March 12 1996 1996 PEP Modular Computers GmbH Page 5 29 SMART I O User s Manual Chapter 5 Analog Modules 5 2 3 Front Panel Layout Red LEDs User Descriptor Fields 5 2 4 Board Overview Component Side LED 1 LEDO Optocouplers Opt e ptocouplers e EEPROM 15 Page 5 30 1996 PEP Modular Computers GmbH March 12 1996 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 ER Ir K e x System Inter
162. nual 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 The syntax of the operate call is as follows Syntax return variable OPERATE lt source var COMMAND source data Here the return variable is assigned a value associated with the selected COMMAND parameter number of these COMMANDS exist for the SMART BASE Example lt error code gt OPERATE lt channel gt INIT CODE 0 O INIT CODE is one of a number of distinct commands recognized by the PEP Modular Computers implementation of board drivers and checks for example that SMART Module 1s located where the program expects it to be channel provides channel specific information and in the example shown here any of the input channels may be used The last parameter is not usually used by PEP implementations and 1s set to 0 zero The error code returns a value of zero if no error was detected other wise it returns a non zero value depending on the error encountered A list of these error codes may be found in the PEP online help u March 12 1996 1996 PEP Modular Computers GmbH Page 2 33 SMART I O User s Manual Chapter 2 SMART BASE r A complete list of the operate COMMANDS may be obtained by selecting a project
163. ock diagram of TIN Figure 2 5 3 1 Timer I O TIN Schematic Vcc 24V es eg Dee v Low l Input l Digital Timer I O 3 Circuit x p TIN Gnd common Vcc 24V 1 zl GATE A Em eet LOW x Pass i i Filter Gnd common The I O Controller timer is used for the generation of the TOUT and TIN functions with the three timer I O lines being fully isolated from the system The internal clock of the timer counter is 6MHz and can be prescaled to enable lower frequencies as necessary With the GATE permanently active relay closed every pulse detected on the TIN line will be acknowledged up to a frequency of 20kHz Otherwise TIN will only be recognized for the duration that the GATE is active u March 12 1996 1996 PEP Modular Computers GmbH Page 2 13 SMART I O User s Manual Chapter 2 SMART BASE r 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 square wave pulses from 0 2ms to 178ms and can deliver 500mA continuously at 24V DC The maximum frequency of TOUT 1s 5kHz Figure 2 5 3 2 Timer I O TOUT Schematic
164. odes positions of rotating axis to be continuously monitored The greatest advantage of the SSI communication process compared to that of standard serial parallel procedures is that the controller actually regulates the timing and speed of the data transmission which further optimizes data security Simplicity in design with low conventional component count coupled with the inherent safety offered through accurate axis position reading even after power fail enable this compact module to be utilized for equipment operat ing even in extreme environmental conditions u October 01 1996 1996 PEP Modular Computers GmbH Page 6 19 SMART I O User s Manual Chapter 6 Communications Modules r 6 2 6 SSI Operation With reference to figures 6 2 6 1 and 6 2 6 2 the operation of the SSI inter face will be discussed The position of the encoder disk 1s 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 1 SM SSI Timing Diagram PF pr 9 6 ft Clock Tp LPL LP La Le i td tm Serial Data E m a Gn oni Q G1 alo Monoflop P S E Parallel Data m 1 m m 1 m Stored parallel data T SSI clock period td Delay time for the first clock GO
165. odules 5 4 8 7 SMADC1DelInit Syntax error code SMADC1DeInit u_int8 PortNr Description This function deinitialises the SM ADCI 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 SM Port number to de initialise from 0 to 10 Output error code SUCCRSS E SEEK if module not initialised or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADC1DeInit 0 Page 5 100 1996 PEP Modular Computers GmbH October 01 1996 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 Remember this logical address 1s the same as the physical slot position In the example shown here the board being addressed is in slot 3 1 e the third 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 u October 01 1996 1996 PEP Modular Computers GmbH Page 5 101 SMART I O User s Manual Chapter 5 Analog Modules 5 4 9 2 The
166. ontain the module ID number and production data although space has been allocated for future use u March 12 1996 1996 PEP Modular Computers GmbH Page 4 35 SMART I O User s Manual Chapter 4 Digital Modules 4 3 6 Configuration Jumper J1 EEPROM Protection Jumper Settings Description J1 se 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 13 65505606 N A o e Ze Pin 2 Pin 14 o o Pin Nr Signal Description Pin Nr Signal Description Relay 0 Common Conn NOT NORelay 1 Con 4 COM Relay 1 Common Conn NO2 N ORelay2Con LB COW2__ Relay 2 Common Conn INOS N O Relay 3 Conn 8 COMS3 Relay 3 Common Conn 9 NO N O Relay 4 Conn COM4 Relay 4 Common Conn N O Relay 5 Conn COM5 Relay 5 Common Conn VCCEXT External 24V DC VCC GNDEXT External GND Page 4 36 1996 PEP Modular Computers GmbH March 12 1996 Chapter 4 Digital Modules SMART I O User s Manual Connection 4V DC Input Circuit
167. or to using this call if the ctrlx variables have been defined with a value then these will be sent to the SM SSI Module FB SSI SETPOINT This gives the user the possibility to enter a value for the comparator register when testing for a match between the actual read back value and the desired value The compare value should be defined prior to using the call Page 6 36 1996 PEP Modular Computers GmbH October 01 1996 Chapter 6 Communications Modules SMART I O User s Manual PB SSI READ 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 setpoint port ctrx error position statusx October 01 1996 This 1s the register which contains the value of the setpoint which 1s sent to the SSI module with the Command statement The port register is used for setting the port number of the attached SM SSI Module The control register elements for a description of the register please refer to the relevant section appearing earlier If an error occurs then it s value appears in this variable The position of the encoder following a read is recorded in this variable The status register elements for
168. ple shown here the board being addressed is in slot 2 1 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 Module Specific Information UNIPOLAR_bipolar Like all I O board parameters the default is set in upper case lettering Here in this example both outputs of the module are set to function in bipolar mode Hardware jumpers J4 and JS must be set accordingly as it is impossible under ISaGRAF to configure the outputs individually March 12 1996 1996 PEP Modular Computers GmbH Page 5 25 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 The syntax of the operate call is as follows Syntax return variable OPERATE lt source var COMMAND source data Here the return variable is assigned a value associated with the selected COMMAND parameter Each SMART Module possesses its own set of these COMMANDS Example error code OPERATE lt channel gt E INIT CODE 0 O INIT CODE is one of a number of distinct commands recognized by the PEP Modular Computers implementation of board drivers and checks for example that the
169. ported by PEP standard software XON XOFF software protocol is used instead March 12 1996 1996 PEP Modular Computers GmbH Page 6 5 SMART I O User s Manual Chapter 6 Communications Modules 6 1 3 Front Panel Layout Yellow LED Green LED User Descriptor Fields 6 1 4 Board Overview Component Side LED1 LEDO Transceiver Inverter 1 1 15 EEPROM Page 6 6 1996 PEP Modular Computers GmbH March 12 1996 Chapter 6 Communications Modules SMART I O User s Manual 6 1 5 Functional Description Figure 4 3 5 1 SM RS232 Schematic Diagram TxD RxD DTR CTS 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 Additionally a software programmed DTR function can be created with the CTS line being con nected to the interrupt line that is routed to the I O controller of the SMART BASE Although it is beyond the scope of this manual to discuss this con nection PEP Modular Computers can provide advice on its implementation if required The two LEDs on the front panel indicate the status of the RxD and TxD lines ON means that the line is low An on board serial EEPROM currently contains the ID Byte for module recognition and should not be altered In the future other module specific data may be stored to provide more flexibility March 12 1996 1996 PEP Mo
170. r u int8 LedNr Description This function switches on one of the two LEDs fitted to the SM DACI Input int88 PortNr SM Port number to be accessed u_int8 LedNr Number of the LED to switch on 1 2 Output error code 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 Example RetVal SMDACISetLedi 0 2 Page 5 120 1996 PEP Modular Computers GmbH October 01 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 5 8 9 SMDACICIrLed Syntax error code SMDACIClried u_ints PortNr u_ints LedNr Description This function switches off one of the two LEDs fitted to the SM DACI Input into PortNr SM Port number to be accessed u_int8 LedNr Number of the LED to switch off 1 2 Output error Code 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 Example RetVal SMDACICIrLedi 0 2 u October 01 1996 1996 PEP Modular Computers GmbH Page 5 121 SMART I O User s Manual Chapter 5 Analog Modules 5 5 8 10 SMDAC1DelInit Syntax error code SMDAC1DeInit u_int8 PortNr Description This function deinitialises the SM DACI Module on the port PortNr by freeing the resources tied up with it and shuts down the outputs Input u int8 PortNr SM Port number to de initialise from 0 to
171. r Codes Section Example RetVal SMADCGetPrecision 0 1 amp Buffer Page 5 74 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 3 8 9 SMADCSetMode Syntax error code SMADCSetMode u_ints PortNr u ints channel intg 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 Input Ants PortNr Port number to set mode 0 to 10 u_int8 channel Number of specified channel 0 to 3 u_int8 mode Mode of ADC BIPOLAR or UNIPOLAR Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified E BMODE Illegal mode or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCSetMode 0 1 BIPOLA2R u March 12 1996 1996 PEP Modular Computers GmbH Page 5 75 SMART I O User s Manual Chapter 5 Analog Modules 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 1s
172. rd EEPROM stores unique calibra tion data required by the signal converter A version of the SM ADCI for current input 0 20mA is also available 5 4 2 Specifications 1 0 kV Optoisolated from the system 6 Differential Inputs Input Range 10V 0 20mA 12 bit ADC with 1 bit non linearity 10 bit Repeating Accuracy Overvoltage Protection 35V Input Impedance approx 440kQ 1240 10kHz Filter On Chip Ref Voltage 13us Conversion Time 1MHz SCLK 350mW min 450mW max Standard 0 C to 70 C Ext Storage 40 C to 85 C The conversion time applies per channel u October 01 1996 1996 PEP Modular Computers GmbH Page 5 89 SMART I O User s Manual Chapter 5 Analog Modules 5 4 3 Front Panel Layout Red LEDs User Descriptor Fields 5 4 4 Board Overview Optocouplers co Impedance Converter Component Side LED1 LEDO a a ow EPROM Multiplexers Optocouplers L a Page 5 90 1996 PEP Modular Computers GmbH October 01 1996 Chapter 5 Analog Modules SMART I O User s Manual The SM ADCI 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 SV to 15V power requirements for the ADC converter and provides additional system isolation 5 4 5 Functional Description 5 4 5 1 Input Circuitry
173. 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 follow ing xmode lt return gt and finally initialise the device iniz scc3 lt return gt u March 12 1996 1996 PEP Modular Computers GmbH Page 6 15 SMART I O User s Manual Chapter 6 Communications Modules r This page has been left blank intentionally Page 6 16 1996 PEP Modular Computers GmbH March 12 1996 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 2 5 kV optoisolated from the system Input 1 optoisolated SSI channel 24 bit binary or Gray code software configurable RS422 type 2 optoisolated 24V DC digital inputs for common GND and End of Range switches with readback and IRQ support OutputT 2 optoisolated 24V DC 300mA digital outputs for Encoder wf Reset and Encoder Direction 1 optoisolated 24V DC 300mA digital output for Match SSI Interface None Even or Odd software configurable
174. rn variable OPERATE lt source var COMMAND source data Here the return variable is assigned a value associated with the selected COMMAND parameter Each SMART Module possesses its own set of these COMMANDS Example error code OPERATE lt channel gt E INIT CODE 0 O INIT CODE is one of a number of distinct commands recognized by the PEP Modular Computers implementation of board drivers and checks for example that the board is located where the program expects it to be channel provides channel specific information and in the example shown here any of the 8 input channels may be used The last parameter 1s 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 other wise it returns a non zero value depending on the error encountered A list of these error codes may be found in the PEP online help Page 5 86 1996 PEP Modular Computers GmbH March 12 1996 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 O_INIT CODE The syntax and usage have already been explained O ENABLE CONV This operate
175. roup 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 O ENABLE CONV This operate call tells ISaGRAF to enable the conversion of a particular channel of a connected SM ADCI module The syntax is as follows analog var OPERATE iovar O ENABLE CONV 0 where analog var represents the analog return variable and can be zero if the operate call 1s supported and the correct iovar 1s passed or non zero if an error occurred lt iovar gt is the variable name for the channel where the operate call is to take effect O DISABLE CONV This operate call tells ISaGRAF to disable the conversion of a particular channel of a connected SM ADCI module The syntax is as follows lt analog var t OPERATE lt i10var gt O DISABLE CONV 01 where lt analog var gt represents the analog return variable and can be zero if the operate call 1s supported and the correct iovar is passed or non zero if an error occurred iovar is the variable name for the channel where the operate call is to take effect u October 01 1996 1996 PEP Modular Computers GmbH Page 5 103 SMART I O User s Manual Chapter 5 Analog Modules O ENABLE LINE CHECK This operate call allows the user to enable ope
176. rror code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCSetSignal 0 1 0 Ox100 u March 12 1996 1996 PEP Modular Computers GmbH Page 5 77 SMART I O User s Manual Chapter 5 Analog Modules 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 The default values for the attached sensor are substituted here when the sensor type is selected Input Winks PortNr Port number to set gain from 0 to 10 u int8 channel Number of specified channel 0 to 3 u int8 gain Value of gain amplifier 0 to 7 for gain factors from 1 to 128 Output Grror code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified E BMODE Illegal gain value or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCSetGain 0 1 2 gain of 4 Page 5 78 1996 PEP Modular Computers GmbH March 12 1996 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 H into pB uffer Description This function checks if an SM THERM board is fitted on the
177. rs GmbH Page 5 9 SMART I O User s Manual Chapter 5 Analog Modules r 5 1 5 Functional Description The SM DADI 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 1 Input Circuitry The input circuitry of the SM DADI consists of an R C first order low pass filter to prevent noise and signals greater than 10kHz from entering the system a 1 4 channel multiplexer followed by a differential amplifier divider and a 12 bit fast analog to digital converter ADC Figure 5 1 5 1 SM DAD1 Input Schematic Diagram Voltage Low Pass Input System Source e Filter Amplifier Interface 10 10V I Single Ended Taa The ADC using successive approximation and input track and hold is referenced by its own on chip voltage source supplying 4 096V To cater for bipolar full scale inputs this reference source is split 2 048V 2 048V The incoming voltage signals are multiplexed and reduced via a 1 5 divider network so that the ADC is supplied with a scalable input voltage range Page 5 10 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual The digital to analog converter DAC section consists of a
178. s ST5 and BU1 A 10 wire flat cable is soldered directly on the left hand side of the board BU 1 that interfaces the SMART BASE module or other earlier cascaded SMART EXT modules Pinouts for this 10 pin connector Signal Pin Nr System VCC 45V Serial RxD from SMART BASE Pin Nr 5V System VCC 5V Serial TxD from SMART BASE Serial Ext Select 6 Serial CLK from SMART BASE ES l System GND Reset Power ON OFF Serial Ext Interrupt eae 10 BU anita 1st Module only 10 ST5 Note Pin 10 of BUI is only useful on the first SMART EXT connected to the SMART BASE For this reason SMART Modules utilizing this feature can only be connected to the first slot of the first extension unit March 12 1996 1996 PEP Modular Computers GmbH Page3 9 SMART I O User s Manual Chapter 3 SMART EXT r This page has been left blank intentionally Page 3 10 1996 PEP Modular Computers GmbH March 12 1996 Digital Modules SMART I O User s Manual e Digital Modules DW 08 Jan 98 Manual ID 09901 Rev Index 0500 Page 4 1 SMART I O User s Manual Digital Modules Table of Contents Chapter EARS ES WE 4 5 4 1 1 Introduction 4 5 4 1 2 Specifications 22200 ae aao see 4 5 4 1 3 Front Panel Layout eesessssss 4 6 4 1 4 Board Overview esseeeseeeennee 4 7 4 1 5 Functional Description
179. s allocates the requested resources and should be noted that it 1s not designed for multi tasking Furthermore this function needs to be called for each SM DACI Module called within the task Upon completion of the application the function SMDAC I Delnit needs to be called for each SM DACI Module that has been initialised In order to illustrate the use of the SM DAC1 library an application example called demodacl c can be found in the SMART I O application directory normally found in device APPLIC SMART CMDS October 01 1996 1996 PEP Modular Computers GmbH Page 5 113 SMART I O User s Manual Chapter 5 Analog Modules 5 5 8 2 SMDACIInit Syntax error code SMDAClIInit u int8 POrENr Description This function initialises the SM DACI Module on port PortNr and tests the module s ID reads the conversion table held in EEPROM allocates space for the fetched resources Input u int8 PortNr Port number of module to initialise from 0 to 10 Output error code SUCCESS Of E BMODE if wrong or no module E MEMFUL if no memory resources available or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMDACIInit 0 Page 5 114 1996 PEP Modular Computers GmbH October 01 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 5 8 3 SMDACIOpenLoop Syntax error code SMDAC1OpenLoop u_int8 PortNr u int8 potacus Description This function shoul
180. s unknown or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMAClOperate 0 Page 5 116 1996 PEP Modular Computers GmbH October 01 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 5 8 5 SMDAC1StandBy Syntax error code SMDACIStandBy 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 ints PortNr SM Port number to be accessed Output error Code 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 Example RetVal SMDACIStandBy 0 u October 01 1996 1996 PEP Modular Computers GmbH Page 5 117 SMART I O User s Manual Chapter 5 Analog Modules 5 5 8 6 SMDAC1PutVRaw Syntax error code SMDACIPutVRaw 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 1s performed and the given value will always be masked to a 12 bit value Input u int8 PortNr SM Port number to be accessed u int8 Channel Number of the DAC output channel to access 0 5 u_int16 Value Value to be written Output error code SUCCESS E SEEK if module was not initialized E BMODE if the module is unknown or standard OS 9 error code refer to t
181. scription 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 1s large enough to store the data Input u int8 PortNr Port number from which the input is read from 0 to 10 u int8 channel Number of the channel to be read 0 to 3 double pBuffer Pointer to a user defined buffer Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified E NOTRDY If no data is available at the moment or the sensor is defect wait or poll the input or check sensor or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCReadConverted 0 1 amp Buffer u March 12 1996 1996 PEP Modular Computers GmbH Page 5 83 SMART I O User s Manual Chapter 5 Analog Modules 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 intg POF NE Number of the port to de initialize Output Grror code SUCCESS or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCDeinit 0 Page 5 84 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 3 9 ISaGRAF Programming 5 3
182. sensor type is not known or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCSetSensorType 0 1 PT100 Page 5 42 1996 PEP Modular Computers GmbH March 12 1996 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 intl16 pBuffer Description This function checks if an SM PT100 board 1s 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 A list of PEP supported sensor types can be found in the file inear h Input u int8 PortNr Port number from which to fetch sensor type from 0 to 10 u int8 channel Number of specified channel 0 to 3 u intl6 pBuffer Pointer to a user defined buffer Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCGetSensorType 0 1 amp Buffer u March 12 1996 1996 PEP Modular Computers GmbH Page 5 43 SMART I O User s Manual Chapter 5 Analog Modules 5 2 8 7 SMADCSetPrecision Syntax error code SMADCSetPrecision u int8 PortNr u_int8 channel
183. system digital input This filter is factory set on all channels but may be altered to a value according to customer specifications The LED driver activates the relevant LED when the input exceeds 10V DC As previously mentioned the last channel is capable of issuing IRQx inter rupts when enabled by software This interrupt will only be acknowledged under OS 9 if the module is on the SMART BASE or occupies the first slot of the first attached SMART EXT unit This channel is factory set at 200Hz but higher frequencies may be catered for The table below shows the solder jumper settings for this filter configuration J1 1 2 Standard input filter 200Hz 1 3 Customer specific input filter J2 1 2 Standard input filter 200Hz 1 3 Customer specific input filter Page4 8 1996 PEP Modular Computers GmbH March 12 1996 Chapter 4 Digital Modules SMART I O User s Manual e Although two solder jumpers exist on the board J1 and J2 they should remain at their factory settings unless a user specific filter 1s 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 4 1 6 Configuration Figure 4 1 6 1 SM DINI Configurable Filter Ver 36k IC10 surface Mounted Devices SMD are used in the production of the SM DINI modules The components to be changed
184. t 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 SMSSIDeInit 0 u October 01 1996 1996 PEP Modular Computers GmbH Page 6 31 SMART I O User s Manual Chapter 6 Communications Modules 6 2 12 4 SMSSISetSetPoint Syntax error code SMSSISert5oertPornt u into PortNr u intos Ser oornt s Description This function copies the setpoint to an internal register which will only be sent to the SM SSI when the function SMSSISetCtriReg is called This function is used to set the preset value for the comparator if testing for a match Input u int8 PortNr Number of the SM port to set int352 Setpoint Value of the comparator register 0x0 gt OxFFFFFF 24 bit Output error code SUCCESS E BMODE if the module 1s unknown or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMSSISetSetPoint 0 OxFFOOFFE Page 6 32 1996 PEP Modular Computers GmbH October 01 1996 Chapter 6 Communications Modules SMART I O User s Manual 6 2 12 5 SMSSISetCtriReg Syntax error_code SMSSTSetCtrlReg u_int8 PortNr long CtrlRegl 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 lt gt 1 and sends them to the SM SSI Simultane ously the contents of th
185. ta from a channel the function SMADCEnableRead must be called As soon as the HW task has received data from this channel a flag is set indicating a valid RAW value Now the user s application 1s able to read this value by using the function SMADCReadRaw Page 5 36 1996 PEP Modular Computers GmbH March 12 1996 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 per formed by the HW task The user also has the facility to force the HW task to execute a calibration cycle by calling either SMADCCalibrate for one calibration or SMADCSetCyclicCalib Then a calibration is executed if a user defined interval has expired Deinitialization If the task calling the SMADC library function finishes the function SMADCDelnit should be called by this task to free memory and resources otherwise tied up with the application Other Functions For more information on other functions refer to the description of the functions later in this document or the example demoadc c LEDs Both LEDs on the SM PT100 module are
186. ted cold junction point PT100 u March 12 1996 1996 PEP Modular Computers GmbH Page 5 61 SMART I O User s Manual Chapter 5 Analog Modules 5 3 6 Configuration Jumper J1 EEPROM Protection Jumper Settings Description J1 se 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 o o o o O veo rle Ze T Pin 2 Pin 14 Pin Nr Signal Description Pin Nr Signal Description 1 AGND Analog Shield 2 AGND AndogSheld 3 mo Positive Sense Line 0 4 mi _ Positive Sense Line U 5 n0 Negative Sense Line 0 6 In 1 Negative Sense Line 1 _ L 7 MP 1 PT100 Cold Jn supply 8 TMP t PT100 Cold Jn supply 9 n2 Positive Sense Line 2j 10 in Positive Sense Line 3 11 m2 Negative Sense Line 2 12 m3 Negative Sense Line 3 _ 13 AGND Analog Shield 14 AND Analog Shield T Cold Junction point PT100 connection Page 5 62 1996 PEP Modular Computers GmbH March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual
187. tery must not exceed 70 C due to the risk of battery damage For SMART I O modules with extended temperature ranges of up to 85 C a special lithium battery must be fitted to the SMPBBAT u March 12 1996 1996 PEP Modular Computers GmbH Page 1 17 SMART I O User s Manual Introduction r 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 command on the Disk menu in the File Manager to create backup disks with the original volume labels and disk contents If it is intended to install ISaGRAF in a directory other than the default C ISAWIN then remember to provide the full path of the new directory when prompted during installation Altogether 10 DOS disks and 2 OS 9 disks are supplied for ISaGRAF installation four for the Workbench two composite and four for the ISaGRAF Target and are labelled Workbench Disk 1 4 Workbench Disk 2 4 Workbench Disk 3 4 Workbench Disk 4 4 Lib Appli Help Disk 1 2 Lib Appli Help Disk 2 2 Samples for OS 9 1 1 Target Disk 1 2 for DOS Target
188. the consequences thereof nor for any liability arising from the use or application of any circuit product or example shown in this document PEP Modular Computers reserve the right to change modify or improve this document or the product described herein as seen fit by PEP Modular Comput Page 0 4 Manual ID 09901 Rev Index 0500 08 Jan 98 SMART LO User s Manual Preface e 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 eo eo Before installing your new PEP product into a system please always switch off your power mains This applies also to installing piggybacks In order to maintain PEP s product warranty please do not alter or mod ify this product in any way Changes or modifications to the device which are not explicitly approved by PEP Modular Computers and described in this manual or received from PEP Technical Support as a special handling instruction will void your warranty This device should only be installed in or connected to systems that ful fill all necessary technical and specific environmental requirements This applies also to the operational temperature range of the specific board version which must not be ex
189. ts with current sensing for broken sensor detection SMART Module with 6 12 bit 10V optoisolated analog outputs SMART Module with 6 12 bit 0 20mA optoisolated analog outputs with current sensing for broken sensor detection SMART BASE SMART BASE SMART EXT All SM Modules are delivered without screw terminals March 12 1996 1996 PEP Modular Computers GmbH Page 1 9 SMART I O User s Manual Introduction ROM kit v3 x for SMART I O enables the generation of custom firmware EPROMs Platform can be a PC or OS 9 development system Target CPU kit for SMART I O OS 9 v3 x Ix x disks 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 OS 9 68000 FasTrak for UNIX development pack for SMART I O OS9DEVFT Contains extended OS 9 v3 x Ix x PEP utilities and I O drivers with UNIX SMART necessary makefiles for complete application and EPROM generation OS 9 PROFIBUS starter kit Il for 1 node Includes license disk and manual OS 9 PROFIBUS starter kit II for 1 node operating under FasTrak for Windows Includes license disk and manual 3 meters with 9 pin D Sub female amp RJ45 connectors for PC operation Cable 3 meters with 25 pin D Sub male amp RJ45 connectors for modem operation ISaGRAF ROM START OS9TRG RG SMART Cable Screw Term For the
190. type is specified or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCEnableConversion 0 1 FALSE u March 12 1996 1996 PEP Modular Computers GmbH Page 5 81 SMART I O User s Manual Chapter 5 Analog Modules 5 3 8 16 SMADCReadRaw Syntax error code SMADCReadRaw u int8 PortNr u int8 channel H intlo pBurrer 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 1n a user defined buffer The user has to take care that the buffer is large enough to store the data Input u int8 PortNr Port number from which raw data 1s to be read from 0 to 10 u int8 channel Number of the channel to be read 0 to 3 u intl16 pBuffer Pointer to a user defined buffer Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified E NOTRDY JIfno data is available at the moment wait or poll the input or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCReadRaw 0 1 amp Buffer Page 5 82 1996 PEP Modular Computers GmbH March 12 1996 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 De
191. ules r 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 Page 4 18 1996 PEP Modular Computers GmbH March 12 1996 Chapter 4 Digital Modules SMART I O User s Manual 4 2 SM DOUTI 4 2 1 Introduction The SM DOUT provides eight optoisolated 24V DC typ digital outputs arranged in 2 independent groups The maximum output switching fre quency 1s 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 The user interface is realized by 8 yellow LEDs 1 per output channel which illuminate when the output is ON 4 2 2 Specifications 2 5 kV optoisolated from the system 8 Digital Channels 2 Independent Groups High Side Switch Common Vcc 500mA Continuous Current per channel Inductive Load Protection clamp diode Power ON OFF Protection Overvoltage Protection 90V 10us 35V Output Voltage 24V DC owitch ON Delay resistive 3us at 24V owitch OFF Delay resistive 130us
192. use longer AD conversion times Input u int8 PortNr Port number to set precision from 0 to 10 u int8 channel Number of specified channel 0 to 3 u int8 precision Resolution of ADC filter value Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified E BMODE Illegal precision value must be within 19 to 2000 or standard OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMADCSetPrecision 0 1 0x100 u March 12 1996 1996 PEP Modular Computers GmbH Page 5 73 SMART I O User s Manual Chapter 5 Analog Modules 5 3 8 8 SMADCGetPrecision Syntax error code SMADCGetPrecision u int8 PortNr u_int8 channel u intl16 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 Input u int8 PortNr Port number from which to get data from 0 to 10 u int8 channel Number of specified channel 0 to 3 u intl6 pBuffer Pointer to a user defined buffer Output error code SUCCESS E MNF If wrong type of module or no module is fitted on the selected port E PARAM If wrong channel number is specified or standard OS 9 error code refer to the OS 9 Technical Manual Erro
193. used to show the status of the HW task LEDI is the upper one LED2 is the lower one LEDI LED2 Staus ADC is not in use Calibration in progress AD conversion in progress Standardization to reference value in progress u March 12 1996 1996 PEP Modular Computers GmbH Page 5 37 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 1 SM PT100 Programming Flow Diagram START SMADCInit Install Signal Handler OS Intercept SMADCSetSensorType for a channel SMADCEnableRead for a channel SMADCEnableConversion for a channel SMADCSetSignal for a channel CO eo ga CH UA SMADCSetCyclicCalib for a channel Sleep 0 SMADCReadConverted for a channel D Yes SMADCDeinit END 38 1996 PEP Modular Computers GmbH No March 12 1996 Chapter 5 Analog Modules SMART I O User s Manual 5 2 8 2 SMADCInit Syntax error code SMADCInit u int8 PortNr Description This function initializes the SM PT100 Module on port PortNr and identifies boards supported by this library provides an internal list of known sensors contact PEP Modular Computers for advice on sensors not included in this list creates or links the data module for communication with HW task the module name is ADC Dat
194. value of the original read Input u int8 PortNr SM Port to be accessed u int8 Channel Number of the ADC input channel to access 0 3 int16 pValue Pointer to the location where the conversion result will be stored Output error code 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 Example RetVal SMDAD1GetV 0 2 OXxO7FF Value 16 bit HEX Unipoar Bipolar Positive Full Scale 0000 LSD SFFFF Page 5 20 1996 PEP Modular Computers GmbH March 12 1996 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 ntl6 Value Description This function sets the selected DAC channel to the chosen value No gain or offset correction 1s performed Input u inte PoreNr SM Port number to be accessed u int8 Channel Number of the DAC output channel to access 0 1 u intl16 Value Value to be written Output error code 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 Example RetVal SMDAD1PutVRaw 0 1 OxOFFF Value 16 bit HEX Unipolar Bipolar Positive Full Scale 0FFF Positive Full Scale 0FFF 1LSB 0001 O 0000 Negative Full Scale 0000
195. ve Sense line 3 negative 400A source for sensor March 12 1996 1996 PEP Modular Computers GmbH Page 5 33 SMART I O User s Manual Chapter 5 Analog Modules Connection PT100 PT100 o o O o CURL IN1 Wi AGND wa Iw Loun PT100 PT100 Input Circuit O 12V Cut MUX 8 1 D Oo 45V 12V 5V 68 k 47 k 5V O us 5V i vf Q412V ne Ind 7 MUX 8 1 L AD508F Ga 12V O 12V O 5V OP213 MUX 8 1 1 2 gt om 12V A Reg jio Td O O 5V 47k 68k sv idi AGND 72 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 e SM PT100 Module Software Requirements The compiler from one of the following Ultra C Version 1 1 2 or higher FasTrak version 2 0 2 or higher The leftmost SM Module has number 0 assigned to it a far as programming is concerned although physically this is slot 1 Before a library function can be used the function SMADCInit must first be called This allocates the
196. x error code SMDINLlGet u 1int S PortNr u_ints burfter 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 O of the buffer represent ing 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 Output error code SUCCESS or OS 9 error code refer to the OS 9 Technical Manual Error Codes Section Example RetVal SMDINIGet 0 buffer Buffer Explanation Bit Value 0 No input or not connected 1 Input Active March 12 1996 1996 PEP Modular Computers GmbH Page 4 15 SMART I O User s Manual Chapter 4 Digital Modules r 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 Remember this logical address 1s the same as the physical slot position In the example shown here the board being addressed is in slot 2 1 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 Page 4 16 1996
197. y 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 The same effect may also be true due to timeslicing during timer stop and start operations Therefore it is recommended that this call be only used for low frequency inputs 1kHz There is no detection for counter overflow and the call should not be used for count down operations or square wave generation It s syntax is as follows RetVar OPERATE iovar O READ COUNTER lt null gt where the lt iovar gt is typically t in O STOP COUNTER This call stops the counter counting up or down and square wave generation and has the following syntax lt RetVar gt OPERATE lt iovar gt O STOP COUNTER lt null gt where the lt iovar gt is typically t in The counter timer is configured automatically as MODEIO refer to the C Programming section and from within ISaGRAF there is no ability to alter this configuration u March 12 1996 1996 PEP Modular Computers GmbH Page 2 35 SMART I O User s Manual Chapter 2 SMART BASE O PRELOAD With this call the counter preload register can be set The syntax is as follows lt RetVar gt OPERATE lt iovar gt O PRELOAD lt prevar gt where the lt iovar gt is typically t 1n and prevar is the value for the preload register which lies between 1 and OXFFFFFF O START CNTDWN
Download Pdf Manuals
Related Search
Related Contents
Modification du dispositif de coupe L`avenir des universités après le vote du 9 février MANUAL_DO_USUARIO_M Samsung DVD-P180 User Manual CR réunion commission du 13 janv 2013 基準表(PDF形式:87KB) 2.5QT CAST IRON STEAMER/HUMIDIFIER ー- 取扱説明書、 本体貼付ラベ丿しなどの注意書に従った Dynabeads Copyright © All rights reserved.
Failed to retrieve file