EN
Official user manual

Pepper Computer RS232

320 pages·3.2 MB·Network Card·PDF·ENDEFRITNLJA
Pepper Computer RS232
Table of Contents 307 sections Preface.pdf · Table of Contents · Unpacking and Special Handling Instructions · Revision History · … ShowHide
Preface.pdfp.1Table of Contentsp.1Unpacking and Special Handling Instructionsp.1Revision Historyp.1PEP Modular Computers Two Year Limited Warrantyp.1General Informationp.132. SMART-BASEp.413. SMART-EXTp.794. Digital Modulesp.15. Analog Modulesp.1576. Communications Modulesp.283Introduction.pdfp.13Table of Contentsp.13General Informationp.15Weights & Measuresp.161.1 Product Overviewp.201.2 Ordering Informationp.211.3 Product Informationp.221.4 Installationp.251.4.1 Overviewp.251.4.2 SMART I/O Module Installationp.271.4.3 RJ45 Telephone Connector Installationp.281.4.4 Screw Terminal Block Installationp.281.4.5 Battery Installationp.291.5 ISaGRAF-Installationp.301.5.1 Before Installingp.301.5.2 Installation of the ISaGRAF for Windows Workbenchp.311.5.3 Installation of PEP Library Functionsp.331.5.4 Demo Applicationp.38SM-BASE.pdfp.41Table of Contentsp.412. SMART-BASEp.432.1 Specificationsp.442.2 Board Overviewp.452.3 Functional Descriptionp.462.4 Configurationp.482.4.1 Jumper J1: Boot Selection (Pin Connector)p.482.4.2 Jumper J6: LED Function (Pin Connector)p.492.5 Pinoutsp.492.5.1 SMART Module Piggyback Connectorsp.502.5.2 Screw Terminal Pinoutsp.522.5.3 Timer I/O Screw Terminal (SCR1)p.522.5.4 Supply Screw Terminals (SCR2)p.542.5.5 RS232 Telephone Connector (BU1)p.552.5.6 RS485 D-Sub Connector for Half-Duplex Operation (Profibus)p.552.5.7 SPI Connector (ST7)p.562.6 ‘C’ Programmingp.572.6.1 SMART-BASE Libraryp.572.6.2 SMTselInp.582.6.3 SMTsettoutp.602.6.4 SMTprep.612.6.5 SMTstastop.632.6.6 SMTrdp.642.6.7 SMTtinp.652.6.8 SMTstatp.662.6.9 SMToutp.672.6.10 SMLedp.682.6.11 SMwdonp.692.6.12 SMwdtrigp.702.6.13 SMwdoffp.712.7 ISaGRAF Programmingp.722.7.1 The ISaGRAF Board Parametersp.722.7.2 The ISaGRAF Operate Callsp.732.8 Flash Utilityp.77SM-EXT.pdfp.79Table Of Contentsp.793. SMART-EXTp.813.1 Specificationsp.813.2 Board Overviewp.823.3 Functional Descriptionp.833.4 Pinoutsp.843.4.1 SMART Module Piggyback Connectorsp.853.4.2 Parallel I/O Screw Terminals (SCRA and SCRB)p.863.4.3 SPI Connectors (ST5 and BU1)p.87Digital.pdfp.1Table of Contentsp.14. Digital Modulesp.934.1 SM-DIN1p.934.1.1 Introductionp.934.1.2 Specificationsp.934.1.3 Front Panel Layoutp.944.1.4 Board Overviewp.954.1.5 Functional Descriptionp.964.1.6 Configurationp.974.1.7 Pinoutsp.984.1.8 ‘C’ Programmingp.1004.1.8.1 SM-DIN1 Libraryp.1004.1.8.2 SMDIN1Initp.1014.1.8.3 SMDIN1DeInitp.1024.1.8.4 SMDIN1Getp.1034.1.9 ISaGRAF Programmingp.1044.1.9.1 The ISaGRAF Board Parametersp.1044.1.9.2 The ISaGRAF Operate Callsp.1054.2 SM-DOUT1p.1074.2.1 Introductionp.1074.2.2 Specificationsp.1074.2.3 Front Panel Layoutp.1084.2.4 Board Overviewp.1084.2.5 Functional Descriptionp.1094.2.6 Configurationp.1104.2.7 Pinoutsp.1104.2.8 ‘C’ Programmingp.1124.2.8.1 SM-DOUT1 Libraryp.1124.2.8.2 SMDOUT1Initp.1134.2.8.3 SMDOUT1DeInitp.1144.2.8.4 SMDOUT1Getp.1154.2.8.5 SMDOUT1Setp.1164.2.9 ISaGRAF Programmingp.1174.2.9.1 The ISaGRAF Board Parametersp.1174.2.9.2 The ISaGRAF Operate Callsp.1184.3 SM-REL1p.1214.3.1 Introductionp.1214.3.2 Specificationsp.1214.3.3 Front Panel Layoutp.1224.3.4 Board Overviewp.1224.3.5 Functional Descriptionp.1234.3.6 Configurationp.1244.3.7 Pinoutsp.1244.3.8 ‘C’ Programmingp.1264.3.8.1 SM-REL1 Libraryp.1264.3.8.2 SMREL1Initp.1274.3.8.3 SMREL1DeInitp.1284.3.8.4 SMREL1Resetp.1294.3.8.5 SMREL1GetRlyp.1304.3.8.6 SMREL1SetRlyp.1314.3.8.7 SMREL1GetLedp.1324.3.8.8 SMREL1SetLedp.1334.3.8.9 SMREL1GetExtVccp.1344.3.9 ISaGRAF Programmingp.1354.3.9.1 The ISaGRAF Board Parametersp.1354.3.9.2 The ISaGRAF Operate Callsp.136Analog.pdfp.157Table of Contentsp.1585. Analog Modulesp.1635.1 SM-DAD1p.1635.1.1 Introductionp.1635.1.2 Specificationsp.1635.1.3 Front Panel Layoutp.1645.1.4 Board Overviewp.1655.1.5 Functional Descriptionp.1665.1.5.1 Input Circuitryp.1665.1.5.2 Output Circuitryp.1675.1.6 Configurationp.1685.1.7 Pinoutsp.1695.1.8 ‘C’ Programmingp.1725.1.8.1 SM-DAD1 Libraryp.1725.1.8.2 SMDAD1Initp.1735.1.8.3 SMDAD1DeInitp.1745.1.8.4 SMDAD1GetVRawp.1755.1.8.5 SMDAD1GetVp.1765.1.8.6 SMDAD1PutVRawp.1775.1.8.7 SMDAD1PutVp.1785.1.8.8 SMDAD1SetLedp.1795.1.8.9 SMDAD1ClrLedp.1805.1.9 ISaGRAF Programmingp.1815.1.9.1 The ISaGRAF Board Parametersp.1815.1.9.2 The ISaGRAF Operate Callsp.1825.2 SM-PT100p.1855.2.1 Introductionp.1855.2.2 Specificationsp.1855.2.3 Front Panel Layoutp.1865.2.4 Board Overviewp.1865.2.5 Functional Descriptionp.1875.2.6 Configurationp.1895.2.7 Pinoutsp.1895.2.8 ‘C’ Programmingp.1915.2.8.1 SM-PT100 Libraryp.1915.2.8.2 SMADCInitp.1955.2.8.3 SMADCCalibratep.1965.2.8.4 SMADCSetCyclicCalibp.1975.2.8.5 SMADCSetSensorTypep.1985.2.8.6 SMADCGetSensorTypep.1995.2.8.7 SMADCSetPrecisionp.2005.2.8.8 SMADCGetPrecisionp.2015.2.8.9 SMADCSetModep.2025.2.8.10 SMADCGetMode 5-47p.2035.2.8.11 SMADCSetSignalp.2045.2.8.12 SMADCSetGainp.2055.2.8.13 SMADCGetGainp.2065.2.8.14 SMADCEnableReadp.2075.2.8.15 SMADCEnableConversionp.2085.2.8.16 SMADCReadRawp.2095.2.8.17 SMADCReadConvertedp.2105.2.8.18 SMADCDeinitp.2115.2.9 ISaGRAF Programmingp.2125.2.9.1 The ISaGRAF Board Parametersp.2125.2.9.2 The ISaGRAF Operate Callsp.2135.3 SM-THERMp.2155.3.1 Introductionp.2155.3.2 Specificationsp.2155.3.3 Front Panel Layoutp.2165.3.4 Board Overviewp.2165.3.5 Functional Descriptionp.2175.3.6 Configurationp.2185.3.7 Pinoutsp.2185.3.8 ‘C’ Programmingp.2205.3.8.1 SM-THERM Libraryp.2205.3.8.2 SMADCInitp.2245.3.8.3 SMADCCalibratep.2255.3.8.4 SMADCSetCyclicCalibp.2265.3.8.5 SMADCSetSensorTypep.2275.3.8.6 SMADCGetSensorTypep.2285.3.8.7 SMADCSetPrecisionp.2295.3.8.8 SMADCGetPrecisionp.2305.3.8.9 SMADCSetMode 5-75p.2315.3.8.10 SMADCGetModep.2325.3.8.11 SMADCSetSignalp.2335.3.8.12 SMADCSetGainp.2345.3.8.13 SMADCGetGainp.2355.3.8.14 SMADCEnableReadp.2365.3.8.15 SMADCEnableConversionp.2375.3.8.16 SMADCReadRawp.2385.3.8.17 SMADCReadConvertedp.2395.3.8.18 SMADCDeinitp.2405.3.9 ISaGRAF Programmingp.2415.3.9.1 The ISaGRAF Board Parametersp.2415.3.9.2 The ISaGRAF Operate Callsp.2425.4 SM-ADC1p.2455.4.1 Introductionp.2455.4.2 Specificationsp.2455.4.3 Front Panel Layoutp.2465.4.4 Board Overviewp.2465.4.5 Functional Descriptionp.2475.4.5.1 Input Circuitryp.2475.4.6 Configurationp.2485.4.7 Pinoutsp.2485.4.8 ‘C’ Programmingp.2505.4.8.1 SM-ADC1 Libraryp.2505.4.8.2 SMADC1Initp.2515.4.8.3 SMADC1GetVRawp.2525.4.8.4 SMADC1GetVp.2535.4.8.5 SMADC1SetLedp.2545.4.8.6 SMADC1ClrLedp.2555.4.8.7 SMADC1DeInitp.2565.4.9 ISaGRAF Programmingp.2575.4.9.1 The ISaGRAF Board Parametersp.2575.4.9.2 The ISaGRAF Operate Callsp.2585.5 SM-DAC1p.2635.5.1 Introductionp.2635.5.2 Specificationsp.2635.5.3 Front Panel Layoutp.2645.5.4 Board Overviewp.2645.5.5 Functional Descriptionp.2655.5.5.1 Output Circuitryp.2655.5.6 Configurationp.2665.5.7 Pinoutsp.2665.5.8 ‘C’ Programmingp.2695.5.8.1 SM-DAC1 Libraryp.2695.5.8.2 SMDAC1Initp.2705.5.8.3 SMDAC1OpenLoopp.2715.5.8.4 SMADAC1Operatep.2725.5.8.5 SMDAC1StandByp.2735.5.8.6 SMDAC1PutVRawp.2745.5.8.7 SMDAC1PutVp.2755.5.8.8 SMDAC1SetLedp.2765.5.8.9 SMDAC1ClrLedp.2775.5.8.10 SMDAC1DeInitp.2785.5.9 ISaGRAF Programmingp.2795.5.9.1 The ISaGRAF Board Parametersp.2795.5.9.2 The ISaGRAF Operate Callsp.280Comms.pdfp.283Table of Contentsp.2846. Communications Modulesp.2876.1 SM-RS232 6p.2876.1.1 Introductionp.2876.1.2 Specificationsp.2876.1.3 Front Panel Layoutp.2886.1.4 Board Overviewp.2886.1.5 Functional Descriptionp.2896.1.6 Configurationp.2906.1.7 Pinoutsp.2906.1.8 ISaGRAF Programmingp.2926.1.8.1 The ISaGRAF Board Parametersp.2926.1.8.2 The ISaGRAF Operate Callsp.2946.1.9 OS-9 Programmingp.2966.2 SM-SSIp.2996.2.1 Introductionp.2996.2.2 Specificationsp.2996.2.3 Front Panel Layoutp.3006.2.4 Board Overviewp.3006.2.5 Functional Descriptionp.3016.2.6 SSI Operationp.3026.2.7 Register Descriptionp.3046.2.7.1 Control Registerp.3046.2.7.2 CTRL1 Registerp.3056.2.7.3 CTRL2 Registerp.3056.2.7.4 CTRL3 Registerp.3056.2.7.5 Compare Registerp.3066.2.7.6 Identification Registerp.3066.2.7.7 Status Registerp.3066.2.7.8 STAT1 Registerp.3066.2.7.9 STAT2 Registerp.3076.2.7.10 Data Registerp.3076.2.8 MATCH Functionp.3086.2.9 Tested Sensorsp.3086.2.10 Configurationp.3096.2.11 Pinoutsp.3096.2.12 ‘C’ Programmingp.3116.2.12.1 SM-SSI Libraryp.3116.2.12.2 SMSSIInitp.3126.2.12.3 SMSSIDeInitp.3136.2.12.4 SMSSISetSetPointp.3146.2.12.5 SMSSISetCtrlRegp.3156.2.12.6 SMSSIGetStatusp.3166.2.12.7 SMSSIGetDatap.3176.2.13 ISaGRAF Programmingp.3186.2.13.1 The ISaGRAF Board Parametersp.318
Page 1 of the Pepper Computer RS232 user manual — Table of Contents
Page 1 · Contents
Contents

Contents

Preface.pdfp.1Table of Contentsp.1Unpacking and Special Handling Instructionsp.1Revision Historyp.1PEP Modular Computers Two Year Limited Warrantyp.1General Informationp.132. SMART-BASEp.413. SMART-EXTp.794. Digital Modulesp.15. Analog Modulesp.1576. Communications Modulesp.283Introduction.pdfp.13Table of Contentsp.13General Informationp.15Weights & Measuresp.161.1 Product Overviewp.201.2 Ordering Informationp.211.3 Product Informationp.221.4 Installationp.251.4.1 Overviewp.251.4.2 SMART I/O Module Installationp.271.4.3 RJ45 Telephone Connector Installationp.281.4.4 Screw Terminal Block Installationp.281.4.5 Battery Installationp.291.5 ISaGRAF-Installationp.301.5.1 Before Installingp.301.5.2 Installation of the ISaGRAF for Windows Workbenchp.311.5.3 Installation of PEP Library Functionsp.331.5.4 Demo Applicationp.38SM-BASE.pdfp.41Table of Contentsp.412. SMART-BASEp.432.1 Specificationsp.442.2 Board Overviewp.452.3 Functional Descriptionp.462.4 Configurationp.482.4.1 Jumper J1: Boot Selection (Pin Connector)p.482.4.2 Jumper J6: LED Function (Pin Connector)p.492.5 Pinoutsp.492.5.1 SMART Module Piggyback Connectorsp.502.5.2 Screw Terminal Pinoutsp.522.5.3 Timer I/O Screw Terminal (SCR1)p.522.5.4 Supply Screw Terminals (SCR2)p.542.5.5 RS232 Telephone Connector (BU1)p.552.5.6 RS485 D-Sub Connector for Half-Duplex Operation (Profibus)p.552.5.7 SPI Connector (ST7)p.562.6 ‘C’ Programmingp.572.6.1 SMART-BASE Libraryp.572.6.2 SMTselInp.582.6.3 SMTsettoutp.602.6.4 SMTprep.612.6.5 SMTstastop.632.6.6 SMTrdp.642.6.7 SMTtinp.652.6.8 SMTstatp.662.6.9 SMToutp.672.6.10 SMLedp.682.6.11 SMwdonp.692.6.12 SMwdtrigp.702.6.13 SMwdoffp.712.7 ISaGRAF Programmingp.722.7.1 The ISaGRAF Board Parametersp.722.7.2 The ISaGRAF Operate Callsp.732.8 Flash Utilityp.77SM-EXT.pdfp.79Table Of Contentsp.793. SMART-EXTp.813.1 Specificationsp.813.2 Board Overviewp.823.3 Functional Descriptionp.833.4 Pinoutsp.843.4.1 SMART Module Piggyback Connectorsp.853.4.2 Parallel I/O Screw Terminals (SCRA and SCRB)p.863.4.3 SPI Connectors (ST5 and BU1)p.87Digital.pdfp.1Table of Contentsp.14. Digital Modulesp.934.1 SM-DIN1p.934.1.1 Introductionp.934.1.2 Specificationsp.934.1.3 Front Panel Layoutp.944.1.4 Board Overviewp.954.1.5 Functional Descriptionp.964.1.6 Configurationp.974.1.7 Pinoutsp.984.1.8 ‘C’ Programmingp.1004.1.8.1 SM-DIN1 Libraryp.1004.1.8.2 SMDIN1Initp.1014.1.8.3 SMDIN1DeInitp.1024.1.8.4 SMDIN1Getp.1034.1.9 ISaGRAF Programmingp.1044.1.9.1 The ISaGRAF Board Parametersp.1044.1.9.2 The ISaGRAF Operate Callsp.1054.2 SM-DOUT1p.1074.2.1 Introductionp.1074.2.2 Specificationsp.1074.2.3 Front Panel Layoutp.1084.2.4 Board Overviewp.1084.2.5 Functional Descriptionp.1094.2.6 Configurationp.1104.2.7 Pinoutsp.1104.2.8 ‘C’ Programmingp.1124.2.8.1 SM-DOUT1 Libraryp.1124.2.8.2 SMDOUT1Initp.1134.2.8.3 SMDOUT1DeInitp.1144.2.8.4 SMDOUT1Getp.1154.2.8.5 SMDOUT1Setp.1164.2.9 ISaGRAF Programmingp.1174.2.9.1 The ISaGRAF Board Parametersp.1174.2.9.2 The ISaGRAF Operate Callsp.1184.3 SM-REL1p.1214.3.1 Introductionp.1214.3.2 Specificationsp.1214.3.3 Front Panel Layoutp.1224.3.4 Board Overviewp.1224.3.5 Functional Descriptionp.1234.3.6 Configurationp.1244.3.7 Pinoutsp.1244.3.8 ‘C’ Programmingp.1264.3.8.1 SM-REL1 Libraryp.1264.3.8.2 SMREL1Initp.1274.3.8.3 SMREL1DeInitp.1284.3.8.4 SMREL1Resetp.1294.3.8.5 SMREL1GetRlyp.1304.3.8.6 SMREL1SetRlyp.1314.3.8.7 SMREL1GetLedp.1324.3.8.8 SMREL1SetLedp.1334.3.8.9 SMREL1GetExtVccp.1344.3.9 ISaGRAF Programmingp.1354.3.9.1 The ISaGRAF Board Parametersp.1354.3.9.2 The ISaGRAF Operate Callsp.136Analog.pdfp.157Table of Contentsp.1585. Analog Modulesp.1635.1 SM-DAD1p.1635.1.1 Introductionp.1635.1.2 Specificationsp.1635.1.3 Front Panel Layoutp.1645.1.4 Board Overviewp.1655.1.5 Functional Descriptionp.1665.1.5.1 Input Circuitryp.1665.1.5.2 Output Circuitryp.1675.1.6 Configurationp.1685.1.7 Pinoutsp.1695.1.8 ‘C’ Programmingp.1725.1.8.1 SM-DAD1 Libraryp.1725.1.8.2 SMDAD1Initp.1735.1.8.3 SMDAD1DeInitp.1745.1.8.4 SMDAD1GetVRawp.1755.1.8.5 SMDAD1GetVp.1765.1.8.6 SMDAD1PutVRawp.1775.1.8.7 SMDAD1PutVp.1785.1.8.8 SMDAD1SetLedp.1795.1.8.9 SMDAD1ClrLedp.1805.1.9 ISaGRAF Programmingp.1815.1.9.1 The ISaGRAF Board Parametersp.1815.1.9.2 The ISaGRAF Operate Callsp.1825.2 SM-PT100p.1855.2.1 Introductionp.1855.2.2 Specificationsp.1855.2.3 Front Panel Layoutp.1865.2.4 Board Overviewp.1865.2.5 Functional Descriptionp.1875.2.6 Configurationp.1895.2.7 Pinoutsp.1895.2.8 ‘C’ Programmingp.1915.2.8.1 SM-PT100 Libraryp.1915.2.8.2 SMADCInitp.1955.2.8.3 SMADCCalibratep.1965.2.8.4 SMADCSetCyclicCalibp.1975.2.8.5 SMADCSetSensorTypep.1985.2.8.6 SMADCGetSensorTypep.1995.2.8.7 SMADCSetPrecisionp.2005.2.8.8 SMADCGetPrecisionp.2015.2.8.9 SMADCSetModep.2025.2.8.10 SMADCGetMode 5-47p.2035.2.8.11 SMADCSetSignalp.2045.2.8.12 SMADCSetGainp.2055.2.8.13 SMADCGetGainp.2065.2.8.14 SMADCEnableReadp.2075.2.8.15 SMADCEnableConversionp.2085.2.8.16 SMADCReadRawp.2095.2.8.17 SMADCReadConvertedp.2105.2.8.18 SMADCDeinitp.2115.2.9 ISaGRAF Programmingp.2125.2.9.1 The ISaGRAF Board Parametersp.2125.2.9.2 The ISaGRAF Operate Callsp.2135.3 SM-THERMp.2155.3.1 Introductionp.2155.3.2 Specificationsp.2155.3.3 Front Panel Layoutp.2165.3.4 Board Overviewp.2165.3.5 Functional Descriptionp.2175.3.6 Configurationp.2185.3.7 Pinoutsp.2185.3.8 ‘C’ Programmingp.2205.3.8.1 SM-THERM Libraryp.2205.3.8.2 SMADCInitp.2245.3.8.3 SMADCCalibratep.2255.3.8.4 SMADCSetCyclicCalibp.2265.3.8.5 SMADCSetSensorTypep.2275.3.8.6 SMADCGetSensorTypep.2285.3.8.7 SMADCSetPrecisionp.2295.3.8.8 SMADCGetPrecisionp.2305.3.8.9 SMADCSetMode 5-75p.2315.3.8.10 SMADCGetModep.2325.3.8.11 SMADCSetSignalp.2335.3.8.12 SMADCSetGainp.2345.3.8.13 SMADCGetGainp.2355.3.8.14 SMADCEnableReadp.2365.3.8.15 SMADCEnableConversionp.2375.3.8.16 SMADCReadRawp.2385.3.8.17 SMADCReadConvertedp.2395.3.8.18 SMADCDeinitp.2405.3.9 ISaGRAF Programmingp.2415.3.9.1 The ISaGRAF Board Parametersp.2415.3.9.2 The ISaGRAF Operate Callsp.2425.4 SM-ADC1p.2455.4.1 Introductionp.2455.4.2 Specificationsp.2455.4.3 Front Panel Layoutp.2465.4.4 Board Overviewp.2465.4.5 Functional Descriptionp.2475.4.5.1 Input Circuitryp.2475.4.6 Configurationp.2485.4.7 Pinoutsp.2485.4.8 ‘C’ Programmingp.2505.4.8.1 SM-ADC1 Libraryp.2505.4.8.2 SMADC1Initp.2515.4.8.3 SMADC1GetVRawp.2525.4.8.4 SMADC1GetVp.2535.4.8.5 SMADC1SetLedp.2545.4.8.6 SMADC1ClrLedp.2555.4.8.7 SMADC1DeInitp.2565.4.9 ISaGRAF Programmingp.2575.4.9.1 The ISaGRAF Board Parametersp.2575.4.9.2 The ISaGRAF Operate Callsp.2585.5 SM-DAC1p.2635.5.1 Introductionp.2635.5.2 Specificationsp.2635.5.3 Front Panel Layoutp.2645.5.4 Board Overviewp.2645.5.5 Functional Descriptionp.2655.5.5.1 Output Circuitryp.2655.5.6 Configurationp.2665.5.7 Pinoutsp.2665.5.8 ‘C’ Programmingp.2695.5.8.1 SM-DAC1 Libraryp.2695.5.8.2 SMDAC1Initp.2705.5.8.3 SMDAC1OpenLoopp.2715.5.8.4 SMADAC1Operatep.2725.5.8.5 SMDAC1StandByp.2735.5.8.6 SMDAC1PutVRawp.2745.5.8.7 SMDAC1PutVp.2755.5.8.8 SMDAC1SetLedp.2765.5.8.9 SMDAC1ClrLedp.2775.5.8.10 SMDAC1DeInitp.2785.5.9 ISaGRAF Programmingp.2795.5.9.1 The ISaGRAF Board Parametersp.2795.5.9.2 The ISaGRAF Operate Callsp.280Comms.pdfp.283Table of Contentsp.2846. Communications Modulesp.2876.1 SM-RS232 6p.2876.1.1 Introductionp.2876.1.2 Specificationsp.2876.1.3 Front Panel Layoutp.2886.1.4 Board Overviewp.2886.1.5 Functional Descriptionp.2896.1.6 Configurationp.2906.1.7 Pinoutsp.2906.1.8 ISaGRAF Programmingp.2926.1.8.1 The ISaGRAF Board Parametersp.2926.1.8.2 The ISaGRAF Operate Callsp.2946.1.9 OS-9 Programmingp.2966.2 SM-SSIp.2996.2.1 Introductionp.2996.2.2 Specificationsp.2996.2.3 Front Panel Layoutp.3006.2.4 Board Overviewp.3006.2.5 Functional Descriptionp.3016.2.6 SSI Operationp.3026.2.7 Register Descriptionp.3046.2.7.1 Control Registerp.3046.2.7.2 CTRL1 Registerp.3056.2.7.3 CTRL2 Registerp.3056.2.7.4 CTRL3 Registerp.3056.2.7.5 Compare Registerp.3066.2.7.6 Identification Registerp.3066.2.7.7 Status Registerp.3066.2.7.8 STAT1 Registerp.3066.2.7.9 STAT2 Registerp.3076.2.7.10 Data Registerp.3076.2.8 MATCH Functionp.3086.2.9 Tested Sensorsp.3086.2.10 Configurationp.3096.2.11 Pinoutsp.3096.2.12 ‘C’ Programmingp.3116.2.12.1 SM-SSI Libraryp.3116.2.12.2 SMSSIInitp.3126.2.12.3 SMSSIDeInitp.3136.2.12.4 SMSSISetSetPointp.3146.2.12.5 SMSSISetCtrlRegp.3156.2.12.6 SMSSIGetStatusp.3166.2.12.7 SMSSIGetDatap.3176.2.13 ISaGRAF Programmingp.3186.2.13.1 The ISaGRAF Board Parametersp.318
Page 2 of the Pepper Computer RS232 user manual — Preface.pdf
Page 2 · click to enlarge
Page 2

This page was intentionally left blank.

Page 3 of the Pepper Computer RS232 user manual — HV Safety Instructions ............................. 0-6 Two Years Warranty...................... 0-7
Page 3 · click to enlarge
Page 3

Preface

Preface

Revision History ............................ 0-4

For Your Safety ............................. 0-5

Special Handling and Unpacking In- structions 0-6

HV Safety Instructions 0-6 Two Years Warranty 0-7

Table of Contents.......................... 0-9

08 Jan. 98

Page 0 - 3 Manual ID 09901, Rev. Index 0500

Page 4 of the Pepper Computer RS232 user manual — Preface
Page 4 · click to enlarge
Page 4

Preface

Revision History

Manual/Product Title:SMART I/O User’s Manual Manual ID Number:09901 Rev. IndexBrief Description of ChangesPCB IndexDate of Issue 0100Initial Issue0202Dec. 94 0200General Update, SM-DAD1 & Software Library Added0202Feb. 95 0300New MS Modules Added, D5 Format0202Mar. 96 0400New MS Modules Added, Corrections Including Update of SM-DAD1 ’C’ Programming Section0202Oct 96 0500Standard Preface, ACI1 Module Added0202Dec. 97

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

08 Jan. 98 Manual ID 09901, Rev. Index 0500

Page 5 of the Pepper Computer RS232 user manual — Preface
Page 5 · click to enlarge
Page 5

Preface

For your safety

This PEP product is carefully designed for a long, fault-free life. However, its life expectancy can be drastically reduced by improper treatment during unpacking and installation. Therefore, in the interest of your own safety and of correct operation of your new PEP product, please take care of the following guidelines:

Before installing your new PEP product into a system, please, always switch off your power mains. 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 exceeded. 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.

08 Jan. 98

Page 0 - 5 Manual ID 09901, Rev. Index 0500

Page 6 of the Pepper Computer RS232 user manual — HV Safety Instructions
Page 6 · click to enlarge
Page 6

Preface

Special Handling and Unpacking Instructions

Electronic boards are sensitive to static electricity. Therefore, care must be taken during all handling operations and inspections with this product, in order to ensure product integrity at all times.

Do not handle this product out of its protective enclosure while it is not being worked with, or unless it is otherwise protected. Whenever possible, unpack or pack this product only at EOS/ESD safe work stations. 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. 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 that 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 (> 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

08 Jan. 98 Manual ID 09901, Rev. Index 0500

Page 7 of the Pepper Computer RS232 user manual — Preface
Page 7 · click to enlarge
Page 7

Preface

Two Years Warranty

PEP Modular Computers grants the original purchaser of PEP products a TWO YEARS LIMITED HARDWARE WARRANTY as described in the following. 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.

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

PEPprovides 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 toPEP 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 the original guarantee are considered gestures of

08 Jan. 98

Page 0 - 7 Manual ID 09901, Rev. Index 0500

Page 8 of the Pepper Computer RS232 user manual — Preface
Page 8 · click to enlarge
Page 8

Preface

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.

Please 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

08 Jan. 98 Manual ID 09901, Rev. Index 0500

Page 9 of the Pepper Computer RS232 user manual — Table of contents
Page 9 · click to enlarge
Page 9

Table of contents

Preface.pdfp.1Table of Contentsp.1Unpacking and Special Handling Instructionsp.1Revision Historyp.1PEP Modular Computers Two Year Limited Warrantyp.1General Informationp.132. SMART-BASEp.413. SMART-EXTp.794. Digital Modulesp.15. Analog Modulesp.1576. Communications Modulesp.283Introduction.pdfp.13Table of Contentsp.13General Informationp.15Weights & Measuresp.161.1 Product Overviewp.201.2 Ordering Informationp.211.3 Product Informationp.221.4 Installationp.251.4.1 Overviewp.251.4.2 SMART I/O Module Installationp.271.4.3 RJ45 Telephone Connector Installationp.281.4.4 Screw Terminal Block Installationp.281.4.5 Battery Installationp.291.5 ISaGRAF-Installationp.301.5.1 Before Installingp.301.5.2 Installation of the ISaGRAF for Windows Workbenchp.311.5.3 Installation of PEP Library Functionsp.331.5.4 Demo Applicationp.38SM-BASE.pdfp.41Table of Contentsp.412. SMART-BASEp.432.1 Specificationsp.442.2 Board Overviewp.452.3 Functional Descriptionp.462.4 Configurationp.482.4.1 Jumper J1: Boot Selection (Pin Connector)p.482.4.2 Jumper J6: LED Function (Pin Connector)p.492.5 Pinoutsp.492.5.1 SMART Module Piggyback Connectorsp.502.5.2 Screw Terminal Pinoutsp.522.5.3 Timer I/O Screw Terminal (SCR1)p.522.5.4 Supply Screw Terminals (SCR2)p.542.5.5 RS232 Telephone Connector (BU1)p.552.5.6 RS485 D-Sub Connector for Half-Duplex Operation (Profibus)p.552.5.7 SPI Connector (ST7)p.562.6 ‘C’ Programmingp.572.6.1 SMART-BASE Libraryp.572.6.2 SMTselInp.582.6.3 SMTsettoutp.602.6.4 SMTprep.612.6.5 SMTstastop.632.6.6 SMTrdp.642.6.7 SMTtinp.652.6.8 SMTstatp.662.6.9 SMToutp.672.6.10 SMLedp.682.6.11 SMwdonp.692.6.12 SMwdtrigp.702.6.13 SMwdoffp.712.7 ISaGRAF Programmingp.722.7.1 The ISaGRAF Board Parametersp.722.7.2 The ISaGRAF Operate Callsp.732.8 Flash Utilityp.77SM-EXT.pdfp.79Table Of Contentsp.793. SMART-EXTp.813.1 Specificationsp.813.2 Board Overviewp.823.3 Functional Descriptionp.833.4 Pinoutsp.843.4.1 SMART Module Piggyback Connectorsp.853.4.2 Parallel I/O Screw Terminals (SCRA and SCRB)p.863.4.3 SPI Connectors (ST5 and BU1)p.87Digital.pdfp.1Table of Contentsp.14. Digital Modulesp.934.1 SM-DIN1p.934.1.1 Introductionp.934.1.2 Specificationsp.934.1.3 Front Panel Layoutp.944.1.4 Board Overviewp.954.1.5 Functional Descriptionp.964.1.6 Configurationp.974.1.7 Pinoutsp.984.1.8 ‘C’ Programmingp.1004.1.8.1 SM-DIN1 Libraryp.1004.1.8.2 SMDIN1Initp.1014.1.8.3 SMDIN1DeInitp.1024.1.8.4 SMDIN1Getp.1034.1.9 ISaGRAF Programmingp.1044.1.9.1 The ISaGRAF Board Parametersp.1044.1.9.2 The ISaGRAF Operate Callsp.1054.2 SM-DOUT1p.1074.2.1 Introductionp.1074.2.2 Specificationsp.1074.2.3 Front Panel Layoutp.1084.2.4 Board Overviewp.1084.2.5 Functional Descriptionp.1094.2.6 Configurationp.1104.2.7 Pinoutsp.1104.2.8 ‘C’ Programmingp.1124.2.8.1 SM-DOUT1 Libraryp.1124.2.8.2 SMDOUT1Initp.1134.2.8.3 SMDOUT1DeInitp.1144.2.8.4 SMDOUT1Getp.1154.2.8.5 SMDOUT1Setp.1164.2.9 ISaGRAF Programmingp.1174.2.9.1 The ISaGRAF Board Parametersp.1174.2.9.2 The ISaGRAF Operate Callsp.1184.3 SM-REL1p.1214.3.1 Introductionp.1214.3.2 Specificationsp.1214.3.3 Front Panel Layoutp.1224.3.4 Board Overviewp.1224.3.5 Functional Descriptionp.1234.3.6 Configurationp.1244.3.7 Pinoutsp.1244.3.8 ‘C’ Programmingp.1264.3.8.1 SM-REL1 Libraryp.1264.3.8.2 SMREL1Initp.1274.3.8.3 SMREL1DeInitp.1284.3.8.4 SMREL1Resetp.1294.3.8.5 SMREL1GetRlyp.1304.3.8.6 SMREL1SetRlyp.1314.3.8.7 SMREL1GetLedp.1324.3.8.8 SMREL1SetLedp.1334.3.8.9 SMREL1GetExtVccp.1344.3.9 ISaGRAF Programmingp.1354.3.9.1 The ISaGRAF Board Parametersp.1354.3.9.2 The ISaGRAF Operate Callsp.136Analog.pdfp.157Table of Contentsp.1585. Analog Modulesp.1635.1 SM-DAD1p.1635.1.1 Introductionp.1635.1.2 Specificationsp.1635.1.3 Front Panel Layoutp.1645.1.4 Board Overviewp.1655.1.5 Functional Descriptionp.1665.1.5.1 Input Circuitryp.1665.1.5.2 Output Circuitryp.1675.1.6 Configurationp.1685.1.7 Pinoutsp.1695.1.8 ‘C’ Programmingp.1725.1.8.1 SM-DAD1 Libraryp.1725.1.8.2 SMDAD1Initp.1735.1.8.3 SMDAD1DeInitp.1745.1.8.4 SMDAD1GetVRawp.1755.1.8.5 SMDAD1GetVp.1765.1.8.6 SMDAD1PutVRawp.1775.1.8.7 SMDAD1PutVp.1785.1.8.8 SMDAD1SetLedp.1795.1.8.9 SMDAD1ClrLedp.1805.1.9 ISaGRAF Programmingp.1815.1.9.1 The ISaGRAF Board Parametersp.1815.1.9.2 The ISaGRAF Operate Callsp.1825.2 SM-PT100p.1855.2.1 Introductionp.1855.2.2 Specificationsp.1855.2.3 Front Panel Layoutp.1865.2.4 Board Overviewp.1865.2.5 Functional Descriptionp.1875.2.6 Configurationp.1895.2.7 Pinoutsp.1895.2.8 ‘C’ Programmingp.1915.2.8.1 SM-PT100 Libraryp.1915.2.8.2 SMADCInitp.1955.2.8.3 SMADCCalibratep.1965.2.8.4 SMADCSetCyclicCalibp.1975.2.8.5 SMADCSetSensorTypep.1985.2.8.6 SMADCGetSensorTypep.1995.2.8.7 SMADCSetPrecisionp.2005.2.8.8 SMADCGetPrecisionp.2015.2.8.9 SMADCSetModep.2025.2.8.10 SMADCGetMode 5-47p.2035.2.8.11 SMADCSetSignalp.2045.2.8.12 SMADCSetGainp.2055.2.8.13 SMADCGetGainp.2065.2.8.14 SMADCEnableReadp.2075.2.8.15 SMADCEnableConversionp.2085.2.8.16 SMADCReadRawp.2095.2.8.17 SMADCReadConvertedp.2105.2.8.18 SMADCDeinitp.2115.2.9 ISaGRAF Programmingp.2125.2.9.1 The ISaGRAF Board Parametersp.2125.2.9.2 The ISaGRAF Operate Callsp.2135.3 SM-THERMp.2155.3.1 Introductionp.2155.3.2 Specificationsp.2155.3.3 Front Panel Layoutp.2165.3.4 Board Overviewp.2165.3.5 Functional Descriptionp.2175.3.6 Configurationp.2185.3.7 Pinoutsp.2185.3.8 ‘C’ Programmingp.2205.3.8.1 SM-THERM Libraryp.2205.3.8.2 SMADCInitp.2245.3.8.3 SMADCCalibratep.2255.3.8.4 SMADCSetCyclicCalibp.2265.3.8.5 SMADCSetSensorTypep.2275.3.8.6 SMADCGetSensorTypep.2285.3.8.7 SMADCSetPrecisionp.2295.3.8.8 SMADCGetPrecisionp.2305.3.8.9 SMADCSetMode 5-75p.2315.3.8.10 SMADCGetModep.2325.3.8.11 SMADCSetSignalp.2335.3.8.12 SMADCSetGainp.2345.3.8.13 SMADCGetGainp.2355.3.8.14 SMADCEnableReadp.2365.3.8.15 SMADCEnableConversionp.2375.3.8.16 SMADCReadRawp.2385.3.8.17 SMADCReadConvertedp.2395.3.8.18 SMADCDeinitp.2405.3.9 ISaGRAF Programmingp.2415.3.9.1 The ISaGRAF Board Parametersp.2415.3.9.2 The ISaGRAF Operate Callsp.2425.4 SM-ADC1p.2455.4.1 Introductionp.2455.4.2 Specificationsp.2455.4.3 Front Panel Layoutp.2465.4.4 Board Overviewp.2465.4.5 Functional Descriptionp.2475.4.5.1 Input Circuitryp.2475.4.6 Configurationp.2485.4.7 Pinoutsp.2485.4.8 ‘C’ Programmingp.2505.4.8.1 SM-ADC1 Libraryp.2505.4.8.2 SMADC1Initp.2515.4.8.3 SMADC1GetVRawp.2525.4.8.4 SMADC1GetVp.2535.4.8.5 SMADC1SetLedp.2545.4.8.6 SMADC1ClrLedp.2555.4.8.7 SMADC1DeInitp.2565.4.9 ISaGRAF Programmingp.2575.4.9.1 The ISaGRAF Board Parametersp.2575.4.9.2 The ISaGRAF Operate Callsp.2585.5 SM-DAC1p.2635.5.1 Introductionp.2635.5.2 Specificationsp.2635.5.3 Front Panel Layoutp.2645.5.4 Board Overviewp.2645.5.5 Functional Descriptionp.2655.5.5.1 Output Circuitryp.2655.5.6 Configurationp.2665.5.7 Pinoutsp.2665.5.8 ‘C’ Programmingp.2695.5.8.1 SM-DAC1 Libraryp.2695.5.8.2 SMDAC1Initp.2705.5.8.3 SMDAC1OpenLoopp.2715.5.8.4 SMADAC1Operatep.2725.5.8.5 SMDAC1StandByp.2735.5.8.6 SMDAC1PutVRawp.2745.5.8.7 SMDAC1PutVp.2755.5.8.8 SMDAC1SetLedp.2765.5.8.9 SMDAC1ClrLedp.2775.5.8.10 SMDAC1DeInitp.2785.5.9 ISaGRAF Programmingp.2795.5.9.1 The ISaGRAF Board Parametersp.2795.5.9.2 The ISaGRAF Operate Callsp.280Comms.pdfp.283Table of Contentsp.2846. Communications Modulesp.2876.1 SM-RS232 6p.2876.1.1 Introductionp.2876.1.2 Specificationsp.2876.1.3 Front Panel Layoutp.2886.1.4 Board Overviewp.2886.1.5 Functional Descriptionp.2896.1.6 Configurationp.2906.1.7 Pinoutsp.2906.1.8 ISaGRAF Programmingp.2926.1.8.1 The ISaGRAF Board Parametersp.2926.1.8.2 The ISaGRAF Operate Callsp.2946.1.9 OS-9 Programmingp.2966.2 SM-SSIp.2996.2.1 Introductionp.2996.2.2 Specificationsp.2996.2.3 Front Panel Layoutp.3006.2.4 Board Overviewp.3006.2.5 Functional Descriptionp.3016.2.6 SSI Operationp.3026.2.7 Register Descriptionp.3046.2.7.1 Control Registerp.3046.2.7.2 CTRL1 Registerp.3056.2.7.3 CTRL2 Registerp.3056.2.7.4 CTRL3 Registerp.3056.2.7.5 Compare Registerp.3066.2.7.6 Identification Registerp.3066.2.7.7 Status Registerp.3066.2.7.8 STAT1 Registerp.3066.2.7.9 STAT2 Registerp.3076.2.7.10 Data Registerp.3076.2.8 MATCH Functionp.3086.2.9 Tested Sensorsp.3086.2.10 Configurationp.3096.2.11 Pinoutsp.3096.2.12 ‘C’ Programmingp.3116.2.12.1 SM-SSI Libraryp.3116.2.12.2 SMSSIInitp.3126.2.12.3 SMSSIDeInitp.3136.2.12.4 SMSSISetSetPointp.3146.2.12.5 SMSSISetCtrlRegp.3156.2.12.6 SMSSIGetStatusp.3166.2.12.7 SMSSIGetDatap.3176.2.13 ISaGRAF Programmingp.3186.2.13.1 The ISaGRAF Board Parametersp.318
Page 10 of the Pepper Computer RS232 user manual — 4.1 SM-DIN1........................................................... 4-5
Page 10 · click to enlarge
Page 10

Preface

2.5 Pinouts 2-9

2.6 ‘C’ Programming 2-17

2.7 ISaGRAF Programming 2-32

2.8 Flash Utility 2-37

Chapter 3

3. SMART-EXT 3-3

3.1 Specifications 3-3

3.2 Board Overview 3-4

3.3 Functional Description 3-5

3.4 Pinouts 3-6

Chapter 4

4. Digital Modules 4-5

4.1 SM-DIN1 4-5

4.2 SM-DOUT1..................................................... 4-19

Page 0 - 10

08 Jan. 98 Manual ID 09901, Rev. Index 0500

Page 11 of the Pepper Computer RS232 user manual — Preface
Page 11 · click to enlarge
Page 11

Preface

4.3 SM-REL1........................................................ 4-33

4.4 SM-ACI1......................................................... 4-51

Chapter 5

5. Analog Modules..................................... 5-7

5.1 SM-DAD1 ......................................................... 5-7

5.2 SM-PT100 ..................................................... 5-29

5.3 SM-THERM ................................................... 5-59

5.4 SM-ADC1 ....................................................... 5-89

5.5 SM-DAC1 ..................................................... 5-107

Chapter 6

6. Communications Modules .................... 6-5

6.1 SM-RS232........................................................ 6-5

6.2 SM-SSI........................................................... 6-17

08 Jan. 98

Page 0 - 11 Manual ID 09901, Rev. Index 0500

Page 12 of the Pepper Computer RS232 user manual — Preface.pdf
Page 12 · click to enlarge
Page 12

This page was intentionally left blank.

Page 15 of the Pepper Computer RS232 user manual — 1 General Information
Page 15 · click to enlarge
Page 15

1 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
  • Separate digital and analog cabling
  • Only replace/insert modules 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.

Introduction

Page 16 of the Pepper Computer RS232 user manual — Weights & Measures
Page 16 · click to enlarge
Page 16

Weights & Measures

The following line drawings serve to illustrate the method of fixing the controller to a DIN rail or brackets for wall/cabinet mounting. Note that all measurements are in millimetres.

Pepper Computer RS232 — Weights & Measures diagram (page 16)
Fig. 1 · Weights & Measures

Introduction

Page 17 of the Pepper Computer RS232 user manual — Weights & Measures
Page 17 · click to enlarge
Page 17
Pepper Computer RS232 — Weights & Measures diagram (page 17)
Fig. 2 · Weights & Measures

Introduction · Optional Bracket Mounting

Page 18 of the Pepper Computer RS232 user manual — Weights & Measures
Page 18 · click to enlarge
Page 18
Pepper Computer RS232 — Weights & Measures diagram (page 18)
Fig. 3 · Weights & Measures

Introduction

Page 19 of the Pepper Computer RS232 user manual — Weights & Measures
Page 19 · click to enlarge
Page 19
Pepper Computer RS232 — Weights & Measures diagram (page 19)
Fig. 4 · Weights & Measures

Unit Weight Unit Weight SMART-BASE 650g SM-THERM 40g SMART-EXT 250g SM-ADC1 70g SM-DIN1 40g SM-DAC1 70g SM-DOUT1 70g SM-SSI 70g SM-REL1 61g SM-CNT1 N/A SM-DAD1 70g SM-RS232 40g SM-PT100 40g

Introduction

Page 20 of the Pepper Computer RS232 user manual — 1.1 Product Overview
Page 20 · click to enlarge
Page 20

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 real-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 ANSI-C programming under real-time OS. All this power is provided with excellent price/performance characteristics.

Introduction

Page 21 of the Pepper Computer RS232 user manual — SMART-BASE
Page 21 · click to enlarge
Page 21

1.2 Ordering Information

Product Description Order Nr.

Micro PLC & real-time computer, 1 MByte EPROM, 512 kByte DRAM, 64kByte SRAM, OS-9 v3.0, ISaGRAF v3.0x, PROFIBUS v3.12, Layer 2 & 7, RTC, full modem RS232 (8-pin RJ45 connector), 190 mAh battery, housing and terminal block for the 24V DC power supply

SMART-BASE

SMART-BASE As product 13843 but with additional 1 MByte Flash memory (TSOP) on

SMART-EXT Expansion module for the SMART-BASE supporting 2 SMART-Modules Delivered without terminal blocks, SMART-Modules or blank panels 4228

SM-DIN1 SMART-Module with 8 optoisolated 24V DC digital inputs 4229 SM-DOUT1 SMART-Module with 8 optoisolated 24V DC/500mA digital outputs 4231 SM-DAD1 SMART-Module with 4 channel A/D (±10V), 2 channel D/A (±10V, 0..10V) 9868 SM-PT100 SMART-Module with 4 optoisolated 2, 3 or 4-wire PT100 inputs 12405 SM-THERM SMART-Module with 4 optoisolated thermocouple inputs 12426 SM-REL1 SMART-Module with 6 optoisolated normally open relay outputs 12238 SM-RS232 SMART-Module with RS232 (Rx & Tx) interface 12461

SM-SSI SMART-Module with 1 SSI channel providing a 24V DC digital input and a 24V DC, 500mA digital output 12825

SM-ADC1 SMART-Module with 6 12-bit, ±10V optoisolated analog inputs 13380 SM-ADC1 SMART-Module with 6 12-bit, 0..20mA optoisolated analog inputs 13868 SM-DAC1 SMART-Module with 2 12-bit, ±10V optoisolated analog outputs 13379

SM-DAC1 SMART-Module with 2 12-bit, 0..20mA optoisolated analog outputs with current sensing for broken sensor detection 14018

SM-DAC1 SMART-Module with 6 12-bit, ±10V optoisolated analog outputs 14019

SM-DAC1 SMART-Module with 6 12-bit, 0..20mA optoisolated analog outputs with current sensing for broken sensor detection 14020

All SM-Modules are delivered without screw terminals.

Introduction · solder side 13844

Page 22 of the Pepper Computer RS232 user manual — 1.3 Product Information
Page 22 · click to enlarge
Page 22

Product Description Order Nr.

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

OS9TRG-RG- SMART Target CPU kit for SMART I/O (OS-9 v3.x/Ix.x disks) 11299

OS-9/68000 FasTrak for Windows development pack for SMART I/O. Contains extended OS-9 v3.x/Ix.x, PEP utilities and I/O drivers with necessary makefiles for complete application and EPROM generation.

OS9DEVFTWIN-SMART

OS-9/68000 FasTrak for UNIX development pack for SMART I/O. Contains extended OS-9 v3.x/Ix.x, PEP utilities and I/O drivers with necessary makefiles for complete application and EPROM generation.

OS9DEVFTUNIX-SMART

OS9-PFBSMART

OS-9 PROFIBUS starter kit II for 1 node. Includes license, disk and manual 1662

OS9-PFBSMART(FT)

OS-9 PROFIBUS starter kit II for 1 node operating under FasTrak for Windows. Includes license, disk and manual 12666

Cable 3 meters with 9-pin D-Sub (female) & RJ45 connectors for PC operation 10890

Cable 3 meters with 25-pin D-Sub (male) & RJ45 connectors for modem operation 10891

Screw Term. For the SMART-BASE timer I/O. Pack of 5, 2x3 array 10892 SCR-2*7. For the SMART-Modules. Pack of 5, 2x7 array 10893 Dummy FP For unused SMART-Module slots. Available in packs of 20 10894

Battery 3V, 190mAh lithium batery (button) BR2032 for use in the standard temperature range (0°C to +70°C) 11281

Battery 3V, 850mAh lithium batery (cylinder) CR14250 for use in the extendedtemperature range (-40°C to +85°C) 11282

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 & Measures section) which in turn may be fixed in a cabinet. SMART-EXT units may be attached in a similar manner.

Introduction · ISaGRAF- ROM-START

Page 23 of the Pepper Computer RS232 user manual — 1.3 Product Information
Page 23 · click to enlarge
Page 23

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:

Voltage Current min max Continuous Peak 18V 36V 400mA 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 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.

min max CPU Core 1500mW 1700mW Profibus 250mW 750mW

Module Power Consumption Module Power Consumption min max min max SM-DIN1 5mW 100mW SM-ADC1 350mW 450mW SM-DOUT1 5mW 270mW SM-DAC1 5mW 400mW SM-DAD1 350mW 450mW SM-DAC1 350mW 660mW SM-PT100 400mW 500mW SM-SSI unknown unknown SM-THERM 400mW 500mW SM-RS232 23mW 75mW SM-REL1 23mW 160mW

Introduction · SM-BASE Power Consumption

Page 24 of the Pepper Computer RS232 user manual — D3
Page 24 · click to enlarge
Page 24

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

F1 0.60A M

R77

SCR2

In the event of a blown fuse, replace it with the same size and type as the one installed.

Introduction

Page 25 of the Pepper Computer RS232 user manual — 1.4 Installation
Page 25 · click to enlarge
Page 25

1.4 Installation

1.4.1 Overview

The SMART-BASE and SMART-EXT units are supplied without screw terminal blocks for the I/O slots, SMART Module piggybacks or blank panels. These must be ordered separately to meet the requirements of indi- vidual specifications.

Pepper Computer RS232 — 1.4 Installation diagram (page 25)
Fig. 5 · 1.4 Installation

Introduction

Page 26 of the Pepper Computer RS232 user manual — 1.4 Installation
Page 26 · click to enlarge
Page 26

Up to 4 SMART-EXT units can be cascaded depending on the power con- sumption of the individual SMART Modules.

Pepper Computer RS232 — 1.4 Installation diagram (page 26)
Fig. 6 · 1.4 Installation

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.

Pepper Computer RS232 — 1.4 Installation diagram (page 26)
Fig. 7 · 1.4 Installation

Introduction

Page 27 of the Pepper Computer RS232 user manual — 1.4.2 SMART I/O Module Installation
Page 27 · click to enlarge
Page 27

Screw terminal connectors are available in packs of 5.

Pepper Computer RS232 — 1.4.2 SMART I/O Module Installation diagram (page 27)
Fig. 8 · 1.4.2 SMART I/O Module Installation

1.4.2 SMART I/O Module Installation

The SMART I/O Modules are fitted into the relevant sockets (ST1 - ST6; 3 slots) on the SMART-BASE or in sockets on the SMART-EXT unit. It is important that the Modules are inserted the correct way. The Figure below illustrates this procedure.

Figure 1.4.2.1SMART I/O Module Installation
Pepper Computer RS232 — 1.4.2 SMART I/O Module Installation diagram (page 27)
Fig. 9 · 1.4.2 SMART I/O Module Installation
Pepper Computer RS232 — 1.4.2 SMART I/O Module Installation diagram (page 27)
Fig. 10 · 1.4.2 SMART I/O Module Installation

Once fitted on the board, the Module sockets and components should be on the right hand side of the Module.

Introduction · SMART-Module · Socket SMART-Module

Page 28 of the Pepper Computer RS232 user manual — SMART-BASE
Page 28 · click to enlarge
Page 28

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.1RJ45 Telephone Connector Installation

SMART-BASE

Pepper Computer RS232 — SMART-BASE diagram (page 28)
Fig. 11

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.1Screw Terminal Block Installation

Introduction

Page 29 of the Pepper Computer RS232 user manual — WARNING!
Page 29 · click to enlarge
Page 29

1.4.5 Battery Installation

The battery piggyback SMPBBAT is fitted into the socket BU3 on the SMART-BASE. It is important that the piggyback is inserted in the correct way. The figure below illustrates this procedure.

Figure 1.4.5.1Battery Piggyback Installation

BU3

SMPBLED

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

Show 4 more labels / short text on this page
Introduction · Pin 5 · Battery · Pin 1
Page 30 of the Pepper Computer RS232 user manual — 1.5 ISaGRAF-Installation
Page 30 · click to enlarge
Page 30

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.

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

Introduction

Page 31 of the Pepper Computer RS232 user manual — 1.5.2 Installation of the ISaGRAF for Windows Workbench
Page 31 · click to enlarge
Page 31

1.5.2 Installation of the ISaGRAF for Windows Workbench

The following steps should be followed to ensure successful installation of the ISaGRAF software. Initially the disk labelled Workbench Disk 1/4 will be required.

  • Start Windows
  • Insert diskette Workbench Disk 1/4 into the floppy drive (usually A:)
  • Select File from the Windows Program Manager and select Run ...
  • Type A:\INSTALL in the command field and select OK

The ISaGRAF installation will start automatically. Figure 1.5.2.1 illustrates a typical opening screen.

Pepper Computer RS232 — 1.5.2 Installation of the ISaGRAF for Windows Workbench diagram (page 31)
Fig. 12 · 1.5.2 Installation of the ISaGRAF for Windows Workbe…

Figure 1.5.2.1 Typical Opening Screen

Introduction

Page 32 of the Pepper Computer RS232 user manual — 1.5.2 Installation of the ISaGRAF for Windows Workbench
Page 32 · click to enlarge
Page 32

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.

Pepper Computer RS232 — 1.5.2 Installation of the ISaGRAF for Windows Workbench diagram (page 32)
Fig. 13 · 1.5.2 Installation of the ISaGRAF for Windows Workbe…

Figure 1.5.2.2 Installation Selection

The default is for a complete installation, i.e. all files. Once confirmed, the installation copies the required files to the installation directory and unpacks their contents. 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.

Introduction

Page 33 of the Pepper Computer RS232 user manual — 1.5.3 Installation of PEP Library Functions
Page 33 · click to enlarge
Page 33
Pepper Computer RS232 — 1.5.3 Installation of PEP Library Functions diagram (page 33)
Fig. 14 · 1.5.3 Installation of PEP Library Functions

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.

Introduction

Page 34 of the Pepper Computer RS232 user manual — 1.5.3 Installation of PEP Library Functions
Page 34 · click to enlarge
Page 34

These libraries for projects, I/O boards, ’C’ functions and common data are extracted by following the described procedure:

  • Start Windows if not already started
  • Insert diskette Lib/Appli/Help Disk 1/2 into the floppy drive
  • Select File from the Windows Program Manager and select Run ...
  • Type A:\INSTALL in the command field and select OK

Figure 1.5.3.1 illustrates the Installation Start-up screen.

Pepper Computer RS232 — 1.5.3 Installation of PEP Library Functions diagram (page 34)
Fig. 15 · 1.5.3 Installation of PEP Library Functions

Figure 1.5.3.1 The Installation Start-up Screen

Introduction

Page 35 of the Pepper Computer RS232 user manual — 1.5.3 Installation of PEP Library Functions
Page 35 · click to enlarge
Page 35

It should be noted that the standard ISA-Terminal is configured for COM2. If another port is required then the switch to the new one is made by firstly starting the ISA-Terminal program and then selecting the Settings from the Communication pull-down menu. Here the possibility exists to select the desired communications port. When leaving the ISA-Terminal environment, remember to save the configuration if changes have been made.

The installation of the ISaGRAF development tool is now complete and access is 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.

Introduction

Page 36 of the Pepper Computer RS232 user manual — 1.5.3 Installation of PEP Library Functions
Page 36 · click to enlarge
Page 36

In order to verify that the hardware and software have been correctly setup, the following procedure should be followed.

  • Connect the D-Sub connector end of the terminal cable to the chosen COM port of the computer. The other end, with the telephone type connector should be pushed into place in the RS232-port of the SMART I/O base (see figure 1.4.3.1)
  • With the power supply turned OFF, connect the power plug to SCR-2 on the SMART base.
  • Start the ISA-Terminal program.
  • 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.
Pepper Computer RS232 — 1.5.3 Installation of PEP Library Functions diagram (page 36)
Fig. 16 · 1.5.3 Installation of PEP Library Functions

Figure 1.5.3.2 Power Up Messages

Introduction

Page 37 of the Pepper Computer RS232 user manual — 1.5.3 Installation of PEP Library Functions
Page 37 · click to enlarge
Page 37

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

  • PROFIBUS 5V
  • System 5V and
  • Power ON

Introduction

Page 38 of the Pepper Computer RS232 user manual — 1.5.4 Demo Application
Page 38 · click to enlarge
Page 38

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- DEMO1 and 2 are discussed here :

SM_DEMO1 should be used if the SMART I/O has the SM_DOUT1 module in the first of the SMART Module slots and has SM_DIN1 in slot 2 (the last) on the SMART-BASE.

SM_DEMO2 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_DEMO1 or SM_DEMO2 by double clicking on the icon;
  • Go to the Debug/PC-PLC Link Menu to ensure that the correct COM port is selected for communication to the SMART I/O;
Pepper Computer RS232 — 1.5.4 Demo Application diagram (page 38)
Fig. 17 · 1.5.4 Demo Application
  • 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);

Introduction

Page 39 of the Pepper Computer RS232 user manual — 1.5.4 Demo Application
Page 39 · click to enlarge
Page 39

1 • Finally, from the Files/Download pull-down menu, select Motorola Target Code.

Pepper Computer RS232 — 1.5.4 Demo Application diagram (page 39)
Fig. 18 · 1.5.4 Demo Application

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.

Introduction

Page 40 of the Pepper Computer RS232 user manual — 1.5.4 Demo Application
Page 40 · click to enlarge
Page 40

This page has been left blank intentionally.

Introduction

Page 43 of the Pepper Computer RS232 user manual — 2. SMART-BASE
Page 43 · click to enlarge
Page 43

2. SMART-BASE

The SMART-BASE is the main unit to which up to three SMART-Modules may be connected to fulfil a given I/O task with I/O enhancement being provided through the connection of a SMART-EXT unit which itself may accommodate up to 2 SMART-Modules. A counter/timer is also a standard feature providing direct access to IRQ4 of the I/O controller. The driving force behind the SMART-BASE is the MC68302 microprocessor from Motorola operating at 20MHz.

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 1MByte FLASH memory may be ordered as an option in which to extend the standard code and supply user-specific functionality.

Chapter 2 SMART-BASE

Page 44 of the Pepper Computer RS232 user manual — 2.1 Specifications
Page 44 · click to enlarge
Page 44

2.1 Specifications

DC/DC Nominal Input Voltage 24V DC Input Voltage Range 18V - 36V DC

Input Current 140mA typ. @ 24V (static) 400mA typ. @ 24V (full load) Main Output Voltage 5V DC / 1.2A ± 2.5% Auxiliary Output Voltage 5V DC / 150mA (PROFIBUS/RS485) ± 5% Switching Frequency 100kHz Main Output Ripple ± 10mV typ. Max. Efficiency 68% typ. (between 74% and 100% load) Galvanic Isolation 500V DC max. to/from supply source Controlling Unit CPU MC68302 @ 20MHz

EPROM or FLASH* 1 MByte or 256 kByte on Jedec 32-pin sockets (16-bit access) FLASH* 1 MByte or 256 kByte additionally soldered on rear side of the board (16-bit access) DRAM 512 kByte, byte/word access (16-bit) SRAM 64 kByte, byte/word access (16-bit) EEPROM 93C46, 32-byte system data Galvanic Isolation 2.5kV DC to/from process I/O

Common Temperature Range - Storage - Operating - Extended

-40°C to + 85°C (without battery) 0°C to +70°C -40°C to +85°C Operating Humidity 0 to 95% non-condensing Weight 640g typ. without SMART-Modules, blank panels or screw terminals

Chapter 2 SMART-BASE · * Option

Page 45 of the Pepper Computer RS232 user manual — BU1 SCR2 SCR1 SCR5 SCR4 SCR3
Page 45 · click to enlarge
Page 45

2.2 Board Overview

(PROFIBUS)

SPI

Pepper Computer RS232 — 2.2 Board Overview diagram (page 45)
Fig. 19 · 2.2 Board Overview

I/O Slot #2 I/O Slot #1 I/O Slot #0

BU1 SCR2 SCR1 SCR5 SCR4 SCR3

Pepper Computer RS232 — BU1 SCR2 SCR1 SCR5 SCR4 SCR3 diagram (page 45)
Fig. 20
Show 4 more labels / short text on this page
Chapter 2 SMART-BASE · Front view · RS485 Isolated · Rear View
Page 46 of the Pepper Computer RS232 user manual — DC/DC
Page 46 · click to enlarge
Page 46

2.3 Functional Description

Figure 2.3.0.1SMART I/O Block Diagram

MCU

FLASH EPROM

MC68302 @ 20 MHz

SRAM

RS485 RS232

Interface I/O Controller Timer/Counter

DC/DC

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 systems supporting FLASH memory for this task or to the RAM disk etc.

Show 7 more labels / short text on this page
Chapter 2 SMART-BASE · Memory · Clock Generators · Serial Interfaces · SPI Interface · SMART-Module · Interface
Page 47 of the Pepper Computer RS232 user manual — 2.3 Functional Description
Page 47 · click to enlarge
Page 47

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

Pepper Computer RS232 — 2.3 Functional Description diagram (page 47)
Fig. 21 · 2.3 Functional Description

Chapter 2 SMART-BASE

Page 48 of the Pepper Computer RS232 user manual — BU1 SCR2 SCR1 SCR5 SCR4 SCR3
Page 48 · click to enlarge
Page 48

2.4 Configuration

The SMART BASE has 2 configurable jumpers which are explained in the following sections. The jumper settings marked in italics in the tables are default.

Figure 2.4.0.1SMART BASE Jumper Layout (Front View)

(PROFIBUS)

SPI

Pepper Computer RS232 — (PROFIBUS) diagram (page 48)
Fig. 22

I/O Slot #2 I/O Slot #1 I/O Slot #0

BU1 SCR2 SCR1 SCR5 SCR4 SCR3

2.4.1 Jumper J1Boot Selection (Pin Connector)

The jumper J1 selects whether the SMART I/O boots directly from OS-9 or from ISaGRAF.

Jumper J1 Description 1-3 Application Boot (ISaGRAF) 1-2 OS-9 Shell Boot

Chapter 2 SMART-BASE · RS485 Isolated

Page 49 of the Pepper Computer RS232 user manual — SCR1 SCR5 SCR4 SCR3
Page 49 · click to enlarge
Page 49
2.4.2 Jumper J6LED Function (Pin Connector)

This jumper selects the function of the red LED; halt or user defined. The user defined function that is supported in software will only take effect if this jumper is set accordingly.

Jumper J6 Description 1-3 Processor HALT function monitor 1-2 User defined function

2.5 Pinouts

Figure 2.5.0.1SMART-BASE Connector Overview
Pepper Computer RS232 — 2.5 Pinouts diagram (page 49)
Fig. 23 · 2.5 Pinouts

Pin 1 Pin 8

SCR1 SCR5 SCR4 SCR3

Pepper Computer RS232 — SCR1 SCR5 SCR4 SCR3 diagram (page 49)
Fig. 24
Show 5 more labels / short text on this page
Chapter 2 SMART-BASE · Pin 1 · Pin 2 · Pin 10 · Pin 9
Page 50 of the Pepper Computer RS232 user manual — 2.5.1 SMART Module Piggyback Connectors
Page 50 · click to enlarge
Page 50

Slot# numbers are counted from #0 up to #10 while the ISaGRAF logic counts from #1 to #11!

2.5.1 SMART Module Piggyback Connectors

There are three sets of SMART Module piggyback connectors available on the SMART-BASE, each divided into two sets of 2x8 standard pin rows.

Pinouts digital side (ST1, ST3 and ST5)

SMART-Module location #0 (ST5) pinouts

Pin Nr. Signal Description Pin Nr. Signal Description 1 PA8 68302 Port A8 2 PA9 68302 Port A9 3 PA10 68302 Port A10 4 PA11 68302 Port A11 5 PA12 68302 Port A12 6 PA13 68302 Port A13 7 PA14 68302 Port A14 8 PA15 68302 Port A15 9 System GND GND 10 Serial RxD RxD 11 System VCC 5V VCC 12 Serial TxD TxD 13 CS-SM1 Port Select (Module 0) 14 Serial CLK CLK

15 Reset Reset (Power ON/OFF) 16 SM1 Interrupt PI/T INT3 to the I/O Controller

SMART-Module location #1 (ST3) pinouts

Pin Nr. Signal Description Pin Nr. Signal Description 1 PITB0 I/O Controller Port B0 2 PITB1 I/O Controller Port B1 3 PITB2 I/O Controller Port B2 4 PITB3 I/O Controller Port B3 5 PITB4 I/O Controller Port B4 6 PITB5 I/O Controller Port B5 7 PITB6 I/O Controller Port B6 8 PITB7 I/O Controller Port B7 9 System GND GND 10 Serial RxD RxD 11 System VCC 5V VCC 12 Serial TxD TxD 13 CS-SM2 Port Select (Module 1) 14 Serial CLK CLK

15 Reset Reset (Power ON/OFF) 16 SM2 Interrupt PI/T INT2 to the I/O Controller

Chapter 2 SMART-BASE

Page 51 of the Pepper Computer RS232 user manual — WARNING !
Page 51 · click to enlarge
Page 51

SMART-Module location #2 (ST1) pinouts

Pin Nr. Signal Description Pin Nr. Signal Description 1 PITA0 I/O Controller Port A0 2 PITA1 I/O Controller Port A1 3 PITA2 I/O Controller Port A2 4 PITA3 I/O Controller Port A3 5 PITA4 I/O Controller Port A4 6 PITA5 I/O Controller Port A5 7 PITA6 I/O Controller Port A6 8 PITA7 I/O Controller Port A7 9 System GND GND 10 Serial RxD RxD 11 System VCC 5V VCC 12 Serial TxD TxD 13 CS-SM3 Port Select (Module 2) 14 Serial CLK CLK

15 Reset Reset (Power ON/OFF) 16 SM3 Interrupt PI/T INT1 to the I/O Controller

Pinouts process side (ST6, ST4 and ST2) for Modules #0 to #2

Pin Nr. Signal Pin Nr. Signal 1 Screw Terminal 13 2 Screw Terminal 13 3 Screw Terminal 1 4 Screw Terminal 2 5 Screw Terminal 3 6 Screw Terminal 4 7 Screw Terminal 5 8 Screw Terminal 6 9 Screw Terminal 7 10 Screw Terminal 8 11 Screw Terminal 9 12 Screw Terminal 10 13 Screw Terminal 11 14 Screw Terminal 12 15 Screw Terminal 14 16 Screw Terminal 14

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 !

Chapter 2 SMART-BASE

Page 52 of the Pepper Computer RS232 user manual — 2.5.2 Screw Terminal Pinouts
Page 52 · click to enlarge
Page 52

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.

2.5.3 Timer I/O Screw Terminal (SCR1)

Pin Nr. Signal Description Pin Nr. Signal Description 1 External VCC 5V VCC 2 TOUT Timer OUT 3 External GND Ground for TIN, TOUT 4 TIN Timer IN 5 External GND Ground for TGATE 6 GATE GATE Connection

Show 9 more labels / short text on this page
Chapter 2 SMART-BASE · Pin 1 · Pin 13 · Pin 2 · Pin 14 · Pin 1 · Pin 5 · Pin 2 · Pin 6
Page 53 of the Pepper Computer RS232 user manual — TIN
Page 53 · click to enlarge
Page 53

To understand the functionality of the counter/timer, it is necessary to understand the purpose of TIN, TOUT and TGATE. Figure 2.5.3.1 shows the block diagram of TIN.

Figure2.5.3.1 Timer I/O (TIN) Schematic

TIN GATE

Input Low Pass Filter Input Circuit

TIN

GATE

Low Pass Filter Input Circuit

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.

Show 7 more labels / short text on this page
Chapter 2 SMART-BASE · +Vcc (24V) · Digital · Timer I/O · Gnd (common) · +Vcc (24V) · Gnd (common)
Page 54 of the Pepper Computer RS232 user manual — 1 SHIELD
Page 54 · click to enlarge
Page 54

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 is 5kHz.

Figure 2.5.3.2Timer I/O (TOUT) Schematic

Digital Output Timer I/O

TOUT

2.5.4 Supply Screw Terminals (SCR2)

Pin Nr. Signal

1 SHIELD

2 GND

3 +24V

Pin 1 Pin 3

Show 6 more labels / short text on this page
Chapter 2 SMART-BASE · +Vcc (common) · Output · Stage · Load · Gnd
Page 55 of the Pepper Computer RS232 user manual — 2.5.5 RS232 Telephone Connector (BU1)
Page 55 · click to enlarge
Page 55

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.

1 2 8 Pin Nr. Signal Description 1 DSR Data Set Ready 2 RTS Ready to Send 3 System GND System GND 4 TxD Transmit Line 5 RxD Receive Line 6 DCD Data Carrier Detect 7 CTS Clear to Send 8 DTR 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 6 Aux. +5V Auxiliary +5V 2 N/C Not Connected 7 N/C Not Connected 3 T/RxD + Transmit / Receive Line 8 T/RxD - Transmit / Receive Line 4 CNTR +* Control Line 9 CNTR -* Control Line 5 Aux. GND Auxiliary Ground

* optional, for full-duplex operation

Chapter 2 SMART-BASE

Page 56 of the Pepper Computer RS232 user manual — SMART-BASE
Page 56 · click to enlarge
Page 56

The full-duplex description may be found in the SMART-I/O Advanced User’s Guide.

There is 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 voltage of +5V emanating from the PROFIBUS connector (pin 6), the following resistor values are recommended.

Ru = 390Ω

Rt = 150Ω

Rt 150Ω ± 2%, min 0.25W RU 390Ω ± 2%, min 0.25W Rd 390Ω ± 2%, min 0.25W

Rd = 390Ω

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 3 System VCC 4 Serial TxD 5 Serial Ext. Select 6 Serial CLK 7 System GND 8 Reset

ST7

Pin 1 Pin 2

Pin 9 Pin 10

9 System GND 10 Serial Ext. Interrupt (Controller I/O IRQ4)

SMART-BASE

Chapter 2 SMART-BASE · T/RxD + · T/RxD -

Page 57 of the Pepper Computer RS232 user manual — 2.6 ‘C’ Programming
Page 57 · click to enlarge
Page 57

2.6 ‘C’ Programming

2.6.1 SMART-BASE Library

The SMART-BASE library of functions smartio.l provide a convenient way of accessing various features of the SMART-BASE.

  • All functions are written in ANSI C;
  • Prototypes are to be found in the file BSP/SMART/DEFS/SMAC.h .
  • SMART I/O Base Module.

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- vanced User’s guide.

Chapter 2 SMART-BASE · Hardware Requirements · Software Requirements

Page 58 of the Pepper Computer RS232 user manual — 2.6.2 SMTselIn
Page 58 · click to enlarge
Page 58

2.6.2 SMTselIn

This function selects one of four possible counter/timer input (TIN) configu- rations utilizing the 6MHz internal counter/timer clock.

u_int8 mode This represents the four input configurations. They are:

MODE00 The Simple I/O/TIN input pin carries the Simple I/O and the CLK and prescaler are used. The prescaler is 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 $1F.

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

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 is loaded from the counter preload registers when the prescaler rolls over from $00 to $1F.

Show 5 more labels / short text on this page
Chapter 2 SMART-BASE · Syntax · error_code SMTselIn(u_int8 mode); · Description · Input
Page 59 of the Pepper Computer RS232 user manual — 2.6.2 SMTselIn
Page 59 · click to enlarge
Page 59

MODE11 The Simple I/O/TIN pin serves as a timer input and the prescaler is not used. The 24-bit counter is decremented, rolls over or is loaded from the counter preload registers following the rising edge of the TIN pin after being synchronized with the internal clock.

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(MODE00);

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 is 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 detect is reached, 3) the clock input, 4) whether the prescaler is used and 5) whether the timer is enabled.

Chapter 2 SMART-BASE · Output

Page 60 of the Pepper Computer RS232 user manual — T OUT OFF
Page 60 · click to enlarge
Page 60

2.6.3 SMTsettout

This function sets the timer output (TOUT) control.

Input u_int8 mode Two modes of TOUT control are available. They are: MODE_PORTC tout has the Simple I/O function. MODE_SQUARE tout toggles on counter zero. When the timer is stopped, tout is high (see diagram).

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 OUT OFF

ON

The high state of TOUT illustrated in the above diagram shows that the output is deactivated i.e. OFF. Only when TOUT is in the low state can a load be driven.

Show 7 more labels / short text on this page
Chapter 2 SMART-BASE · Syntax · error_code SMTsettout(u_int8 mode); · Description · Timer · Stop · t
Page 61 of the Pepper Computer RS232 user manual — 2.6.4 SMTpre
Page 61 · click to enlarge
Page 61

2.6.4 SMTpre

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 Manual Error Codes Section).

Example RetVal = SMTpre(0);

Show 4 more labels / short text on this page
Chapter 2 SMART-BASE · Syntax · error_code SMTpre(u_int32 *value); · Description
Page 62 of the Pepper Computer RS232 user manual — TOUT/TIAC
Page 62 · click to enlarge
Page 62

Example for a Square Wave Generator

The Timer Control Register

7 6 5 4 3 2 1 0

TOUT/TIAC

Z.D. Control • Clock Control

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 is again loaded with the contents of the CPRs and thereafter decrements.

Chapter 2 SMART-BASE · Timer Enable · Control

Page 63 of the Pepper Computer RS232 user manual — 2.6.5 SMTstasto
Page 63 · click to enlarge
Page 63

2.6.5 SMTstasto

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: TMR_STRT 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 Codes Section).

Example RetVal = SMTstasto(TMR_STRT);

Show 4 more labels / short text on this page
Chapter 2 SMART-BASE · Syntax · error_code SMTstasto(u_int8 mode); · Description
Page 64 of the Pepper Computer RS232 user manual — NOTE !
Page 64 · click to enlarge
Page 64

2.6.6 SMTrd

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 u_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);

Show 4 more labels / short text on this page
Chapter 2 SMART-BASE · Syntax · error_code SMTrd(u_int32 *value); · Description
Page 65 of the Pepper Computer RS232 user manual — 2.6.7 SMTtin
Page 65 · click to enlarge
Page 65

2.6.7 SMTtin

This function reads the current level present on TIN/PC2.

Input u_int8 *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);

Show 4 more labels / short text on this page
Chapter 2 SMART-BASE · Syntax · error_code SMTtin(u_int8 *value); · Description
Page 66 of the Pepper Computer RS232 user manual — 2.6.8 SMTstat
Page 66 · click to enlarge
Page 66

2.6.8 SMTstat

This function reads the timer status register and clears it if 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)

  • 7 6 5 4 3 2 1 0
  • ZDS

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 is cleared to zero following the direct reset operation or when the timer is halted. This register is always readable without consequence. A write access performs a direct reset operation if bit 0 in the written data is one!

Show 4 more labels / short text on this page
Chapter 2 SMART-BASE · Syntax · error_code SMTstat(u_int8 *value); · Description
Page 67 of the Pepper Computer RS232 user manual — 2.6.9 SMTout
Page 67 · click to enlarge
Page 67

2.6.9 SMTout

This function reads the actual status of the TOUT pin.

Input u_int8 *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);

Show 4 more labels / short text on this page
Chapter 2 SMART-BASE · Syntax · error_code SMTout(u_int8 *value); · Description
Page 68 of the Pepper Computer RS232 user manual — 2.6.10 SMLed
Page 68 · click to enlarge
Page 68

2.6.10 SMLed

error_code SMLed(u_int8 led, u_int8 value);

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 error_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(USERL1, 0);

Chapter 2 SMART-BASE · Syntax · Description

Page 69 of the Pepper Computer RS232 user manual — 2.6.11 SMwdon
Page 69 · click to enlarge
Page 69

2.6.11 SMwdon

This function activates the watchdog timer of the 68302. If timeout is reached, the system is reset; in normal operating mode, this must be avoided by periodically triggering the watchdog using the function SMwdtrig.

Input u_int32 *time 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);

Show 4 more labels / short text on this page
Chapter 2 SMART-BASE · Syntax · error_code SMwdon(u_int32 *time); · Description
Page 70 of the Pepper Computer RS232 user manual — 2.6.12 SMwdtrig
Page 70 · click to enlarge
Page 70

2.6.12 SMwdtrig

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();

Show 4 more labels / short text on this page
Chapter 2 SMART-BASE · Syntax · error_code SMwdtrig(void); · Description
Page 71 of the Pepper Computer RS232 user manual — 2.6.13 SMwdoff
Page 71 · click to enlarge
Page 71

2.6.13 SMwdoff

This function deactivates the watchdog timer.

error_code SUCCESS or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).

Example RetVar = SMwdoff();

Show 5 more labels / short text on this page
Chapter 2 SMART-BASE · Syntax · error_code SMwdoff(void); · Description · Output
Page 72 of the Pepper Computer RS232 user manual — 2.7 ISaGRAF Programming
Page 72 · click to enlarge
Page 72

2.7 ISaGRAF Programming

2.7.1 The ISaGRAF Board Parameters

Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual.

Figure 2.7.1.1 Typical Screen Section for the SMART-BASE

Because the communication to the timer/counter is performed using Operate Calls, there is no need for manual selection of such things as a logical address etc. t_in represents a variable for the counter timer and is used for the operate call to decide which port to access.

Chapter 2 SMART-BASE

Page 73 of the Pepper Computer RS232 user manual — 2.7.2 The ISaGRAF Operate Calls
Page 73 · click to enlarge
Page 73

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:

:= OPERATE(, COMMAND,

Here the return variable is assigned a value associated with the selected COMMAND parameter. A number of these COMMANDS exist for the SMART-BASE.

Example:

:= OPERATE(, 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 a SMART-Module is 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 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.

Chapter 2 SMART-BASE · );

Page 74 of the Pepper Computer RS232 user manual — 2.7.2 The ISaGRAF Operate Calls
Page 74 · click to enlarge
Page 74

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_POWERFAIL_SETThe purpose of this operate call is to detect when

(if) 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 is 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.

Chapter 2 SMART-BASE · Voltage · Time

Page 75 of the Pepper Computer RS232 user manual — 2.7.2 The ISaGRAF Operate Calls
Page 75 · click to enlarge
Page 75
O_START_COUNTERThis call starts the counter; it’s syntax is as follows :

:= OPERATE(, O_START_COUNTER, );

where the is typically t_in.

O_READ_COUNTER: With this call the contents of the counter register may be read. When this call is issued, the counter is stopped, it’s register read and then restarted. If a high-frequency input exists then pulses may be lost (not counted). 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 (

:= OPERATE(, O_READ_COUNTER, );

where the 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 :

:= OPERATE(, O_STOP_COUNTER, );

where the is typically t_in.

The counter/timer is configured automatically as MODE10 (refer to the ‘C’ Programming section) and from within ISaGRAF there is no ability to alter this configuration.

Chapter 2 SMART-BASE

Page 76 of the Pepper Computer RS232 user manual — 2.7.2 The ISaGRAF Operate Calls
Page 76 · click to enlarge
Page 76

O_PRELOAD: With this call the counter preload register can be set. The syntax is as follows :

:= OPERATE(, O_PRELOAD, );

where the is typically t_in and is the value for the preload register which lies between 1 and 0xFFFFFF.

O_START_CNTDWN: This function starts the counter counting-down. When the counter reaches zero, it rolls over to the maximum value of 0xFFFFFF on the following clock pulse and starts afresh. The syntax is as follows :

:= OPERATE(,O_START_CNTDWN,);

where the is a variable attached to the Timer I/O (typically t_in) and may be one of OA_PITCLOCK for selection of the 6 MHz/32 clock input or OA_TIN for selection of t_in inputs.

Chapter 2 SMART-BASE

Page 77 of the Pepper Computer RS232 user manual — 2.8 Flash Utility
Page 77 · click to enlarge
Page 77

2.8 Flash Utility

The flash utility allows ISaGRAF applications, a new ISaGRAF kernel or other OS-9 modules to be loaded into FLASH memory. The SMART I/O may be equipped with 1 MByte of memory depending on the version or- dered. If an application is stored in FLASH then it will be loaded into the system at start-up.

The main features of this utility are:

  • Erase memory
  • Fill memory
  • Append memory
  • Read memory

The following syntax should be observed:

To erase the FLASH:

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

Chapter 2 SMART-BASE · flash -b[board] · Examples

Page 78 of the Pepper Computer RS232 user manual — 2.8 Flash Utility
Page 78 · click to enlarge
Page 78

Example to download ISA11 module and store in FLASH

Start the isa terminal in MS Windows:

Press the key three times to display the following screen prompt:

Isa:

Start kermit on the target system

Isakermit ri <ENTER>

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

Isaload -ld/dd/APL/flash

Start kermit on the target system again

Isakermit ri <ENTER>

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/isa11

Chapter 2 SMART-BASE

Page 81 of the Pepper Computer RS232 user manual — 3.1 Specifications
Page 81 · click to enlarge
Page 81

3. SMART-EXT

The SMART-EXT is a carrier unit enabling the connection of a further 2 SMART-Modules thereby enhancing the I/O capacity of the SMART I/O system. Up to 4 of these extensions may be cascaded via a 10-wire flat-band cable with integrated 3-wire SPI (Serial Peripheral Interface). To achieve a common interface between modules, a SMART I/O ‘C’ library is provided by PEP.

3.1 Specifications

Controller - Frequency - Firmware

MC68HC705C8A 4 MHz PEP Firmware for OTP device

Interface Speed Set to 1 MHz Power Consumption Typ. 25 mW Temperature Range - Storage - Standard - Extended

-20°C to + 125°C 0°C to +70°C -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 is beyond the scope of this manual to describe. More information may be found by referring to the relevant data-sheets.

Chapter 3 SMART-EXT

Page 82 of the Pepper Computer RS232 user manual — SCRA SCRB
Page 82 · click to enlarge
Page 82

3.2 Board Overview

SPI

Pepper Computer RS232 — 3.2 Board Overview diagram (page 82)
Fig. 25 · 3.2 Board Overview

To further SMART-EXT Modules From SMART-BASE or other SMART-EXT Modules

SCRA SCRB

Chapter 3 SMART-EXT

Page 83 of the Pepper Computer RS232 user manual — SPI
Page 83 · click to enlarge
Page 83

3.3 Functional Description

Figure 3.3.1SMART-EXT Block Diagram

SPI

SPI

A

B

The SMART-EXT is a carrier board for up to 2 SMART-Modules with data transfer between SMART-BASE and EXT units being performed by the interface connector incorporating the Motorola synchronous Serial Peripheral Interface (SPI).

The maximum bit transfer rate is set to 1 MHz which ensures a typical response time from an addressed extension slot of approximately 50µs.

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.

Show 10 more labels / short text on this page
Chapter 3 SMART-EXT · Interface Connector · Interface Connector · Slot Detect · with Integrated · Logic and · with Integrated · Buffer · Slot · Slot
Page 84 of the Pepper Computer RS232 user manual — Table of contents
Page 84 · click to enlarge
Page 84

Table of contents

Preface.pdfp.1Table of Contentsp.1Unpacking and Special Handling Instructionsp.1Revision Historyp.1PEP Modular Computers Two Year Limited Warrantyp.1General Informationp.132. SMART-BASEp.413. SMART-EXTp.794. Digital Modulesp.15. Analog Modulesp.1576. Communications Modulesp.283Introduction.pdfp.13Table of Contentsp.13General Informationp.15Weights & Measuresp.161.1 Product Overviewp.201.2 Ordering Informationp.211.3 Product Informationp.221.4 Installationp.251.4.1 Overviewp.251.4.2 SMART I/O Module Installationp.271.4.3 RJ45 Telephone Connector Installationp.281.4.4 Screw Terminal Block Installationp.281.4.5 Battery Installationp.291.5 ISaGRAF-Installationp.301.5.1 Before Installingp.301.5.2 Installation of the ISaGRAF for Windows Workbenchp.311.5.3 Installation of PEP Library Functionsp.331.5.4 Demo Applicationp.38SM-BASE.pdfp.41Table of Contentsp.412. SMART-BASEp.432.1 Specificationsp.442.2 Board Overviewp.452.3 Functional Descriptionp.462.4 Configurationp.482.4.1 Jumper J1: Boot Selection (Pin Connector)p.482.4.2 Jumper J6: LED Function (Pin Connector)p.492.5 Pinoutsp.492.5.1 SMART Module Piggyback Connectorsp.502.5.2 Screw Terminal Pinoutsp.522.5.3 Timer I/O Screw Terminal (SCR1)p.522.5.4 Supply Screw Terminals (SCR2)p.542.5.5 RS232 Telephone Connector (BU1)p.552.5.6 RS485 D-Sub Connector for Half-Duplex Operation (Profibus)p.552.5.7 SPI Connector (ST7)p.562.6 ‘C’ Programmingp.572.6.1 SMART-BASE Libraryp.572.6.2 SMTselInp.582.6.3 SMTsettoutp.602.6.4 SMTprep.612.6.5 SMTstastop.632.6.6 SMTrdp.642.6.7 SMTtinp.652.6.8 SMTstatp.662.6.9 SMToutp.672.6.10 SMLedp.682.6.11 SMwdonp.692.6.12 SMwdtrigp.702.6.13 SMwdoffp.712.7 ISaGRAF Programmingp.722.7.1 The ISaGRAF Board Parametersp.722.7.2 The ISaGRAF Operate Callsp.732.8 Flash Utilityp.77SM-EXT.pdfp.79Table Of Contentsp.793. SMART-EXTp.813.1 Specificationsp.813.2 Board Overviewp.823.3 Functional Descriptionp.833.4 Pinoutsp.843.4.1 SMART Module Piggyback Connectorsp.853.4.2 Parallel I/O Screw Terminals (SCRA and SCRB)p.863.4.3 SPI Connectors (ST5 and BU1)p.87Digital.pdfp.1Table of Contentsp.14. Digital Modulesp.934.1 SM-DIN1p.934.1.1 Introductionp.934.1.2 Specificationsp.934.1.3 Front Panel Layoutp.944.1.4 Board Overviewp.954.1.5 Functional Descriptionp.964.1.6 Configurationp.974.1.7 Pinoutsp.984.1.8 ‘C’ Programmingp.1004.1.8.1 SM-DIN1 Libraryp.1004.1.8.2 SMDIN1Initp.1014.1.8.3 SMDIN1DeInitp.1024.1.8.4 SMDIN1Getp.1034.1.9 ISaGRAF Programmingp.1044.1.9.1 The ISaGRAF Board Parametersp.1044.1.9.2 The ISaGRAF Operate Callsp.1054.2 SM-DOUT1p.1074.2.1 Introductionp.1074.2.2 Specificationsp.1074.2.3 Front Panel Layoutp.1084.2.4 Board Overviewp.1084.2.5 Functional Descriptionp.1094.2.6 Configurationp.1104.2.7 Pinoutsp.1104.2.8 ‘C’ Programmingp.1124.2.8.1 SM-DOUT1 Libraryp.1124.2.8.2 SMDOUT1Initp.1134.2.8.3 SMDOUT1DeInitp.1144.2.8.4 SMDOUT1Getp.1154.2.8.5 SMDOUT1Setp.1164.2.9 ISaGRAF Programmingp.1174.2.9.1 The ISaGRAF Board Parametersp.1174.2.9.2 The ISaGRAF Operate Callsp.1184.3 SM-REL1p.1214.3.1 Introductionp.1214.3.2 Specificationsp.1214.3.3 Front Panel Layoutp.1224.3.4 Board Overviewp.1224.3.5 Functional Descriptionp.1234.3.6 Configurationp.1244.3.7 Pinoutsp.1244.3.8 ‘C’ Programmingp.1264.3.8.1 SM-REL1 Libraryp.1264.3.8.2 SMREL1Initp.1274.3.8.3 SMREL1DeInitp.1284.3.8.4 SMREL1Resetp.1294.3.8.5 SMREL1GetRlyp.1304.3.8.6 SMREL1SetRlyp.1314.3.8.7 SMREL1GetLedp.1324.3.8.8 SMREL1SetLedp.1334.3.8.9 SMREL1GetExtVccp.1344.3.9 ISaGRAF Programmingp.1354.3.9.1 The ISaGRAF Board Parametersp.1354.3.9.2 The ISaGRAF Operate Callsp.136Analog.pdfp.157Table of Contentsp.1585. Analog Modulesp.1635.1 SM-DAD1p.1635.1.1 Introductionp.1635.1.2 Specificationsp.1635.1.3 Front Panel Layoutp.1645.1.4 Board Overviewp.1655.1.5 Functional Descriptionp.1665.1.5.1 Input Circuitryp.1665.1.5.2 Output Circuitryp.1675.1.6 Configurationp.1685.1.7 Pinoutsp.1695.1.8 ‘C’ Programmingp.1725.1.8.1 SM-DAD1 Libraryp.1725.1.8.2 SMDAD1Initp.1735.1.8.3 SMDAD1DeInitp.1745.1.8.4 SMDAD1GetVRawp.1755.1.8.5 SMDAD1GetVp.1765.1.8.6 SMDAD1PutVRawp.1775.1.8.7 SMDAD1PutVp.1785.1.8.8 SMDAD1SetLedp.1795.1.8.9 SMDAD1ClrLedp.1805.1.9 ISaGRAF Programmingp.1815.1.9.1 The ISaGRAF Board Parametersp.1815.1.9.2 The ISaGRAF Operate Callsp.1825.2 SM-PT100p.1855.2.1 Introductionp.1855.2.2 Specificationsp.1855.2.3 Front Panel Layoutp.1865.2.4 Board Overviewp.1865.2.5 Functional Descriptionp.1875.2.6 Configurationp.1895.2.7 Pinoutsp.1895.2.8 ‘C’ Programmingp.1915.2.8.1 SM-PT100 Libraryp.1915.2.8.2 SMADCInitp.1955.2.8.3 SMADCCalibratep.1965.2.8.4 SMADCSetCyclicCalibp.1975.2.8.5 SMADCSetSensorTypep.1985.2.8.6 SMADCGetSensorTypep.1995.2.8.7 SMADCSetPrecisionp.2005.2.8.8 SMADCGetPrecisionp.2015.2.8.9 SMADCSetModep.2025.2.8.10 SMADCGetMode 5-47p.2035.2.8.11 SMADCSetSignalp.2045.2.8.12 SMADCSetGainp.2055.2.8.13 SMADCGetGainp.2065.2.8.14 SMADCEnableReadp.2075.2.8.15 SMADCEnableConversionp.2085.2.8.16 SMADCReadRawp.2095.2.8.17 SMADCReadConvertedp.2105.2.8.18 SMADCDeinitp.2115.2.9 ISaGRAF Programmingp.2125.2.9.1 The ISaGRAF Board Parametersp.2125.2.9.2 The ISaGRAF Operate Callsp.2135.3 SM-THERMp.2155.3.1 Introductionp.2155.3.2 Specificationsp.2155.3.3 Front Panel Layoutp.2165.3.4 Board Overviewp.2165.3.5 Functional Descriptionp.2175.3.6 Configurationp.2185.3.7 Pinoutsp.2185.3.8 ‘C’ Programmingp.2205.3.8.1 SM-THERM Libraryp.2205.3.8.2 SMADCInitp.2245.3.8.3 SMADCCalibratep.2255.3.8.4 SMADCSetCyclicCalibp.2265.3.8.5 SMADCSetSensorTypep.2275.3.8.6 SMADCGetSensorTypep.2285.3.8.7 SMADCSetPrecisionp.2295.3.8.8 SMADCGetPrecisionp.2305.3.8.9 SMADCSetMode 5-75p.2315.3.8.10 SMADCGetModep.2325.3.8.11 SMADCSetSignalp.2335.3.8.12 SMADCSetGainp.2345.3.8.13 SMADCGetGainp.2355.3.8.14 SMADCEnableReadp.2365.3.8.15 SMADCEnableConversionp.2375.3.8.16 SMADCReadRawp.2385.3.8.17 SMADCReadConvertedp.2395.3.8.18 SMADCDeinitp.2405.3.9 ISaGRAF Programmingp.2415.3.9.1 The ISaGRAF Board Parametersp.2415.3.9.2 The ISaGRAF Operate Callsp.2425.4 SM-ADC1p.2455.4.1 Introductionp.2455.4.2 Specificationsp.2455.4.3 Front Panel Layoutp.2465.4.4 Board Overviewp.2465.4.5 Functional Descriptionp.2475.4.5.1 Input Circuitryp.2475.4.6 Configurationp.2485.4.7 Pinoutsp.2485.4.8 ‘C’ Programmingp.2505.4.8.1 SM-ADC1 Libraryp.2505.4.8.2 SMADC1Initp.2515.4.8.3 SMADC1GetVRawp.2525.4.8.4 SMADC1GetVp.2535.4.8.5 SMADC1SetLedp.2545.4.8.6 SMADC1ClrLedp.2555.4.8.7 SMADC1DeInitp.2565.4.9 ISaGRAF Programmingp.2575.4.9.1 The ISaGRAF Board Parametersp.2575.4.9.2 The ISaGRAF Operate Callsp.2585.5 SM-DAC1p.2635.5.1 Introductionp.2635.5.2 Specificationsp.2635.5.3 Front Panel Layoutp.2645.5.4 Board Overviewp.2645.5.5 Functional Descriptionp.2655.5.5.1 Output Circuitryp.2655.5.6 Configurationp.2665.5.7 Pinoutsp.2665.5.8 ‘C’ Programmingp.2695.5.8.1 SM-DAC1 Libraryp.2695.5.8.2 SMDAC1Initp.2705.5.8.3 SMDAC1OpenLoopp.2715.5.8.4 SMADAC1Operatep.2725.5.8.5 SMDAC1StandByp.2735.5.8.6 SMDAC1PutVRawp.2745.5.8.7 SMDAC1PutVp.2755.5.8.8 SMDAC1SetLedp.2765.5.8.9 SMDAC1ClrLedp.2775.5.8.10 SMDAC1DeInitp.2785.5.9 ISaGRAF Programmingp.2795.5.9.1 The ISaGRAF Board Parametersp.2795.5.9.2 The ISaGRAF Operate Callsp.280Comms.pdfp.283Table of Contentsp.2846. Communications Modulesp.2876.1 SM-RS232 6p.2876.1.1 Introductionp.2876.1.2 Specificationsp.2876.1.3 Front Panel Layoutp.2886.1.4 Board Overviewp.2886.1.5 Functional Descriptionp.2896.1.6 Configurationp.2906.1.7 Pinoutsp.2906.1.8 ISaGRAF Programmingp.2926.1.8.1 The ISaGRAF Board Parametersp.2926.1.8.2 The ISaGRAF Operate Callsp.2946.1.9 OS-9 Programmingp.2966.2 SM-SSIp.2996.2.1 Introductionp.2996.2.2 Specificationsp.2996.2.3 Front Panel Layoutp.3006.2.4 Board Overviewp.3006.2.5 Functional Descriptionp.3016.2.6 SSI Operationp.3026.2.7 Register Descriptionp.3046.2.7.1 Control Registerp.3046.2.7.2 CTRL1 Registerp.3056.2.7.3 CTRL2 Registerp.3056.2.7.4 CTRL3 Registerp.3056.2.7.5 Compare Registerp.3066.2.7.6 Identification Registerp.3066.2.7.7 Status Registerp.3066.2.7.8 STAT1 Registerp.3066.2.7.9 STAT2 Registerp.3076.2.7.10 Data Registerp.3076.2.8 MATCH Functionp.3086.2.9 Tested Sensorsp.3086.2.10 Configurationp.3096.2.11 Pinoutsp.3096.2.12 ‘C’ Programmingp.3116.2.12.1 SM-SSI Libraryp.3116.2.12.2 SMSSIInitp.3126.2.12.3 SMSSIDeInitp.3136.2.12.4 SMSSISetSetPointp.3146.2.12.5 SMSSISetCtrlRegp.3156.2.12.6 SMSSIGetStatusp.3166.2.12.7 SMSSIGetDatap.3176.2.13 ISaGRAF Programmingp.3186.2.13.1 The ISaGRAF Board Parametersp.318
Page 85 of the Pepper Computer RS232 user manual — 3.4.1 SMART Module Piggyback Connectors
Page 85 · click to enlarge
Page 85

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 68HC05C4 MCU port A (ST1)

Pin Nr. Signal Description Pin Nr. Signal Description 1 PA1 Port A Pin 1 2 PA2 Port A Pin 2 3 PA3 Port A Pin 3 4 PA4 Port A Pin 4 5 PA5 Port A Pin 5 6 PA6 Port A Pin 6 7 PA7 Port A Pin 7 8 PA8 Port A Pin 8 9 System GND GND 10 Serial RxD RxD to SM-BASE 11 System VCC System +5V VCC 12 Serial TxD TxD from SM-BASE 13 CS-SLOTA Chip Select A 14 Serial CLK CLK from SM-BASE

15 Reset Power ON/OFF Reset 16 Slot A Interrupt line INT4 to the I/O Controller

Slot B from 68HC05C4 MCU port B (ST3)

Pin Nr. Signal Description Pin Nr. Signal Description 1 PB1 Port B Pin 1 2 PB2 Port B Pin 2 3 PB3 Port B Pin 3 4 PB4 Port B Pin 4 5 PB5 Port B Pin 5 6 PB6 Port B Pin 6 7 PB7 Port B Pin 7 8 PB8 Port B Pin 8 9 System GND GND 10 Serial RxD RxD from SM-BASE 11 System VCC System +5V VCC 12 Serial TxD TxD from SM-BASE 13 CS-SLOTB Chip Select B 14 Serial CLK CLK from SM-BASE 15 Reset Power ON/OFF Reset 16 Slot B Interrupt line Interrupt PI/T (H4)

Chapter 3 SMART-EXT

Page 86 of the Pepper Computer RS232 user manual — WARNING !
Page 86 · click to enlarge
Page 86

Pinouts process side (ST2 and ST4)

Refer to figure 3.4.0.1 for the correct location of these pin-row connectors.

Slots A and B (ST2 and ST4)

Pin Nr. Signal Pin Nr. Signal 1 Screw Terminal 13 2 Screw Terminal 13 3 Screw Terminal 1 4 Screw Terminal 2 5 Screw Terminal 3 6 Screw Terminal 4 7 Screw Terminal 5 8 Screw Terminal 6 9 Screw Terminal 7 10 Screw Terminal 8 11 Screw Terminal 9 12 Screw Terminal 10 13 Screw Terminal 11 14 Screw Terminal 12 15 Screw Terminal 14 16 Screw Terminal 14

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 !

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.

Chapter 3 SMART-EXT

Page 87 of the Pepper Computer RS232 user manual — 3.4.3 SPI Connectors (ST5 and BU1)
Page 87 · click to enlarge
Page 87

3.4.3 SPI Connectors (ST5 and BU1)

On both sides of the board are standard 2x5 pinrow connectors (BU1, ST5), that provide the interface connection between SMART-EXT units and the SMART-BASE.

A 10-wire flat cable is soldered directly on the left-hand side of the board (BU1), that interfaces the SMART-BASE module or other (earlier cascaded) SMART-EXT modules.

Pinouts for this 10-pin connector

Pin Nr. Signal Pin Nr. Signal 1 System VCC (+5V) 2 Serial RxD from SMART-BASE 3 System VCC (+5V) 4 Serial TxD from SMART-BASE 5 Serial Ext. Select 6 Serial CLK from SMART-BASE 7 System GND 8 Reset (Power ON/OFF)

9 System GND 10 (BU1) Serial Ext. Interrupt (INT4 1st Module only) 10 (ST5) N/C

Pin 10 of BU1 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.

Chapter 3 SMART-EXT

Page 88 of the Pepper Computer RS232 user manual — 3.4.3 SPI Connectors (ST5 and BU1)
Page 88 · click to enlarge
Page 88

This page has been left blank intentionally.

Chapter 3 SMART-EXT

Page 89 of the Pepper Computer RS232 user manual — Digital Modules
Page 89 · click to enlarge
Page 89

Digital Modules

Digital Modules

08 Jan. 98

Page 4 - 1 Manual ID 09901, Rev. Index 0500

Page 90 of the Pepper Computer RS232 user manual — Table of contents
Page 90 · click to enlarge
Page 90

Table of contents

Preface.pdfp.1Table of Contentsp.1Unpacking and Special Handling Instructionsp.1Revision Historyp.1PEP Modular Computers Two Year Limited Warrantyp.1General Informationp.132. SMART-BASEp.413. SMART-EXTp.794. Digital Modulesp.15. Analog Modulesp.1576. Communications Modulesp.283Introduction.pdfp.13Table of Contentsp.13General Informationp.15Weights & Measuresp.161.1 Product Overviewp.201.2 Ordering Informationp.211.3 Product Informationp.221.4 Installationp.251.4.1 Overviewp.251.4.2 SMART I/O Module Installationp.271.4.3 RJ45 Telephone Connector Installationp.281.4.4 Screw Terminal Block Installationp.281.4.5 Battery Installationp.291.5 ISaGRAF-Installationp.301.5.1 Before Installingp.301.5.2 Installation of the ISaGRAF for Windows Workbenchp.311.5.3 Installation of PEP Library Functionsp.331.5.4 Demo Applicationp.38SM-BASE.pdfp.41Table of Contentsp.412. SMART-BASEp.432.1 Specificationsp.442.2 Board Overviewp.452.3 Functional Descriptionp.462.4 Configurationp.482.4.1 Jumper J1: Boot Selection (Pin Connector)p.482.4.2 Jumper J6: LED Function (Pin Connector)p.492.5 Pinoutsp.492.5.1 SMART Module Piggyback Connectorsp.502.5.2 Screw Terminal Pinoutsp.522.5.3 Timer I/O Screw Terminal (SCR1)p.522.5.4 Supply Screw Terminals (SCR2)p.542.5.5 RS232 Telephone Connector (BU1)p.552.5.6 RS485 D-Sub Connector for Half-Duplex Operation (Profibus)p.552.5.7 SPI Connector (ST7)p.562.6 ‘C’ Programmingp.572.6.1 SMART-BASE Libraryp.572.6.2 SMTselInp.582.6.3 SMTsettoutp.602.6.4 SMTprep.612.6.5 SMTstastop.632.6.6 SMTrdp.642.6.7 SMTtinp.652.6.8 SMTstatp.662.6.9 SMToutp.672.6.10 SMLedp.682.6.11 SMwdonp.692.6.12 SMwdtrigp.702.6.13 SMwdoffp.712.7 ISaGRAF Programmingp.722.7.1 The ISaGRAF Board Parametersp.722.7.2 The ISaGRAF Operate Callsp.732.8 Flash Utilityp.77SM-EXT.pdfp.79Table Of Contentsp.793. SMART-EXTp.813.1 Specificationsp.813.2 Board Overviewp.823.3 Functional Descriptionp.833.4 Pinoutsp.843.4.1 SMART Module Piggyback Connectorsp.853.4.2 Parallel I/O Screw Terminals (SCRA and SCRB)p.863.4.3 SPI Connectors (ST5 and BU1)p.87Digital.pdfp.1Table of Contentsp.14. Digital Modulesp.934.1 SM-DIN1p.934.1.1 Introductionp.934.1.2 Specificationsp.934.1.3 Front Panel Layoutp.944.1.4 Board Overviewp.954.1.5 Functional Descriptionp.964.1.6 Configurationp.974.1.7 Pinoutsp.984.1.8 ‘C’ Programmingp.1004.1.8.1 SM-DIN1 Libraryp.1004.1.8.2 SMDIN1Initp.1014.1.8.3 SMDIN1DeInitp.1024.1.8.4 SMDIN1Getp.1034.1.9 ISaGRAF Programmingp.1044.1.9.1 The ISaGRAF Board Parametersp.1044.1.9.2 The ISaGRAF Operate Callsp.1054.2 SM-DOUT1p.1074.2.1 Introductionp.1074.2.2 Specificationsp.1074.2.3 Front Panel Layoutp.1084.2.4 Board Overviewp.1084.2.5 Functional Descriptionp.1094.2.6 Configurationp.1104.2.7 Pinoutsp.1104.2.8 ‘C’ Programmingp.1124.2.8.1 SM-DOUT1 Libraryp.1124.2.8.2 SMDOUT1Initp.1134.2.8.3 SMDOUT1DeInitp.1144.2.8.4 SMDOUT1Getp.1154.2.8.5 SMDOUT1Setp.1164.2.9 ISaGRAF Programmingp.1174.2.9.1 The ISaGRAF Board Parametersp.1174.2.9.2 The ISaGRAF Operate Callsp.1184.3 SM-REL1p.1214.3.1 Introductionp.1214.3.2 Specificationsp.1214.3.3 Front Panel Layoutp.1224.3.4 Board Overviewp.1224.3.5 Functional Descriptionp.1234.3.6 Configurationp.1244.3.7 Pinoutsp.1244.3.8 ‘C’ Programmingp.1264.3.8.1 SM-REL1 Libraryp.1264.3.8.2 SMREL1Initp.1274.3.8.3 SMREL1DeInitp.1284.3.8.4 SMREL1Resetp.1294.3.8.5 SMREL1GetRlyp.1304.3.8.6 SMREL1SetRlyp.1314.3.8.7 SMREL1GetLedp.1324.3.8.8 SMREL1SetLedp.1334.3.8.9 SMREL1GetExtVccp.1344.3.9 ISaGRAF Programmingp.1354.3.9.1 The ISaGRAF Board Parametersp.1354.3.9.2 The ISaGRAF Operate Callsp.136Analog.pdfp.157Table of Contentsp.1585. Analog Modulesp.1635.1 SM-DAD1p.1635.1.1 Introductionp.1635.1.2 Specificationsp.1635.1.3 Front Panel Layoutp.1645.1.4 Board Overviewp.1655.1.5 Functional Descriptionp.1665.1.5.1 Input Circuitryp.1665.1.5.2 Output Circuitryp.1675.1.6 Configurationp.1685.1.7 Pinoutsp.1695.1.8 ‘C’ Programmingp.1725.1.8.1 SM-DAD1 Libraryp.1725.1.8.2 SMDAD1Initp.1735.1.8.3 SMDAD1DeInitp.1745.1.8.4 SMDAD1GetVRawp.1755.1.8.5 SMDAD1GetVp.1765.1.8.6 SMDAD1PutVRawp.1775.1.8.7 SMDAD1PutVp.1785.1.8.8 SMDAD1SetLedp.1795.1.8.9 SMDAD1ClrLedp.1805.1.9 ISaGRAF Programmingp.1815.1.9.1 The ISaGRAF Board Parametersp.1815.1.9.2 The ISaGRAF Operate Callsp.1825.2 SM-PT100p.1855.2.1 Introductionp.1855.2.2 Specificationsp.1855.2.3 Front Panel Layoutp.1865.2.4 Board Overviewp.1865.2.5 Functional Descriptionp.1875.2.6 Configurationp.1895.2.7 Pinoutsp.1895.2.8 ‘C’ Programmingp.1915.2.8.1 SM-PT100 Libraryp.1915.2.8.2 SMADCInitp.1955.2.8.3 SMADCCalibratep.1965.2.8.4 SMADCSetCyclicCalibp.1975.2.8.5 SMADCSetSensorTypep.1985.2.8.6 SMADCGetSensorTypep.1995.2.8.7 SMADCSetPrecisionp.2005.2.8.8 SMADCGetPrecisionp.2015.2.8.9 SMADCSetModep.2025.2.8.10 SMADCGetMode 5-47p.2035.2.8.11 SMADCSetSignalp.2045.2.8.12 SMADCSetGainp.2055.2.8.13 SMADCGetGainp.2065.2.8.14 SMADCEnableReadp.2075.2.8.15 SMADCEnableConversionp.2085.2.8.16 SMADCReadRawp.2095.2.8.17 SMADCReadConvertedp.2105.2.8.18 SMADCDeinitp.2115.2.9 ISaGRAF Programmingp.2125.2.9.1 The ISaGRAF Board Parametersp.2125.2.9.2 The ISaGRAF Operate Callsp.2135.3 SM-THERMp.2155.3.1 Introductionp.2155.3.2 Specificationsp.2155.3.3 Front Panel Layoutp.2165.3.4 Board Overviewp.2165.3.5 Functional Descriptionp.2175.3.6 Configurationp.2185.3.7 Pinoutsp.2185.3.8 ‘C’ Programmingp.2205.3.8.1 SM-THERM Libraryp.2205.3.8.2 SMADCInitp.2245.3.8.3 SMADCCalibratep.2255.3.8.4 SMADCSetCyclicCalibp.2265.3.8.5 SMADCSetSensorTypep.2275.3.8.6 SMADCGetSensorTypep.2285.3.8.7 SMADCSetPrecisionp.2295.3.8.8 SMADCGetPrecisionp.2305.3.8.9 SMADCSetMode 5-75p.2315.3.8.10 SMADCGetModep.2325.3.8.11 SMADCSetSignalp.2335.3.8.12 SMADCSetGainp.2345.3.8.13 SMADCGetGainp.2355.3.8.14 SMADCEnableReadp.2365.3.8.15 SMADCEnableConversionp.2375.3.8.16 SMADCReadRawp.2385.3.8.17 SMADCReadConvertedp.2395.3.8.18 SMADCDeinitp.2405.3.9 ISaGRAF Programmingp.2415.3.9.1 The ISaGRAF Board Parametersp.2415.3.9.2 The ISaGRAF Operate Callsp.2425.4 SM-ADC1p.2455.4.1 Introductionp.2455.4.2 Specificationsp.2455.4.3 Front Panel Layoutp.2465.4.4 Board Overviewp.2465.4.5 Functional Descriptionp.2475.4.5.1 Input Circuitryp.2475.4.6 Configurationp.2485.4.7 Pinoutsp.2485.4.8 ‘C’ Programmingp.2505.4.8.1 SM-ADC1 Libraryp.2505.4.8.2 SMADC1Initp.2515.4.8.3 SMADC1GetVRawp.2525.4.8.4 SMADC1GetVp.2535.4.8.5 SMADC1SetLedp.2545.4.8.6 SMADC1ClrLedp.2555.4.8.7 SMADC1DeInitp.2565.4.9 ISaGRAF Programmingp.2575.4.9.1 The ISaGRAF Board Parametersp.2575.4.9.2 The ISaGRAF Operate Callsp.2585.5 SM-DAC1p.2635.5.1 Introductionp.2635.5.2 Specificationsp.2635.5.3 Front Panel Layoutp.2645.5.4 Board Overviewp.2645.5.5 Functional Descriptionp.2655.5.5.1 Output Circuitryp.2655.5.6 Configurationp.2665.5.7 Pinoutsp.2665.5.8 ‘C’ Programmingp.2695.5.8.1 SM-DAC1 Libraryp.2695.5.8.2 SMDAC1Initp.2705.5.8.3 SMDAC1OpenLoopp.2715.5.8.4 SMADAC1Operatep.2725.5.8.5 SMDAC1StandByp.2735.5.8.6 SMDAC1PutVRawp.2745.5.8.7 SMDAC1PutVp.2755.5.8.8 SMDAC1SetLedp.2765.5.8.9 SMDAC1ClrLedp.2775.5.8.10 SMDAC1DeInitp.2785.5.9 ISaGRAF Programmingp.2795.5.9.1 The ISaGRAF Board Parametersp.2795.5.9.2 The ISaGRAF Operate Callsp.280Comms.pdfp.283Table of Contentsp.2846. Communications Modulesp.2876.1 SM-RS232 6p.2876.1.1 Introductionp.2876.1.2 Specificationsp.2876.1.3 Front Panel Layoutp.2886.1.4 Board Overviewp.2886.1.5 Functional Descriptionp.2896.1.6 Configurationp.2906.1.7 Pinoutsp.2906.1.8 ISaGRAF Programmingp.2926.1.8.1 The ISaGRAF Board Parametersp.2926.1.8.2 The ISaGRAF Operate Callsp.2946.1.9 OS-9 Programmingp.2966.2 SM-SSIp.2996.2.1 Introductionp.2996.2.2 Specificationsp.2996.2.3 Front Panel Layoutp.3006.2.4 Board Overviewp.3006.2.5 Functional Descriptionp.3016.2.6 SSI Operationp.3026.2.7 Register Descriptionp.3046.2.7.1 Control Registerp.3046.2.7.2 CTRL1 Registerp.3056.2.7.3 CTRL2 Registerp.3056.2.7.4 CTRL3 Registerp.3056.2.7.5 Compare Registerp.3066.2.7.6 Identification Registerp.3066.2.7.7 Status Registerp.3066.2.7.8 STAT1 Registerp.3066.2.7.9 STAT2 Registerp.3076.2.7.10 Data Registerp.3076.2.8 MATCH Functionp.3086.2.9 Tested Sensorsp.3086.2.10 Configurationp.3096.2.11 Pinoutsp.3096.2.12 ‘C’ Programmingp.3116.2.12.1 SM-SSI Libraryp.3116.2.12.2 SMSSIInitp.3126.2.12.3 SMSSIDeInitp.3136.2.12.4 SMSSISetSetPointp.3146.2.12.5 SMSSISetCtrlRegp.3156.2.12.6 SMSSIGetStatusp.3166.2.12.7 SMSSIGetDatap.3176.2.13 ISaGRAF Programmingp.3186.2.13.1 The ISaGRAF Board Parametersp.318
Page 91 of the Pepper Computer RS232 user manual — 4.3.8‘C’ Programming ....................................... 4-38 4.4 SM-ACI1................................................. 4-53
Page 91 · click to enlarge
Page 91

Digital Modules

4.2.7Pinouts 4-22

4.2.9ISaGRAF Programming 4-29 4.3 SM-REL1 4-33

4.3.1Introduction 4-33

4.3.2Specifications 4-33

4.3.3Front Panel Layout 4-34

4.3.4Board Overview 4-34

4.3.5Functional Description 4-35

4.3.6Configuration 4-36

4.3.7Pinouts 4-36

4.3.8‘C’ Programming 4-38 4.4 SM-ACI1 4-53

4.4.1Introduction 4-53

4.4.2Specifications 4-54

4.4.3Front Panel Layout 4-55

4.4.4Board Overview 4-56

4.4.5Functional Description 4-58

4.4.6Configuration 4-59

4.4.7Screw Terminal Pinouts 4-61

4.4.8‘C’ Programming 4-64

4.4.9ISaGraf Programming 4-68

08 Jan. 98

Page 4 - 3 Manual ID 09901, Rev. Index 0500

Page 92 of the Pepper Computer RS232 user manual — 3.4.3 SPI Connectors (ST5 and BU1)
Page 92 · click to enlarge
Page 92

This page was intentionally left blank.

Page 93 of the Pepper Computer RS232 user manual — 4.1 SM-DIN1
Page 93 · click to enlarge
Page 93

Chapter 4 Digital Modules

4. Digital Modules

4.1 SM-DIN1

4.1.1 Introduction

The SM-DIN1 provides 8 optoisolated 24V DC digital inputs arranged in 6 independent groups with respect to the ground connections. The maximum input switching frequency is set to 200Hz with the system registering a logical ‘1’ when the input exceeds 10V. Logical ‘0’ is returned when the input falls below 8V. 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

Isolation 2.5 kV optoisolated from the system Input 8 Digital Channels (24V) DC ± 10% 6 Independent Groups Common GND < 5mA Input Current Filter set to 200 Hz (5ms) Overvoltage Protection (rate) Overvoltage Protection (continuous) Switch ON Delay Switch OFF Delay High Level Low Level

: 300V/90µs : 35V : 2ms (approx.) : 2ms (approx.) : > 10V : < 8V Front Panel Green LEDs (ON when Input > 10V) Options User configurable R-C filter on the last channel for INTx generation Power Consumption 5mW (min.), 100mW (max.) Temperature Range Standard (0°C to +70°C), Extended (-40°C to +85°C) Module Weight 40g ID Byte $01, read by the SPI Interface

Page 94 of the Pepper Computer RS232 user manual — 4.1.3 Front Panel Layout
Page 94 · click to enlarge
Page 94

Chapter 4 Digital Modules

4.1.3 Front Panel Layout

Pepper Computer RS232 — 4.1.3 Front Panel Layout diagram (page 94)
Fig. 26 · 4.1.3 Front Panel Layout

User Descriptor Fields · Green LEDs

Page 95 of the Pepper Computer RS232 user manual — LED 0 LED 7
Page 95 · click to enlarge
Page 95

Chapter 4 Digital Modules

4.1.4 Board Overview

LED 0 LED 7

Digital Input and LED Drivers

Pin 1 Pin 15

Pin 1 Pin 15

BU1 BU2

Pin 2 Pin 16

Pin 2 Pin 16

LED 0 LED 7

J2 2 1 3

J1 2 1 3

BU1 BU2

Pin 16 Pin 2 Pin 16 Pin 2

Show 6 more labels / short text on this page
Component Side · Optoisolation · ID Register · Low Pass Filter · Input Circuit · Solder Side
Page 96 of the Pepper Computer RS232 user manual — 4.1.5 Functional Description
Page 96 · click to enlarge
Page 96

Chapter 4 Digital Modules

4.1.5 Functional Description

Figure 4.1.5.1SM-DIN1 Schematic Diagram

System Interface Input Circuit

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.

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

Jumper Settings Description 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

Show 9 more labels / short text on this page
User/Input · System Interface · Interface · +Vcc (24V) · Low Pass Filter · Digital · LED Driver · Input · Gnd (common)
Page 97 of the Pepper Computer RS232 user manual — 3 J1
Page 97 · click to enlarge
Page 97

Chapter 4 Digital Modules

4.1.6 Configuration

Although two solder jumpers exist on the board (J1 and J2), they should remain at their factory settings unless a user-specific filter is required that cuts off at higher frequencies for example. If a user-specific filter is required then contact PEP Modular Computers for further advice and refer to the illustration shown in figure 4.1.6.1 of the filtering components.

Figure 4.1.6.1SM-DIN1 Configurable Filter

3 J1

HCT14

J2

C13 100nF * R1*

Surface Mounted Devices (SMD) are used in the production of the SM- DIN1 modules. The components to be changed (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.

36k · 36k · INTx

Page 98 of the Pepper Computer RS232 user manual — 4.1.7 Pinouts
Page 98 · click to enlarge
Page 98

Chapter 4 Digital Modules

4.1.7 Pinouts

The following shows the pinout/signal relationship for the SM-DIN1 when connected to a particular screw terminal block.

Pepper Computer RS232 — 4.1.7 Pinouts diagram (page 98)
Fig. 27 · 4.1.7 Pinouts

Pin Nr. Signal Description Pin Nr. Signal Description 1 G0EXT GND for channel 0 2 G4EXT GND for channel 4 3 IN0 Input Channel 0 4 IN4 Input Channel 4 5 IN1 Input Channel 1 6 IN5 Input Channel 5 7 G1EXT GND for channel 1 8 G5EXT GND for channel 5 9 IN2 Input Channel 2 10 IN6 Input Channel 6 11 IN3 Input Channel 3 12 IN7 Input Channel 7 13 G23EXT GND for channels 2&3 14 G67EXT GND for channels 6&7

Show 5 more labels / short text on this page
Screw Terminal Pinouts · Pin 1 · Pin 13 · Pin 2 · Pin 14
Page 99 of the Pepper Computer RS232 user manual — 4.1.7 Pinouts
Page 99 · click to enlarge
Page 99

Chapter 4 Digital Modules

Pepper Computer RS232 — 4.1.7 Pinouts diagram (page 99)
Fig. 28 · 4.1.7 Pinouts

System Interface User/Input Interface

Pepper Computer RS232 — 4.1.7 Pinouts diagram (page 99)
Fig. 29 · 4.1.7 Pinouts
TypCommon GND
Show 6 more labels / short text on this page
Connection · +Vcc (24V) · Gnd (0V) · Input Circuit · +Vcc (24V) · Gnd (0V)
Page 100 of the Pepper Computer RS232 user manual — 4.1.8 ‘C’ Programming
Page 100 · click to enlarge
Page 100

Chapter 4 Digital Modules

4.1.8 ‘C’ Programming

4.1.8.1 SM-DIN1 Library

The SM-DIN1 library of functions smartio.l provide a convenient way of accessing the SM-DIN1 module.

  • All functions are written in ANSI C;
  • Prototypes are to be found in the file din1lib.h .
  • SMART I/O Base Module or Base Module and Extension unit;
  • SM-DIN1 Module.

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 SMDIN1Init must first be called. This allocates the requested resources. Furthermore, this function needs to be called for each SM-DIN1 Module called within the task. Upon completion of the application, the function SMDIN1DeInit needs to be called for each SM-DIN1 Module that has been initialized.

In order to illustrate the use of the SM-DIN1 library, an application example called demodin1.c can be found in the SMART I/O application directory (normally found in /<device>/APPLIC/SMART/CMDS).

Hardware Requirements · Software Requirements

Page 101 of the Pepper Computer RS232 user manual — 4.1.8.2 SMDIN1Init
Page 101 · click to enlarge
Page 101

Chapter 4 Digital Modules

4.1.8.2 SMDIN1Init

Syntax error_code SMDIN1Init(u_int8 PortNr);

Description This function initialises the SM-DIN1 Module on port PortNr by allocating space in memory for resources and resetting all inputs.

Input u_int8 PortNr 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 = SMDIN1Init(0);

Page 102 of the Pepper Computer RS232 user manual — 4.1.8.3 SMDIN1DeInit
Page 102 · click to enlarge
Page 102

Chapter 4 Digital Modules

4.1.8.3 SMDIN1DeInit

Syntax error_code SMDIN1DeInit(u_int8 PortNr);

Description This function de-initialises the SM-DIN1 Module on port PortNr by 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 103 of the Pepper Computer RS232 user manual — 4.1.8.4 SMDIN1Get
Page 103 · click to enlarge
Page 103

Chapter 4 Digital Modules

4.1.8.4 SMDIN1Get

Syntax error_code SMDIN1Get(u_int8 PortNr, u_int8 *buffer);

Description This function fetches the status of ALL 8 input lines of the port PortNr and writes it to the address pointed to by buffer with bit 0 of the buffer 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 = SMDIN1Get(0, buffer);

Buffer Explanation:

D7 D0 Ch.7 Ch.6 Ch.5 Ch.4 Ch.3 Ch.2 Ch.1 Ch.0

Bit Value0 = No input or not connected 1 = Input Active
Page 104 of the Pepper Computer RS232 user manual — 4.1.9 ISaGRAF Programming
Page 104 · click to enlarge
Page 104

Chapter 4 Digital Modules

4.1.9 ISaGRAF Programming

4.1.9.1 The ISaGRAF Board Parameters

Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual.

Figure 4.1.9.1.1 a Typical Screen Section for the SM-DIN1 Module

Pepper Computer RS232 — 4.1.9 ISaGRAF Programming diagram (page 104)
Fig. 30 · 4.1.9 ISaGRAF Programming

The 8 inputs of this module may be clearly seen together with the logical address at which this particular board is residing. Remember, this logical address is the same as the physical slot position! In the example shown here, the board being addressed is in slot 2 i.e. the second of the SMART-BASE slots. Up to 11 slots are catered for in the SMART I/O concept; 3 on the SMART-BASE and 2 for each connected SMART-EXT (up to a total of 4).

Logical Address

Page 105 of the Pepper Computer RS232 user manual — 4.1.9.2 The ISaGRAF Operate Calls
Page 105 · click to enlarge
Page 105

Chapter 4 Digital Modules

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:

:= OPERATE(, COMMAND,

Here the return variable is assigned a value associated with the selected COMMAND parameter. Each SMART-Module possesses its own set of these COMMANDS.

:= OPERATE(, 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 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.

Syntax · ); · Example

Page 106 of the Pepper Computer RS232 user manual — 4.1.9.2 The ISaGRAF Operate Calls
Page 106 · click to enlarge
Page 106

Chapter 4 Digital Modules

A complete list of the operate COMMANDS may be obtained by selecting a project from the ISaGRAF projects group, opening an application and observing the Common defines in the Dictionary pull-down menu. Note that not all calls in the list may be used within the SMART I/O environment however, the calls applicable to this module are :

O_INIT_CODE: The syntax and usage have already been explained.

Page 107 of the Pepper Computer RS232 user manual — 4.2 SM-DOUT1
Page 107 · click to enlarge
Page 107

Chapter 4 Digital Modules

4.2 SM-DOUT1

4.2.1 Introduction

The SM-DOUT1 provides eight optoisolated 24V DC (typ.) digital outputs arranged in 2 independent groups. The maximum output switching fre- quency is limited to 1 kHz (square wave) with the output in the ON state when the system issues a logical ‘0’. The maximum continuous output supply current is limited to 500mA (resistive loads) and provision has been made to cater for inductive loads. The user interface is realized by 8 yellow LEDs (1 per output channel) which illuminate when the output is ON.

4.2.2 Specifications

Isolation 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 Output Voltage Switch ON Delay (resistive) Switch OFF Delay (resistive)

: 90V/10µs (35V) : 24V DC : 3µs (at 24V) : 130µs (at 24V) Max. Frequency

: 1 kHz square wave : Intern. Logical '0' : Intern. Logical '1' : 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 70g ID Byte $10, read by the SPI Interface

Output ON Output OFF Outputs after Reset

Output

Page 108 of the Pepper Computer RS232 user manual — LED 0 LED 7
Page 108 · click to enlarge
Page 108

Chapter 4 Digital Modules

4.2.3 Front Panel Layout

Pepper Computer RS232 — 4.2.3 Front Panel Layout diagram (page 108)
Fig. 31 · 4.2.3 Front Panel Layout

4.2.4 Board Overview

LED 0 LED 7

Pepper Computer RS232 — LED 0 LED 7 diagram (page 108)
Fig. 32

Pin 2 Pin 16

Pin 2 Pin 16

User Descriptor Fields · Yellow LEDs · Component Side

Page 109 of the Pepper Computer RS232 user manual — Warning !
Page 109 · click to enlarge
Page 109

Chapter 4 Digital Modules

4.2.5 Functional Description

Figure 4.2.5.1SM-DOUT1 Schematic Diagram

LED Driver Digital Output System Interface

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

Show 8 more labels / short text on this page
System Interface · User/Output · Interface · +Vcc (common) · Output · Stage · Load · Gnd
Page 110 of the Pepper Computer RS232 user manual — 4.2.6 Configuration
Page 110 · click to enlarge
Page 110

Chapter 4 Digital Modules

4.2.6 Configuration

There are no jumpers to configure on the SM-DOUT1.

4.2.7 Pinouts

The following shows the pinout/signal relationship for the SM-DOUT1 when connected to a particular screw terminal block.

Pepper Computer RS232 — 4.2.6 Configuration diagram (page 110)
Fig. 33 · 4.2.6 Configuration

Pin Nr. Signal Description Pin Nr. Signal Description 1 V01EXT Vcc for channels 0 & 1 2 V45EXT Vcc for channels 4 & 5 3 OUT0 Output 0 4 OUT4 Output 4 5 OUT1 Output 1 6 OUT5 Output5 7 V23EXT Vcc for channels 2 & 3 8 V67EXT Vcc for channels 6 & 7 9 OUT2 Output 2 10 OUT6 Output 6 11 OUT3 Output 3 12 OUT7 Output 7 13 G03EXT GND for channels 0..3 14 G47EXT GND for channels 4..7

Show 5 more labels / short text on this page
Screw Terminal Pinouts · Pin 1 · Pin 13 · Pin 2 · Pin 14
Page 111 of the Pepper Computer RS232 user manual — G03EXT
Page 111 · click to enlarge
Page 111

Chapter 4 Digital Modules

V01EXT

Pepper Computer RS232 — V01EXT diagram (page 111)
Fig. 34
Pepper Computer RS232 — V01EXT diagram (page 111)
Fig. 35

G03EXT

System Interface User Interface

Pepper Computer RS232 — G03EXT diagram (page 111)
Fig. 36
Show 11 more labels / short text on this page
Connection · Vcc Common (24V) · +Vcc (24V) · Channel 0 · Channel 1 · Channel 2 · Channel 3 · Gnd (0V) · Output Circuit · +Vcc (24V) · Gnd (0V)
Page 112 of the Pepper Computer RS232 user manual — 4.2.8 ‘C’ Programming
Page 112 · click to enlarge
Page 112

Chapter 4 Digital Modules

4.2.8 ‘C’ Programming

4.2.8.1 SM-DOUT1 Library

The SM-DOUT1 library of functions smartio.l provide a convenient way of accessing the SM-DOUT1 module.

  • All functions are written in ANSI C;
  • Prototypes are to be found in the file dout1lib.h .
  • SMART I/O Base Module or Base Module and Extension unit;
  • SM-DOUT1 Module.

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 SMDOUT1Init must first be called. This allocates the requested resources. Furthermore, this function needs to be called for each SM-DOUT1 Module called within the task. Upon completion of the application, the function SMDOUT1DeInit needs to be called for each SM-DOUT1 Module that has been initialised.

In order to illustrate the use of the SM-DOUT1 library, an application example called demdout1.c can be found in the SMART I/O application directory (normally found in /<device>/APPLIC/SMART/CMDS).

Hardware Requirements · Software Requirements

Page 113 of the Pepper Computer RS232 user manual — 4.2.8.2 SMDOUT1Init
Page 113 · click to enlarge
Page 113

Chapter 4 Digital Modules

If the same SM-DOUT1 Module is to be accessed from different tasks, the user must make sure that the actual output status is ensured by using for example, semaphores within OS-9.

4.2.8.2 SMDOUT1Init

Syntax error_code SMDOUT1Init(u_int8 PortNr);

Description This function initializes the SM-DOUT1 Module on port PortNr and sets all output lines to OFF.

Input u_int8 PortNr SM-Port number 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 = SMDOUT1Init(0);

Page 114 of the Pepper Computer RS232 user manual — 4.2.8.3 SMDOUT1DeInit
Page 114 · click to enlarge
Page 114

Chapter 4 Digital Modules

4.2.8.3 SMDOUT1DeInit

Syntax error_code SMDOUT1DeInit(u_int8 PortNr);

Description This function de-initializes the SM-DOUT1 Module on port PortNr by releasing all resources assigned to it thereby freeing memory for other uses.

Input u_int8 PortNr 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 = SMDOUT1DeInit(0);

Page 115 of the Pepper Computer RS232 user manual — 4.2.8.4 SMDOUT1Get
Page 115 · click to enlarge
Page 115

Chapter 4 Digital Modules

4.2.8.4 SMDOUT1Get

Syntax error_code SMDOUT1Get(u_int8 PortNr, u_int8 *buffer);

Description This function fetches the output status of the port PortNr and writes it to the memory location pointed to by buffer. This buffer shows the status of all 8 outputs with bit 0 representing output 0 of the module.

Input u_int8 PortNr SM-Port number to fetch data u_int8 *buffer 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 = SMDOUT1Get(0, buffer);

Buffer Explanation:

D7 D0 Ch.7 Ch.6 Ch.5 Ch.4 Ch.3 Ch.2 Ch.1 Ch.0

Bit Value0 = Output is ON 1 = Output is OFF
Page 116 of the Pepper Computer RS232 user manual — 4.2.8.5 SMDOUT1Set
Page 116 · click to enlarge
Page 116

Chapter 4 Digital Modules

4.2.8.5 SMDOUT1Set

Syntax error_code SMDOUT1Set(u_int8 PortNr, u_int8 *buffer);

Description This function sets the output of the port PortNr with the contents of the address pointed to by buffer. When writing to this buffer, observe that all 8 outputs are set at the same time.

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 = SMDOUT1Set(0, buffer);

Buffer Explanation:

D7 D0 Ch.7 Ch.6 Ch.5 Ch.4 Ch.3 Ch.2 Ch.1 Ch.0

Bit Value0 = Output is ON 1 = Output is OFF
Page 117 of the Pepper Computer RS232 user manual — 4.2.9 ISaGRAF Programming
Page 117 · click to enlarge
Page 117

Chapter 4 Digital Modules

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

Pepper Computer RS232 — 4.2.9 ISaGRAF Programming diagram (page 117)
Fig. 37 · 4.2.9 ISaGRAF Programming

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

reset_on_closeThis variable allows ISaGRAF to return the status of

all the output channels to zero (0V) when the appli- cation is closed.

Logical Address · Module Specific Information

Page 118 of the Pepper Computer RS232 user manual — 4.2.9.2 The ISaGRAF Operate Calls
Page 118 · click to enlarge
Page 118

Chapter 4 Digital Modules

4.2.9.2 The ISaGRAF Operate Calls

Operate calls are built into a program using ST or FBD languages when defining the project. A typical use could be at the initialization stage to check that the SMART-Modules are in fact located where they have been programmed to be. The syntax of the operate call is as follows:

:= OPERATE(, COMMAND,

Here the return variable is assigned a value associated with the selected COMMAND parameter. Each SMART-Module possesses its own set of these COMMANDS.

:= OPERATE(, 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 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.

Syntax · ); · Example

Page 119 of the Pepper Computer RS232 user manual — 4.2.9.2 The ISaGRAF Operate Calls
Page 119 · click to enlarge
Page 119

Chapter 4 Digital Modules

A complete list of the operate COMMANDS may be obtained by selecting a project from the ISaGRAF projects group, opening an application and observing the Common defines in the Dictionary pull-down menu. Note that not all calls in the list may be used within the SMART I/O environment however, the calls applicable to this module are :

O_INIT_CODE: The syntax and usage have already been explained.

Page 120 of the Pepper Computer RS232 user manual — 4.2.9.2 The ISaGRAF Operate Calls
Page 120 · click to enlarge
Page 120

Chapter 4 Digital Modules

This page has been left blank intentionally.

Page 121 of the Pepper Computer RS232 user manual — 4.3 SM-REL1
Page 121 · click to enlarge
Page 121

SMART I/O User’s Manual Chapter 4 Digital Modules

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 Switch ON Current Rate : 8A/3ms Sustained Current : 3A Switch OFF Current Rate : 2A/2ms Max. Switching Frequency : 100 Hz Contact Resistance : 50mΩ Settling Time : 4ms Power ON/OFF Protection : Glitch-free Power ON Expected Life : 2 Million Cycles Input Ext. VCC : 24V DC ± 20% @ 100mA Front Panel 6 Yellow LEDs : Relay CLOSED 1 Green LED : Ext. VCC Ready 1 Yellow LED : User Power Cons. 23mW (min.), 160mW (max.) Temperature Range Standard (0°C to +70°C) Module Weight 61g ID Byte $20, read by the SPI Interface

Page 122 of the Pepper Computer RS232 user manual — LED 0 LED 7
Page 122 · click to enlarge
Page 122

Chapter 4 Digital Modules

4.3.3 Front Panel Layout

SM-REL1

6 N/O Relay Outputs

4.3.4 Board Overview

LED 0 LED 7

EEPROM

J1

BU1 BU2

Show 11 more labels / short text on this page
User Descriptor Fields · Yellow LEDs · Green LED · Yellow LED · Component Side · Relay · Optocouplers · Relays · Filters · Relay · Relay Driver
Page 123 of the Pepper Computer RS232 user manual — 4.3.5 Functional Description
Page 123 · click to enlarge
Page 123

SMART I/O User’s Manual Chapter 4 Digital Modules

4.3.5 Functional Description

Figure 4.3.5.1SM-REL1 Schematic Diagram

Com. Ext. Vcc

LED Driver Digital Output System Interface Relay 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 is connected and active.

The operational life of the relays is 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 contain the module ID number and production data although space has been allocated for future use.

Load

Page 124 of the Pepper Computer RS232 user manual — 4.3.6 Configuration
Page 124 · click to enlarge
Page 124

Chapter 4 Digital Modules

4.3.6 Configuration

Jumper J1 - EEPROM Protection

J1 set EEPROM is not hardware write protected

open EEPROM is hardware write protected

4.3.7 Pinouts

The following shows the pinout/signal relationship for the SM-REL1 when connected to a particular screw terminal block.

Pepper Computer RS232 — 4.3.6 Configuration diagram (page 124)
Fig. 38 · 4.3.6 Configuration

Pin Nr. Signal Description Pin Nr. Signal Description 1 NO0 N/O Relay 0 Conn. 2 COM0 Relay 0 Common Conn. 3 NO1 N/O Relay 1 Conn. 4 COM1 Relay 1 Common Conn. 5 NO2 N/O Relay 2 Conn. 6 COM2 Relay 2 Common Conn. 7 NO3 N/O Relay 3 Conn. 8 COM3 Relay 3 Common Conn. 9 NO4 N/O Relay 4 Conn. 10 COM4 Relay 4 Common Conn. 11 NO5 N/O Relay 5 Conn. 12 COM5 Relay 5 Common Conn. 13 VCCEXT External 24V DC VCC 14 GNDEXT External GND

Show 6 more labels / short text on this page
Jumper Settings Description · Screw Terminal Pinouts · Pin 1 · Pin 13 · Pin 2 · Pin 14
Page 125 of the Pepper Computer RS232 user manual — 24V DC
Page 125 · click to enlarge
Page 125

SMART I/O User’s Manual Chapter 4 Digital Modules

Pepper Computer RS232 — 4.3.6 Configuration diagram (page 125)
Fig. 39 · 4.3.6 Configuration

24V DC

Pepper Computer RS232 — 24V DC diagram (page 125)
Fig. 40
Show 5 more labels / short text on this page
Connection · + · Input Circuit · +Vcc (24V) · Gnd (0V)
Page 126 of the Pepper Computer RS232 user manual — 4.3.8 ‘C’ Programming
Page 126 · click to enlarge
Page 126

Chapter 4 Digital Modules

4.3.8 ‘C’ Programming

4.3.8.1 SM-REL1 Library

The SM-REL1 library of functions smartio.l provide a convenient way of accessing the SM-REL1 module.

  • All functions are written in ANSI C;
  • Prototypes are to be found in the file rel1lib.h .
  • SMART I/O Base Module or Base Module and Extension unit;
  • SM-REL1 Module.

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 SMREL1Init 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 SMREL1DeInit 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 demrel1.c can be found in the SMART I/O application directory (normally found in /<device>/APPLIC/SMART/CMDS).

Hardware Requirements · Software Requirements

Page 127 of the Pepper Computer RS232 user manual — 4.3.8.2 SMREL1Init
Page 127 · click to enlarge
Page 127

SMART I/O User’s Manual Chapter 4 Digital Modules

If the same SM-REL1 Module is to be accessed from different tasks, the user must make sure that the actual output status is ensured by using for example, semaphores within OS-9.

4.3.8.2 SMREL1Init

Syntax error_code SMREL1Init(u_int8 PortNr);

Description This function initializes the SM-REL1 Module on port PortNr by setting the relays to OPEN, relay LED status to OFF and the external Vcc as input.

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 = SMREL1Init(0);

Page 128 of the Pepper Computer RS232 user manual — 4.3.8.3 SMREL1DeInit
Page 128 · click to enlarge
Page 128

Chapter 4 Digital Modules

4.3.8.3 SMREL1DeInit

Syntax error_code SMREL1DeInit(u_int8 PortNr);

Description This function deinitializes the SM-REL1 Module on the port PortNr by freeing the resources tied up with this module and setting all relays to OPEN, all LEDs to OFF and setting the ext. Vcc line to input.

Input u_int8 PortNr 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 129 of the Pepper Computer RS232 user manual — 4.3.8.4 SMREL1Reset
Page 129 · click to enlarge
Page 129

SMART I/O User’s Manual Chapter 4 Digital Modules

4.3.8.4 SMREL1Reset

Syntax error_code SMREL1Reset(u_int8 PortNr);

Description This function resets the SM-REL1 Module by setting all relays to OPEN and all LEDs to OFF. This function does not free the resources as with the SMRELl1DeInit function call but it does ensure that the relay status (and LEDs) is as expected.

Input u_int8 PortNr Number of the SM port to reset

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 = SMREL1Reset(0);

Page 130 of the Pepper Computer RS232 user manual — 4.3.8.5 SMREL1GetRly
Page 130 · click to enlarge
Page 130

Chapter 4 Digital Modules

4.3.8.5 SMREL1GetRly

Syntax error_code SMREL1GetRly(u_int8 PortNr,

Description This function gets the input of the port PortNr and writes it to the buffer. Bits 0-5 of the buffer reflect the Relay setting:

0 = relay closed 1 = relay open

Bits 6 and 7 are cleared.

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 is unknown or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).

Example RetVal = SMREL1GetRly(0, buffer);

u_int8 *buffer);

Page 131 of the Pepper Computer RS232 user manual — 4.3.8.6 SMREL1SetRly
Page 131 · click to enlarge
Page 131

SMART I/O User’s Manual Chapter 4 Digital Modules

4.3.8.6 SMREL1SetRly

Syntax error_code SMREL1SetRly(u_int8 PortNr,

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 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 = SMREL1SetRly(0, buffer);

u_int8 *buffer);

Page 132 of the Pepper Computer RS232 user manual — 4.3.8.7 SMREL1GetLed
Page 132 · click to enlarge
Page 132

Chapter 4 Digital Modules

4.3.8.7 SMREL1GetLed

Syntax error_code SMREL1GetLed(u_int8 PortNr,

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 is unknown or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).

Example RetVal = SMREL1GetLed(0, buffer);

u_int8 *buffer);

Page 133 of the Pepper Computer RS232 user manual — 4.3.8.8 SMREL1SetLed
Page 133 · click to enlarge
Page 133

SMART I/O User’s Manual Chapter 4 Digital Modules

4.3.8.8 SMREL1SetLed

Syntax error_code SMREL1SetLed(u_int8 PortNr,

Description This function sets the status of the User LED on the port PortNr with the contents of the buffer. If a bit is set to 0 then the LED is OFF otherwise it is ON.

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_int8 *buffer);

Page 134 of the Pepper Computer RS232 user manual — 4.3.8.9 SMREL1GetExtVcc
Page 134 · click to enlarge
Page 134

Chapter 4 Digital Modules

4.3.8.9 SMREL1GetExtVcc

Syntax error_code SMREL1GetExtVcc(u_int8 PortNr,

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_int8 *buffer 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 = SMREL1GetExtVcc(0, buffer);

u_int8 *buffer);

Page 135 of the Pepper Computer RS232 user manual — 4.3.9 ISaGRAF Programming
Page 135 · click to enlarge
Page 135

SMART I/O User’s Manual Chapter 4 Digital Modules

4.3.9 ISaGRAF Programming

4.3.9.1 The ISaGRAF Board Parameters

Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual.

Figure 4.3.9.1.1 a Typical Screen Section for the SM-REL1 Module

Pepper Computer RS232 — 4.3.9 ISaGRAF Programming diagram (page 135)
Fig. 41 · 4.3.9 ISaGRAF Programming

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

reset_on_closeThis variable allows ISaGRAF to set all the output

relays to open when the application closes.

Logical Address · Module Specific Information

Page 136 of the Pepper Computer RS232 user manual — 4.3.9.2 The ISaGRAF Operate Calls
Page 136 · click to enlarge
Page 136

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:

:= OPERATE(, COMMAND,

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:

:= OPERATE(, 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 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.

);

Page 137 of the Pepper Computer RS232 user manual — O_EXT_POWER
Page 137 · click to enlarge
Page 137

Digital Modules

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:

:= OPERATE(, O_SET_LED, );

represents the analog return variable and can

be zero, if the operate call is supported and the correct is passed, or non-zero, if an error occurred.

represents any module variable, and

represents the LED to be controlled and must be one of

OA_LED1_OFF.

O_EXT_POWER

This operate call can detect whether the external power has failed or not, and has the following syntax:

:= OPERATE(,

08 Jan. 98

Page 4 - 51 Manual ID 09901, Rev. Index 0500

where · OA_LED1_ON or

Page 138 of the Pepper Computer RS232 user manual — Digital Modules
Page 138 · click to enlarge
Page 138

Digital Modules

O_EXT_POWER, 0);

represents the analog return variable and can

be zero, if the operate call is supported and the correct is passed, or non-zero, if an error occurred.

represents any module variable.

Page 4 - 52

08 Jan. 98 Manual ID 09901, Rev. Index 0500

where

Page 139 of the Pepper Computer RS232 user manual — Digital Modules
Page 139 · click to enlarge
Page 139

Digital Modules

4.4 SM-ACI1

4.4.1Introduction

The SM-ACI1 provides eight optoisolated 80 V AC to 264 V AC inputs arranged in six independent groups with respect to common neutral connections. The input frequency range is 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 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

Page 4 - 53 Manual ID 09901, Rev. Index 0500

Page 140 of the Pepper Computer RS232 user manual — Digital Modules
Page 140 · click to enlarge
Page 140

Digital Modules

4.4.2Specifications

Table 4-1: Specifications

Isolation 2.5 kV optoisolated towards the system

Input 8 channels (80 V AC - 264 V AC) Common neutral < 0.5 mA input current Input frequency range Overvoltage protection (continu- ous): Switch-ON delay: Switch-OFF delay: High level: Low level:

47-63 Hz 350 V AC < 21 ms < 16 ms > 20 V < 10 V

Front panel Green LEDs (switched on, when INPUT is active)

Options User-configurable RC filter on the last channel for INTx generation

3 mW min., 70 mW max.

Standard:0°C to +70°C Extended:-40°C to +85°C

Module weight 38 g

ID Byte $02, read by the SPI interface

Page 4 - 54

08 Jan. 98 Manual ID 09901, Rev. Index 0500

Power con- sumption · Temperature range

Page 141 of the Pepper Computer RS232 user manual — Digital Modules
Page 141 · click to enlarge
Page 141

Digital Modules

4.4.3Front Panel Layout

Figure 4-1: Front Panel Layout

Pepper Computer RS232 — Digital Modules diagram (page 141)
Fig. 42 · Digital Modules

08 Jan. 98

Page 4 - 55 Manual ID 09901, Rev. Index 0500

Page 142 of the Pepper Computer RS232 user manual — Digital Modules
Page 142 · click to enlarge
Page 142

Digital Modules

4.4.4Board Overview

Figure 4-2: Component Side

Pepper Computer RS232 — Digital Modules diagram (page 142)
Fig. 43 · Digital Modules

Page 4 - 56

08 Jan. 98 Manual ID 09901, Rev. Index 0500

Page 143 of the Pepper Computer RS232 user manual — Digital Modules
Page 143 · click to enlarge
Page 143

Digital Modules

Figure 4-3: Solder Side

Pepper Computer RS232 — Digital Modules diagram (page 143)
Fig. 44 · Digital Modules

08 Jan. 98

Page 4 - 57 Manual ID 09901, Rev. Index 0500

Page 144 of the Pepper Computer RS232 user manual — Figure 4-4: SM-ACI1 Schematic Diagram
Page 144 · click to enlarge
Page 144

Page 4 - 58 Manual ID 09901, Rev. Index 0500

Pepper Computer RS232 — 4.3.9.2 The ISaGRAF Operate Calls diagram (page 144)
Fig. 45 · 4.3.9.2 The ISaGRAF Operate Calls

Figure 4-4: SM-ACI1 Schematic Diagram

4.4.5Functional Description

Digital Modules

08 Jan. 98

Page 145 of the Pepper Computer RS232 user manual — 4.4.6Configuration
Page 145 · click to enlarge
Page 145

Digital Modules

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

J3 1-2 1-3 Standard input filter 40 Hz Customer-specific input filter

J4 1-2 1-3 Standard input filter 40 Hz Customer-specific input filter

4.4.6Configuration

Although two solder jumpers (J3 and J4) exist on the board, they should remain at their manufacturer settings unless a user-spe- cific filter is 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.

08 Jan. 98

Page 4 - 59 Manual ID 09901, Rev. Index 0500

Jumper Settings Description

Page 146 of the Pepper Computer RS232 user manual — Figure 4-5: SM-ACI1 Configurable Filter
Page 146 · click to enlarge
Page 146

Page 4 - 60 Manual ID 09901, Rev. Index 0500

Pepper Computer RS232 — 4.3.9.2 The ISaGRAF Operate Calls diagram (page 146)
Fig. 46 · 4.3.9.2 The ISaGRAF Operate Calls

Figure 4-5: SM-ACI1 Configurable Filter

Digital Modules

08 Jan. 98

Page 147 of the Pepper Computer RS232 user manual — Figure 4-6: Screw Terminal Pinout
Page 147 · click to enlarge
Page 147

Digital Modules

Surface-Mounted Devices (SMDs) are used in the production of SM-ACI1 modules. The components to be changed, marked with an asterisk in figure 4-5, need not necessarily be SMDs. Please, refer to the board overview figure (solder side, figure 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.7Screw Terminal Pinouts

In the following, the pinout/signal relationship for the SM-ACI1, when connected to a particular screw terminal block, is shown.

Figure 4-6: Screw Terminal Pinout

Pepper Computer RS232 — Figure 4-6: Screw Terminal Pinout diagram (page 147)
Fig. 47 · Figure 4-6: Screw Terminal Pinout
Pepper Computer RS232 — Figure 4-6: Screw Terminal Pinout diagram (page 147)
Fig. 48 · Figure 4-6: Screw Terminal Pinout

08 Jan. 98

Page 4 - 61 Manual ID 09901, Rev. Index 0500

Page 148 of the Pepper Computer RS232 user manual — Digital Modules
Page 148 · click to enlarge
Page 148

Digital Modules

Table 4-3: Pinout/Signal Relationship

1 N0 Neutral channel 0

2 N4 Neutral channel 4

3 P0 Phase channel 0

4 P4 Phase channel 4

5 P1 Phase channel 1

6 P5 Phase channel 5

7 N1 Neutral channel 1

8 N5 Neutral channel 5

9 P2 Phase channel 2

10 P6 Phase channel 6

11 P3 Phase channel 3

12 P7 Phase channel 7

13 N23 Neutral channels 2, 3

14 N67 Neutral channels 6, 7

Page 4 - 62

08 Jan. 98 Manual ID 09901, Rev. Index 0500

Show 7 more labels / short text on this page
Pin · Sign · al Description Pin · Sign · al Description · # · #
Page 149 of the Pepper Computer RS232 user manual — Digital Modules
Page 149 · click to enlarge
Page 149

Digital Modules

Figure 4-7: Connection

Pepper Computer RS232 — Digital Modules diagram (page 149)
Fig. 49 · Digital Modules

08 Jan. 98

Page 4 - 63 Manual ID 09901, Rev. Index 0500

Page 150 of the Pepper Computer RS232 user manual — Hardware Requirements
Page 150 · click to enlarge
Page 150

Digital Modules

Figure 4-8: Example: Input Circuit (Only One Channel Shown)

Pepper Computer RS232 — Digital Modules diagram (page 150)
Fig. 50 · Digital Modules

4.4.8ANSI ’C’ Programming

4.4.8.1 SM-ACI1 Library

The SM-ACI1 library of functions smartio.l provide a conve- nient way of accessing the SM-ACI1 module.

  • All functions are written in ANSI C;
  • Prototypes are to be found in the file aci1lib.h .

Hardware Requirements

  • SMART I/O Base Module or Base Module and Extension unit;
  • SM-ACI1 Module.

Page 4 - 64

08 Jan. 98 Manual ID 09901, Rev. Index 0500

Page 151 of the Pepper Computer RS232 user manual — 4.4.8.2 SMACI1Init
Page 151 · click to enlarge
Page 151

Digital Modules

Software Requirements

The compiler belonging to one of the following environments:

  • Ultra C Version 1.1.2 or higher;
  • FasTrak for Windows version 2.02 or higher.

Before a library function can be used, the function SMACI1Init must be called first. By this the requested resources are allo- cated. Beyond, this function needs to be called for each SM- ACI1 Module called within the task. Upon completion of the application, the function SMACI1DeInit needs to be called for each SM-ACI1 Module that has been initialized.

In order to illustrate the use of the SM-ACI1 library, an applica- tion facsimile called demoaci1.c can be found in the SMART I/ O application directory (normally to be found in /<device>/ APPLIC/SMART/SRC).

4.4.8.2 SMACI1Init

Syntax

Description:

This function initializes the SM-ACI1 Module on port PortNr by allocating space in memory for resources and resetting all inputs.

08 Jan. 98

Page 4 - 65 Manual ID 09901, Rev. Index 0500

error_code SMACI1Init(u_int8 PortNr);

Page 152 of the Pepper Computer RS232 user manual — Output
Page 152 · click to enlarge
Page 152

Digital Modules

Input

SM-Port number to initialize.

Output

If the module is unknown, or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).

Example

4.4.8.3 SMACI1DeInit

Syntax

Description

This function de-initializes the SM-ACI1 Module on port PortNr by releasing all resources assigned to it thereby freeing memory for other uses.

Input

SM-Port number to de-initialize.

Output

or standard OS-9 error code (refer to the OS-9 Technical

Manual Error Codes Section).

Page 4 - 66

08 Jan. 98 Manual ID 09901, Rev. Index 0500

Show 6 more labels / short text on this page
u_int8 PortNr · error_code SUCCESS E_BMODE · RetVal = SMACI1Init(0); · error_code SMACI1DeInit(u_int8 PortNr); · u_int8 PortNr · error_code SUCCESS
Page 153 of the Pepper Computer RS232 user manual — Example
Page 153 · click to enlarge
Page 153

Digital Modules

Example

4.4.8.4 SMACI1Get

Syntax

error_code SMACI1Get(u_int8 PortNr, u_int8 *buffer);

Description

This function fetches the status of ALL 8 input lines of the port PortNr and writes it to the address pointed to by buffer with bit 0 of the buffer representing input 0 of the module.

Input

SM-Port number to fetch data.

Pointer to buffer where data is to be stored.

Output

or OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).

Example

RetVal = SMACI1Get(0, buffer);

08 Jan. 98

Page 4 - 67 Manual ID 09901, Rev. Index 0500

Show 4 more labels / short text on this page
RetVal = SMACI1DeInit(0); · u_int8 PortNr · u_int8 *buffer · error_code SUCCESS
Page 154 of the Pepper Computer RS232 user manual — Figure 4-9: Typical Screen Section for the SMACI1Module
Page 154 · click to enlarge
Page 154

Digital Modules

Buffer Explanation:

D7 D0

Ch. 7 Ch. 6 Ch. 5 Ch. 4 Ch. 3 Ch. 2 Ch. 1 Ch. 0

Bit Value0 = No input or not connected 1 = Input Active

4.4.9ISaGRAF Programming

4.4.9.1 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 SMACI1Module

Page 4 - 68

08 Jan. 98 Manual ID 09901, Rev. Index 0500

Page 155 of the Pepper Computer RS232 user manual — Example
Page 155 · click to enlarge
Page 155

Digital Modules

Logical Address

The 8 inputs of this module may be clearly seen together with the logical address at which this particular board is residing. Remember, this logical address is the same as the physical slot position! In the example shown here, the board being addressed is in slot 2 i.e. the second of the SMART-BASE slots. Up to 11 slots are catered for in the SMART I/O concept; 3 on the SMART-BASE and 2 for each connected SMART-EXT (up to a total of 4).

4.4.9.2 ISaGRAF Operate Calls

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

:= OPERATE(, COMMAND,);

Here the return variable is assigned a value associated with the selected COMMAND parameter. Each SMART-Module pos- sesses its own set of such COMMANDS.

Example

:= OPERATE(, 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.

08 Jan. 98

Page 4 - 69 Manual ID 09901, Rev. Index 0500

Page 156 of the Pepper Computer RS232 user manual — O_INIT_CODE
Page 156 · click to enlarge
Page 156

Digital Modules

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 is set to 0 (zero).

The error.code returns a value of zero if no error was detected, otherwise it returns a non-zero value depending on the error encountered. A list of these error codes may be found in the PEP on-line help.

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:

O_INIT_CODE

Syntax and usage as explained above.

Page 4 - 70

08 Jan. 98 Manual ID 09901, Rev. Index 0500

Page 157 of the Pepper Computer RS232 user manual — Analog Modules
Page 157 · click to enlarge
Page 157

Analog Modules

for

SMART I/O

Page 163 of the Pepper Computer RS232 user manual — 5.1 SM-DAD1
Page 163 · click to enlarge
Page 163

5. Analog Modules

5.1 SM-DAD1

5.1.1 Introduction

The SM-DAD1 provides a fast, 12-bit, bipolar (± 10V DC), 4-channel analog to digital converter and, apart from its ADC role, may also be used as a fast 12-bit, 2-channel unipolar/bipolar digital to analog converter. 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 kΩ Filter set to 10kHz On-chip Reference Voltage 13µs 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 5mA max. Output Current Power-up Reset without glitch (Unipolar) 4mV Zero Code Offset Error (Unipolar) Settling Time 40µs (-10V to +10V) EEPROM 256-byte serial EEPROM for Calibration Data Front Panel Red LEDs (user configurable) Power Cons. 350mW (min.), 450mW (max.) Temperature Range Standard (0°C to 70°C), Extended (-40°C to +85°C)

Temperature Drift 6 LSB (max.) across temp. range -40°C to +85°C (ADC) 4 LSB (max.) across temp. range -40°C to +85°C (DAC) Module Weight 70g ID Byte $50, read by the SPI Interface

Input · Output

Page 164 of the Pepper Computer RS232 user manual — 5.1.3 Front Panel Layout
Page 164 · click to enlarge
Page 164

5.1.3 Front Panel Layout

Red LEDs User Descriptor Fields

Page 165 of the Pepper Computer RS232 user manual — LED 0 LED 1
Page 165 · click to enlarge
Page 165

5.1.4 Board Overview

LED 0 LED 1

DC/DC

ADC

EEPROM

DAC

BU1 BU2

LED 0 LED 1

J2

J3

J5

J4

BU1 BU2

Pin 16 Pin 2 Pin 16 Pin 2

Show 6 more labels / short text on this page
Component Side · Input Multiplexer · Input Amplifier · DAC Reference · Output Amplifier · Solder Side
Page 166 of the Pepper Computer RS232 user manual — AGND
Page 166 · click to enlarge
Page 166

5.1.5 Functional Description

The SM-DAD1 has 4 differential voltage inputs and 2 unipolar/bipolar voltage outputs. An on-board EEPROM contains board specific calibration data, module ID byte and production data. An on-board switched-mode regulator provides ±15V for the analog I/O and an additional linear regulator provides the -5V required by the ADC.

5.1.5.1 Input Circuitry

The input circuitry of the SM-DAD1 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.1SM-DAD1 Input Schematic Diagram

MUX

4:1 Input Amplifier ADC System Interface

Source -10 .. +10V

AGND

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.

Show 4 more labels / short text on this page
+ · Filter Voltage · Low Pass · Single Ended
Page 167 of the Pepper Computer RS232 user manual — DAC
Page 167 · click to enlarge
Page 167

5.1.5.2 Output Circuitry

The digital to analog converter (DAC) section consists of a twin output 12- bit DAC with external (on-board) 10.0V reference and an operational amplifier for unipolar/bipolar outputs.

Figure 5.1.5.2SM-DAD1 Output Schematic Diagram

DAC

-10V .. +10V

0 .. +10V

AGND

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

Show 7 more labels / short text on this page
VOUTx · Load · System Interface · Output Amplifier · Uni-/Bipolar · Ref · Switch
Page 168 of the Pepper Computer RS232 user manual — 5.1.6 Configuration
Page 168 · click to enlarge
Page 168

5.1.6 Configuration

The SM-DAD1 has 5 solder jumpers which may be configured as follows:

Jumpers J1 and J2

These jumpers are reserved for PEP use only.

Jumper J3 - EEPROM Protection

Jumper Settings Description J3 set EEPROM is not hardware write protected open EEPROM is hardware write protected

Jumper J4 and J5 - DAC Output

Jumper Settings Description J4 open VOUT0 unipolar 0V .. +10V set VOUT0 bipolar -10V .. +10V J5 open VOUT1 unipolar 0V .. +10V set VOUT1 bipolar -10V .. +10V

If altering the mode (unipolar/bipolar) of the DAC output, be sure that software is aware of the change.

Page 169 of the Pepper Computer RS232 user manual — 5.1.7 Pinouts
Page 169 · click to enlarge
Page 169

5.1.7 Pinouts

The following shows the pinout/signal relationship for the SM-DAD1 when connected to a particular screw terminal block.

Pepper Computer RS232 — 5.1.7 Pinouts diagram (page 169)
Fig. 51 · 5.1.7 Pinouts

Pin Nr. Signal Description Pin Nr. Signal Description 1 IN0P (+) Analog Input Ch. 0+ 2 IN2P (+) Analog Input Ch. 2+ 3 IN0N (-) Analog Input Ch. 0- 4 IN2N (-) Analog Input Ch. 2- 5 AGND Analog GND 6 AGND Analog GND 7 IN1P (+) Analog Input Ch. 1+ 8 IN3P (+) Analog Input Ch. 3+ 9 IN1N (-) Analog Input Ch. 1- 10 IN3N (-) Analog Input Ch. 3- 11 VOUT0 Analog Output Ch. 0 12 VOUT1 Analog Output Ch. 1 13 AGND Analog GND 14 AGND Analog GND

Show 5 more labels / short text on this page
Screw Terminal Pinouts · Pin 1 · Pin 13 · Pin 2 · Pin 14
Page 170 of the Pepper Computer RS232 user manual — 5.1.7 Pinouts
Page 170 · click to enlarge
Page 170
Pepper Computer RS232 — 5.1.7 Pinouts diagram (page 170)
Fig. 52 · 5.1.7 Pinouts
Pepper Computer RS232 — 5.1.7 Pinouts diagram (page 170)
Fig. 53 · 5.1.7 Pinouts

Connection · Gnd (0V) · A/D Circuit

Page 171 of the Pepper Computer RS232 user manual — +15V
Page 171 · click to enlarge
Page 171

+15V

MAX532 REF

DAC

VOUT0

LT1013 1/2 J4

MAX876

AGND

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.

Show 5 more labels / short text on this page
D/A Circuit · 20 k +15V · 20 k · 20 k · 20 k +15V
Page 172 of the Pepper Computer RS232 user manual — 5.1.8 ‘C’ Programming
Page 172 · click to enlarge
Page 172

5.1.8 ‘C’ Programming

5.1.8.1 SM-DAD1 Library

The SM-DAD1 library of functions smartio.l provide a convenient way of accessing the SM-DAD1 module.

  • All functions are written in ANSI C;
  • Prototypes are to be found in the file dad1lib.h .
  • SMART I/O Base Module or Base Module and Extension unit;
  • SM-DAD1 Module.

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 SMDAD1Init must first be called. This allocates the requested resources. Furthermore, this function needs to be called for each SM-DAD1 Module called within the task. Upon completion of the application, the function SMDAD1DeInit needs to be called for each SM-DAD1 Module that has been initialized.

In order to illustrate the use of the SM-DAD1 library, an application example called demodad1.c can be found in the SMART I/O application directory (normally found in /<device>/APPLIC/SMART/CMDS).

Hardware Requirements · Software Requirements

Page 173 of the Pepper Computer RS232 user manual — 5.1.8.2 SMDAD1Init
Page 173 · click to enlarge
Page 173

If the same SM-DAD1 Module is to be accessed from different tasks, the user must make sure that the actual output status is ensured by using for example, semaphores within OS-9.

5.1.8.2 SMDAD1Init

Syntax error_code SMDAD1Init(u_int8 PortNr);

Description This function initializes the resources needed to use the SM-DAD1 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);

Page 174 of the Pepper Computer RS232 user manual — 5.1.8.3 SMDAD1DeInit
Page 174 · click to enlarge
Page 174

5.1.8.3 SMDAD1DeInit

Syntax error_code SMDAD1DeInit(u_int8 PortNr);

Description This function de-initializes the SM-DAD1 Module on the port PortNr by freeing the resources tied up with it and setting all outputs and inputs to zero.

Input u_int8 PortNr SM-Port number to de-initialize (from 0 to 10)

Output error_code SUCCESS 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 175 of the Pepper Computer RS232 user manual — 5.1.8.4 SMDAD1GetVRaw
Page 175 · click to enlarge
Page 175

5.1.8.4 SMDAD1GetVRaw

Syntax error_code SMDAD1GetVRaw(u_int8 PortNr, u_int8

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 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 = SMDAD1GetVRaw(0, 2, 0x07FF);

Value (16-bit HEX) Unipolar Bipolar Positive Full-Scale $07FF Positive Full-Scale $07FF +1LSB $0001 +1LSB $0001 0 $0000 -1LSB $FFFF Negative Full-Scale $F800

Channel, int16 *pValue);

Page 176 of the Pepper Computer RS232 user manual — 5.1.8.5 SMDAD1GetV
Page 176 · click to enlarge
Page 176

5.1.8.5 SMDAD1GetV

Syntax error_code SMDAD1GetV(u_int8 PortNr, u_int8 Channel,

Description This function fetches the conversion result of a selected channel. A gain and offset correction is done with the use of the selected conversion table. The result is always a signed integer value. If bipolar mode is selected, the function returns the 2’s complement value of the original read.

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, 0x07FF);

Value (16-bit HEX) Unipolar Bipolar Positive Full-Scale $07FF Positive Full-Scale $07FF +1LSB $0001 +1LSB $0001 0 $0000 -1LSB $FFFF Negative Full-Scale $F800

int16 *pValue);

Page 177 of the Pepper Computer RS232 user manual — 5.1.8.6 SMDAD1PutVRaw
Page 177 · click to enlarge
Page 177

5.1.8.6 SMDAD1PutVRaw

Syntax error_code SMDAD1PutVRaw(u_int8 PortNr, u_int8

Description This function sets the selected DAC channel to the chosen value. No gain or offset correction is performed.

Input u_int8 PortNr SM-Port number to be accessed u_int8 Channel Number of the DAC output channel to access (0-1) 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 the OS-9 Technical Manual Error Codes Section).

Example RetVal = SMDAD1PutVRaw(0, 1, 0x0FFF);

Value (16-bit HEX) Unipolar Bipolar Positive Full-Scale $0FFF Positive Full-Scale $0FFF +1LSB $0001 +1LSB $0801 0 $0000 0 $0800 -1LSB $07FF Negative Full-Scale $0000

Channel, u_int16 Value);

Page 178 of the Pepper Computer RS232 user manual — 5.1.8.7 SMDAD1PutV
Page 178 · click to enlarge
Page 178

5.1.8.7 SMDAD1PutV

Syntax error_code SMDAD1PutV(u_int8 PortNr, u_int8 Channel,

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, 0x7FF);

Value (16-bit HEX) Unipolar Bipolar Positive Full-Scale $0FFF Positive Full-Scale $07FF +1LSB $0001 +1LSB $0001 0 $0000 0 $0000 -1LSB $FFFF Negative Full-Scale $F800

int16 Value);

Page 179 of the Pepper Computer RS232 user manual — 5.1.8.8 SMDAD1SetLed
Page 179 · click to enlarge
Page 179

5.1.8.8 SMDAD1SetLed

Syntax error_code SMDAD1SetLed(u_int8 PortNr, u_int8 LedNr);

Description This function switches on one of the two LEDs fitted to the SM-DAD1.

Input u_int8 PortNr 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 = SMDAD1SetLed(0, 2);

Page 180 of the Pepper Computer RS232 user manual — 5.1.8.9 SMDAD1ClrLed
Page 180 · click to enlarge
Page 180

5.1.8.9 SMDAD1ClrLed

Syntax error_code SMDAD1ClrLed(u_int8 PortNr, u_int8 LedNr);

Description This function switches off one of the two LEDs fitted to the SM-DAD1.

Input u_int8 PortNr 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 = SMDAD1ClrLed(0, 2);

Page 181 of the Pepper Computer RS232 user manual — 5.1.9 ISaGRAF Programming
Page 181 · click to enlarge
Page 181

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

Pepper Computer RS232 — 5.1.9 ISaGRAF Programming diagram (page 181)
Fig. 54 · 5.1.9 ISaGRAF Programming
Pepper Computer RS232 — 5.1.9 ISaGRAF Programming diagram (page 181)
Fig. 55 · 5.1.9 ISaGRAF Programming

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 example shown here, the board being addressed is in slot 2 i.e. the second of the SMART-BASE slots. Up to 11 slots are catered for in the SMART I/O concept; 3 on the SMART-BASE and 2 for each connected SMART-EXT (up to a total of 4).

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 J5 must be set accordingly as it is impossible under ISaGRAF to configure the outputs individually.

Logical Address · Module Specific Information

Page 182 of the Pepper Computer RS232 user manual — 5.1.9.2 The ISaGRAF Operate Calls
Page 182 · click to enlarge
Page 182

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:

:= OPERATE(, COMMAND,

Here the return variable is assigned a value associated with the selected COMMAND parameter. Each SMART-Module possesses its own set of these COMMANDS.

:= OPERATE(, 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 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.

Syntax · ); · Example

Page 183 of the Pepper Computer RS232 user manual — 5.1.9.2 The ISaGRAF Operate Calls
Page 183 · click to enlarge
Page 183

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:

:= OPERATE(, O_SET_LED, );

where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred. represents any module variable and represents the LED to be controlled and must be one of OA_LED1_ON or OA_LED1_OFF.

O_ENABLE_CONV: This operate calls tells ISaGRAF to enable the conversion of a particular channel of a connected SM-DAD1 module. The syntax is as follows:

:= OPERATE(, O_ENABLE_CONV, 0);

where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred. is the variable name for the channel where the operate call is to take effect.

Page 184 of the Pepper Computer RS232 user manual — 5.1.9.2 The ISaGRAF Operate Calls
Page 184 · click to enlarge
Page 184

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:

:= OPERATE(, O_DISABLE_CONV, 0);

where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred. is the variable name for the channel where the operate call is to take effect.

Page 185 of the Pepper Computer RS232 user manual — 5.2 SM-PT100
Page 185 · click to enlarge
Page 185

5.2 SM-PT100

5.2.1 Introduction

The SM-PT100 is used for 2, 3 or 4-wire temperature measurement using PT100 sensors driven by an on-board constant current source. Temperature measurements between -200°C and + 850°C are possible with corrective calibration for the two possible PT100 4-wire classes being provided in driver software for OS-9 operation. A fast 16-bit delta-sigma A/D converter ensures an absolute accuracy of 0.2°C.

5.2.2 Specifications

Isolation 1.0 kV Optoisolated from the system

4 PT100 groups 4-wire connection supported Open Sensor Detection Self Calibration Overvoltage Protection

: ± 25V (power connected) : ± 35V (power disconnected) : -200°C to 850°C : 1 LSB/°C (not compensated) : typ. 125 ms, max. 500 ms (depends on filter settings) : 10 MΩ (min) : 16-bit : ± 0.2°C (sensor errors excluded) : by software EEPROM 256-bit serial EEPROM for Calibration Data Front Panel 2 Red LEDs Power Cons. 350mW (min.), 450mW (max.) Temperature Range Standard (0°C to +70°C), Extended (-40°C to +85°C) Module Weight 40g ID Byte $60, read by the SPI Interface

Temperature Range Temperature Drift Conversion Time

Input Impedance Resolution Absolute Accuracy Linearization

Input

Page 186 of the Pepper Computer RS232 user manual — LED 0 LED 1
Page 186 · click to enlarge
Page 186

5.2.3 Front Panel Layout

SM-PT100

4 Ch. (4-wire) PT100 Inputs

5.2.4 Board Overview

LED 0 LED 1

ADC

DC/DC

EEPROM

BU1 BU2

Show 7 more labels / short text on this page
Red LEDs · User Descriptor Fields · Component Side · Optocouplers · Logic · Multiplexers · J1 Optocouplers
Page 187 of the Pepper Computer RS232 user manual — 5.2.5 Functional Description
Page 187 · click to enlarge
Page 187

5.2.5 Functional Description

Figure 5.2.5.1SM-PT100 Schematic Diagram

User Interface System Interface

Pepper Computer RS232 — 5.2.5 Functional Description diagram (page 187)
Fig. 56 · 5.2.5 Functional Description

The SM-PT100 has provision for 4 sets of 4-wire PT100 sensors driven by an on-board generated 400µA 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 is 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.

The PT100 is a platinum resistance, which at 0ºC has a resistance of 100Ω 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

Show 5 more labels / short text on this page
Red White · Red White Red · Pt 100/ /2 · Pt 100/ /3 · Pt 100/ /4
Page 188 of the Pepper Computer RS232 user manual — 5.2.5 Functional Description
Page 188 · click to enlarge
Page 188

The two- and three-wire measurement methods shown in figure 5.2.5.2 are not compensated and will experience errors due to line-resistances. The best and recommended method is the 4-wire system shown in figure 5.2.5.1. which eliminates all line resistances automatically. The sense lines, being connected to a high impedance differential amplifier (10MΩ), introduce almost zero error resulting from line-resistances.

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

Class A Class B °C Ω °C Ω -200 ± 0.55 ± 0.24 ± 1.3 ± 0.56 -100 ± 0.35 ± 0.14 ± 0.8 ± 0.32 0 ± 0.15 ± 0.06 ± 0.3 ± 0.12 100 ± 0.35 ± 0.13 ± 0.8 ± 0.30 200 ± 0.55 ± 0.20 ± 1.3 ± 0.48 300 ± 0.75 ± 0.27 ± 1.8 ± 0.64 400 ± 0.95 ± 0.33 ± 2.3 ± 0.79 500 ± 1.15 ± 0.38 ± 2.8 ± 0.93 600 ± 1.35 ± 0.43 ± 3.3 ± 1.06 650 ± 1.45 ± 0.46 ± 3.6 ± 1.13 700 – – ± 3.8 ± 1.17 800 – – ± 4.3 ± 1.28 850 – – ± 4.6 ± 1.34

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.

Temperature · °C Tolerance

Page 189 of the Pepper Computer RS232 user manual — 5.2.6 Configuration
Page 189 · click to enlarge
Page 189

5.2.6 Configuration

Jumper J1 - EEPROM Protection

Jumper Settings Description J1 set EEPROM is not hardware write protected open EEPROM is hardware write protected

5.2.7 Pinouts

The following shows the pinout/signal relationship for the SM-PT100 when connected to a particular screw terminal block.

Pepper Computer RS232 — 5.2.6 Configuration diagram (page 189)
Fig. 57 · 5.2.6 Configuration

Pin Nr. Signal Description Pin Nr. Signal Description 1 Cur 0 400µA source for sensor 2 Cur 1 400µA source for sensor 3 In 0+ Sense line 0 positive 4 In 1+ Sense line 1 positive 5 In 0 - Sense line 0 negative 6 In 1 - Sense line 1 negative 7 AGND GND between 2 sensors 8 AGND GND between 2 sensors 9 In 2+ Sense line 2 positive 10 In 3+ Sense line 3 positive 11 In 2 - Sense line 2 negative 12 In 3 - Sense line 3 negative 13 Cur 2 400µA source for sensor 14 Cur 3 400µA source for sensor

Show 5 more labels / short text on this page
Screw Terminal Pinouts · Pin 1 · Pin 13 · Pin 2 · Pin 14
Page 190 of the Pepper Computer RS232 user manual — PT100 PT100
Page 190 · click to enlarge
Page 190

PT100 PT100

Pepper Computer RS232 — PT100 PT100 diagram (page 190)
Fig. 58

PT100 PT100

Pepper Computer RS232 — PT100 PT100 diagram (page 190)
Fig. 59

Connection · Input Circuit

Page 191 of the Pepper Computer RS232 user manual — 5.2.8 ‘C’ Programming
Page 191 · click to enlarge
Page 191

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 .
  • SMART I/O Base Module or Base Module and Extension unit;
  • SM-PT100 Module.

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

Hardware Requirements · Software Requirements

Page 192 of the Pepper Computer RS232 user manual — 5.2.8 ‘C’ Programming
Page 192 · click to enlarge
Page 192

To compile the source, execute the following commands at the shell prompt:

> chd //APPLIC/SMART > make all

To execute the example:

load //BSP/SMART/SMADC/adc_task * load HW task load //APPLIC/SMART/CMDS/demoadc * load example demoadc [slot]

Slot = 0,1 .. 10 specifies the port of the SM-PT100 module. (Default = 0)

To start the HW Task, the OS-9 module adc_task must be loaded, then the function SMADCInit 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.

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 is able to read this value by using the function SMADCReadRaw.

Initialization · Read RAW Data

Page 193 of the Pepper Computer RS232 user manual — 5.2.8 ‘C’ Programming
Page 193 · click to enlarge
Page 193

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.

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 SMADCDeInit should be called by this task to free memory and resources otherwise tied up with the application.

For more information on other functions, refer to the description of the functions later in this document or the example demoadc.c.

Both LEDs on the SM-PT100 module are used to show the status of the HW task. LED1 is the upper one; LED2 is the lower one.

LED1 LED2 Status off off ADC is not in use on off Calibration in progress off on AD conversion in progress on on Standardization to reference value in progress

Show 4 more labels / short text on this page
Read Temperature Values · Calibration · Other Functions · LEDs
Page 194 of the Pepper Computer RS232 user manual — END
Page 194 · click to enlarge
Page 194

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

(for a channel) Yes

END

Show 18 more labels / short text on this page
SMADCSetCyclicCalib() · (for a channel) · SMADCInit() · Sleep(0) · Install Signal Handler · SMADCReadConverted() · - OS-Intercept · (for a channel) · SMADCSetSensorType() · (for a channel) · SMADCEnableRead() · (for a channel) · No · Finished · SMADCEnableConversion() · (for a channel) · SMADCSetSignal() · SMADCDeinit()
Page 195 of the Pepper Computer RS232 user manual — 5.2.8.2 SMADCInit
Page 195 · click to enlarge
Page 195

5.2.8.2 SMADCInit

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_Data’) - 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 error_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);

Syntax · error_code SMADCInit(u_int8 PortNr); · Description

Page 196 of the Pepper Computer RS232 user manual — 5.2.8.3 SMADCCalibrate
Page 196 · click to enlarge
Page 196

5.2.8.3 SMADCCalibrate

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);

Syntax · error_code SMADCCalibrate(u_int8 PortNr); · Description

Page 197 of the Pepper Computer RS232 user manual — 5.2.8.4 SMADCSetCyclicCalib
Page 197 · click to enlarge
Page 197

5.2.8.4 SMADCSetCyclicCalib

error_code SMADCSetCyclicCalib(u_int8 PortNr, u_int

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_int16 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);

Syntax · secs); · Description

Page 198 of the Pepper Computer RS232 user manual — 5.2.8.5 SMADCSetSensorType
Page 198 · click to enlarge
Page 198

5.2.8.5 SMADCSetSensorType

error_code SMADCSetSensorType(u_int8 PortNr, u_int8

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_int16 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_BTYP 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, PT100);

Syntax · channel, u_int16 sensorCode); · Description

Page 199 of the Pepper Computer RS232 user manual — 5.2.8.6 SMADCGetSensorType
Page 199 · click to enlarge
Page 199

5.2.8.6 SMADCGetSensorType

error_code SMADCGetSensorType(u_int8 PortNr, u_int8

This function checks if an SM-PT100 board is fitted on the specified port and if the channel is valid. It gets the code of the sensor type of the specified channel and stores it in a user defined buffer. The user has to take care that there is enough place to store the data. A list of PEP supported sensor types can be found in the file linear.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_int16*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, &Buffer);

Syntax · channel, u_int16 *pBuffer); · Description

Page 200 of the Pepper Computer RS232 user manual — 5.2.8.7 SMADCSetPrecision
Page 200 · click to enlarge
Page 200

5.2.8.7 SMADCSetPrecision

error_code SMADCSetPrecision(u_int8 PortNr, u_int8

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);

Syntax · channel, u_int8 precision); · Description

Page 201 of the Pepper Computer RS232 user manual — 5.2.8.8 SMADCGetPrecision
Page 201 · click to enlarge
Page 201

5.2.8.8 SMADCGetPrecision

error_code SMADCGetPrecision(u_int8 PortNr, u_int8

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 specified channel (0 to 3) u_int16*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, &Buffer);

Syntax · channel, u_int16 *pBuffer); · Description

Page 202 of the Pepper Computer RS232 user manual — 5.2.8.9 SMADCSetMode
Page 202 · click to enlarge
Page 202

5.2.8.9 SMADCSetMode

error_code SMADCSetMode(u_int8 PortNr, u_int8 channel,

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);

Syntax · u_int8 mode); · Description

Page 203 of the Pepper Computer RS232 user manual — 5.2.8.10 SMADCGetMode 5-47
Page 203 · click to enlarge
Page 203

5.2.8.10 SMADCGetMode

error_code SMADCGetMode(u_int8 PortNr, u_int8 channel,

This function checks if an SM-PT100 board is fitted on the specified port and if the channel is valid. It gets the mode setting of the channel and stores the value in a user defined buffer. The user has to take care that the buffer is large enough to store the data.

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, &Buffer);

Syntax · u_int8 *pBuffer); · Description

Page 204 of the Pepper Computer RS232 user manual — 5.2.8.11 SMADCSetSignal
Page 204 · click to enlarge
Page 204

5.2.8.11 SMADCSetSignal

error_code SMADCSetSignal(u_int8 PortNr, u_int8 channel, process_id procID, signal_code sigCode);

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-PT100 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 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_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 = SMADCSetSignal(0, 1, 0, 0x100);

Syntax · Description

Page 205 of the Pepper Computer RS232 user manual — 5.2.8.12 SMADCSetGain
Page 205 · click to enlarge
Page 205

5.2.8.12 SMADCSetGain

error_code SMADCSetGain(u_int8 PortNr, u_int8 channel,

This function checks if an SM-PT100 board is fitted on the specified port and if the channel is valid and sets the value of the gain amplifier. The valid values for gain are defined in the file smadc.h. The default values for the attached sensor are substituted here when the sensor type is 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 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 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}

Syntax · u_int8 gain); · Description

Page 206 of the Pepper Computer RS232 user manual — 5.2.8.13 SMADCGetGain
Page 206 · click to enlarge
Page 206

5.2.8.13 SMADCGetGain

error_code SMADCGetGain(u_int8 PortNr, u_int8 channel,

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_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, &Buffer);

Syntax · u_int8 *pBuffer); · Description

Page 207 of the Pepper Computer RS232 user manual — 5.2.8.14 SMADCEnableRead
Page 207 · click to enlarge
Page 207

5.2.8.14 SMADCEnableRead

error_code SMADCEnableRead(u_int8 PortNr, u_int8

This function checks if an SM-PT100 board is fitted on the specified port and if the channel is valid. It forces the HW task to read raw values from the enabled channels of the device one after the other. The HW task writes the results to the data module. If the flag enable is TRUE (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 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);

Syntax · channel, BOOLEAN enable); · Description

Page 208 of the Pepper Computer RS232 user manual — 5.2.8.15 SMADCEnableConversion
Page 208 · click to enlarge
Page 208

5.2.8.15 SMADCEnableConversion

error_code SMADCEnableConversion(u_int8 PortNr, u_int8

This function checks if an SM-PT100 board is fitted on the specified port and if the channel is valid and forces the HW task to convert the raw values. If the flag enable is TRUE (0), then conversion of raw values to degrees Celsius is executed, else if (enable=FALSE) no conversion takes place. The function invalidates converted data, if enable is 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 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 is specified or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).

Example RetVal = SMADCEnableConversion(0, 1, FALSE);

Syntax · channel, BOOLEAN enable); · Description

Page 209 of the Pepper Computer RS232 user manual — 5.2.8.16 SMADCReadRaw
Page 209 · click to enlarge
Page 209

5.2.8.16 SMADCReadRaw

error_code SMADCReadRaw(u_int8 PortNr, u_int8 channel,

This function checks if an SM-PT100 board is fitted on the specified port and if the channel is valid. It reads the raw value of the last conversion and stores it in a user defined buffer. The user has to take care that the buffer is large enough to store the data.

Input u_int8 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_int16 *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 = SMADCReadRaw(0, 1, &Buffer);

Syntax · u_int16 *pBuffer); · Description

Page 210 of the Pepper Computer RS232 user manual — 5.2.8.17 SMADCReadConverted
Page 210 · click to enlarge
Page 210

5.2.8.17 SMADCReadConverted

error_code SMADCReadConverted(u_int8 PortNr, u_int8

This function reads the converted value of the last AD Conversion and stores the value in degrees Celcius in a user defined buffer. The user has to take care that the buffer is large enough to store the data.

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 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, &Buffer);

Syntax · channel, double *pBuffer); · Description

Page 211 of the Pepper Computer RS232 user manual — 5.2.8.18 SMADCDeinit
Page 211 · click to enlarge
Page 211

5.2.8.18 SMADCDeinit

This function frees the resources attached to this module if it was initialised.

Input u_int8 PortNr Number of the port to deinitialise

Output error_code SUCCESS or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).

Example RetVal = SMADCDeinit(0);

Syntax · error_code SMADCDeinit(u_int8 PortNr); · Description

Page 212 of the Pepper Computer RS232 user manual — 5.2.9 ISaGRAF Programming
Page 212 · click to enlarge
Page 212

5.2.9 ISaGRAF Programming

5.2.9.1 The ISaGRAF Board Parameters

Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual.

Figure 5.2.9.1.1 a Typical Screen Section for the SM-PT100 Module

Pepper Computer RS232 — 5.2.9 ISaGRAF Programming diagram (page 212)
Fig. 60 · 5.2.9 ISaGRAF Programming

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 i.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 either resistor100 or PT100 depending whether the returned value should be raw ohmic or calibrated in degrees Celsius respectively.

Logical Address

Page 213 of the Pepper Computer RS232 user manual — 5.2.9.2 The ISaGRAF Operate Calls
Page 213 · click to enlarge
Page 213

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:

:= OPERATE(, COMMAND,

Here the return variable is assigned a value associated with the selected COMMAND parameter. Each SMART-Module possesses its own set of these COMMANDS.

:= OPERATE(, 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 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.

Syntax · ); · Example

Page 214 of the Pepper Computer RS232 user manual — 5.2.9.2 The ISaGRAF Operate Calls
Page 214 · click to enlarge
Page 214

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:

:= OPERATE(, O_ENABLE_CONV, 0);

where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred. 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:

:= OPERATE(, O_DISABLE_CONV, 0);

where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred. is the variable name for the channel where the operate call is to take effect.

Page 215 of the Pepper Computer RS232 user manual — 5.3 SM-THERM
Page 215 · click to enlarge
Page 215

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

Isolation 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) : ± 35V (power disconnected) : Refer to table below : 1 LSB/°C (not compensated) : typ. 125 ms, max. 500 ms (depends on filter settings) : 10 MΩ (min) : 16-bit : ± 0.2°C (sensor errors excluded) : by software EEPROM 256-bit serial EEPROM for Calibration Data Front Panel 2 Red LEDs Power Cons. 350mW (min.), 450mW (max.) Temperature Range Standard (0°C to +70°C), Extended (-40°C to +85°C) Module Weight 40g ID Byte $61, read by the SPI Interface

Temperature Range Temperature Drift Conversion Time

Input Impedance Resolution Absolute Accuracy Linearization

Temperature (High Range R -50°C 1760°C T -270°C 400°C S -50°C 1760°C E -270°C 1000°C B 0°C 1820°C K -270°C 1370°C J -210°C 1200°C

Temperature (High Range Sensor Category Temperature

Show 4 more labels / short text on this page
Input · Sensor Category Temperature · (Low Range) · (Low Range)
Page 216 of the Pepper Computer RS232 user manual — LED 0 LED 1
Page 216 · click to enlarge
Page 216

5.3.3 Front Panel Layout

SM-THERM

4 Channel Thermocouple Inputs

5.3.4 Board Overview

LED 0 LED 1

ADC

DC/DC

EEPROM

BU1 BU2

Show 7 more labels / short text on this page
Red LEDs · User Descriptor Fields · Component Side · Optocouplers · Logic · Multiplexers · J1 Optocouplers
Page 217 of the Pepper Computer RS232 user manual — SHIELD LINE
Page 217 · click to enlarge
Page 217

5.3.5 Functional Description

Figure 5.3.5.1SM-THERM Schematic Diagram

SHIELD LINE

AGND

SENSE LINE

IN+

A/D

I/O

SENSE LINE

IN-

SUPPLY/SENSE LINE

TMP+

TMP-

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 connected cold junction point (PT100).

Show 7 more labels / short text on this page
LED Driver · Thermo Sensor · Multiplexer · Impedance · Converter · Converter · System Interface Serial
Page 218 of the Pepper Computer RS232 user manual — 5.3.6 Configuration
Page 218 · click to enlarge
Page 218

5.3.6 Configuration

Jumper J1 - EEPROM Protection

J1 set EEPROM is not hardware write protected

open EEPROM is hardware write protected

5.3.7 Pinouts

The following shows the pinout/signal relationship for the SM-PT100 when connected to a particular screw terminal block.

Pepper Computer RS232 — 5.3.6 Configuration diagram (page 218)
Fig. 61 · 5.3.6 Configuration

Pin Nr. Signal Description Pin Nr. Signal Description 1 AGND Analog Shield 2 AGND Analog Shield 3 In 0+ Positive Sense Line (0) 4 In 1+ Positive Sense Line (1) 5 In 0 - Negative Sense Line (0) 6 In 1 - Negative Sense Line (1) 7 TMP + † PT100 Cold Jn. supply 8 TMP - † PT100 Cold Jn. supply 9 In 2+ Positive Sense Line (2) 10 In 3+ Positive Sense Line (3) 11 In 2 - Negative Sense Line (2) 12 In 3 - Negative Sense Line (3) 13 AGND Analog Shield 14 AGND Analog Shield

† Cold Junction point PT100 connection

Show 6 more labels / short text on this page
Jumper Settings Description · Screw Terminal Pinouts · Pin 1 · Pin 13 · Pin 2 · Pin 14
Page 219 of the Pepper Computer RS232 user manual — PT100
Page 219 · click to enlarge
Page 219
Pepper Computer RS232 — 5.3.6 Configuration diagram (page 219)
Fig. 62 · 5.3.6 Configuration

PT100

Pepper Computer RS232 — PT100 diagram (page 219)
Fig. 63

Connection · Input Circuit

Page 220 of the Pepper Computer RS232 user manual — 5.3.8 ‘C’ Programming
Page 220 · click to enlarge
Page 220

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 .
  • SMART I/O Base Module or Base Module and Extension unit;
  • SM-THERM Module.

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 SMADCDeInit needs to be called for each SM-THERM module that has been initialized.

In order to illustrate the use 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).

Hardware Requirements · Software Requirements

Page 221 of the Pepper Computer RS232 user manual — 5.3.8 ‘C’ Programming
Page 221 · click to enlarge
Page 221

To compile the source, execute the following commands at the shell prompt:

> chd //APPLIC/SMART > make all

To execute the example:

load //BSP/SMART/SMADC/adc_task * load HW task load //APPLIC/SMART/CMDS/demoadc * load example demoadc [slot]

Slot = 0,1 .. 10 specifies the port of the SM-THERM module. (Default = 0)

To start the HW Task, the OS-9 module adc_task must be loaded, then the function SMADCInit 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.

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 is able to read this value by using the function SMADCReadRaw.

Initialization · Read RAW Data

Page 222 of the Pepper Computer RS232 user manual — 5.3.8 ‘C’ Programming
Page 222 · click to enlarge
Page 222

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.

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.

If the task calling the SMADC library function finishes, the function SMADCDeInit should be called by this task to free memory and resources otherwise tied up with the application.

For more information on other functions, refer to the description of the functions later in this document or the example demoadc.c.

Both LEDs on the SM-THERM module are used to show the status of the HW task. LED1 is the upper one; LED2 is the lower one.

LED1 LED2 Status off off ADC is not in use on off Calibration in progress off on AD conversion in progress on on Standardisation to reference value in progress

Show 5 more labels / short text on this page
Read Temperature Values · Calibration · Deinitialization · Other Functions · LEDs
Page 223 of the Pepper Computer RS232 user manual — END
Page 223 · click to enlarge
Page 223

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

(for a channel) Yes

END

Show 18 more labels / short text on this page
SMADCSetCyclicCalib() · (for a channel) · SMADCInit() · Sleep(0) · Install Signal Handler · SMADCReadConverted() · - OS-Intercept · (for a channel) · SMADCSetSensorType() · (for a channel) · SMADCEnableRead() · (for a channel) · No · Finished · SMADCEnableConversion() · (for a channel) · SMADCSetSignal() · SMADCDeinit()
Page 224 of the Pepper Computer RS232 user manual — 5.3.8.2 SMADCInit
Page 224 · click to enlarge
Page 224

5.3.8.2 SMADCInit

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 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);

Syntax · error_code SMADCInit(u_int8 PortNr); · Description

Page 225 of the Pepper Computer RS232 user manual — 5.3.8.3 SMADCCalibrate
Page 225 · click to enlarge
Page 225

5.3.8.3 SMADCCalibrate

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 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);

Syntax · error_code SMADCCalibrate(u_int8 PortNr); · Description

Page 226 of the Pepper Computer RS232 user manual — 5.3.8.4 SMADCSetCyclicCalib
Page 226 · click to enlarge
Page 226

5.3.8.4 SMADCSetCyclicCalib

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_int16 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);

Show 4 more labels / short text on this page
Syntax · error_code SMADCSetCyclicCalib(u_int8 PortNr, · u_int secs); · Description
Page 227 of the Pepper Computer RS232 user manual — 5.3.8.5 SMADCSetSensorType
Page 227 · click to enlarge
Page 227

5.3.8.5 SMADCSetSensorType

error_code SMADCSetSensorType(u_int8 PortNr, u_int8

This function checks if an SM-THERM board is fitted on the specified port, if the channel is valid, if the sensorCode is known and sets the gain, preci- sion 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_int16 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_BTYP 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);

Syntax · channel, u_int16 sensorCode); · Description

Page 228 of the Pepper Computer RS232 user manual — 5.3.8.6 SMADCGetSensorType
Page 228 · click to enlarge
Page 228

5.3.8.6 SMADCGetSensorType

error_code SMADCGetSensorType(u_int8 PortNr, u_int8

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 linear.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_int16*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, &Buffer);

Syntax · channel, u_int16 *pBuffer); · Description

Page 229 of the Pepper Computer RS232 user manual — 5.3.8.7 SMADCSetPrecision
Page 229 · click to enlarge
Page 229

5.3.8.7 SMADCSetPrecision

error_code SMADCSetPrecision(u_int8 PortNr, u_int8

This function checks if an SM-THERM board is fitted on the specified port and if the channel is valid. It sets the precision of the AD Converter. The valid precision values are defined in the file smadc.h. Note that large preci- sion/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);

Syntax · channel, u_int8 precision); · Description

Page 230 of the Pepper Computer RS232 user manual — 5.3.8.8 SMADCGetPrecision
Page 230 · click to enlarge
Page 230

5.3.8.8 SMADCGetPrecision

error_code SMADCGetPrecision(u_int8 PortNr, u_int8

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_int16*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, &Buffer);

Syntax · channel, u_int16 *pBuffer); · Description

Page 231 of the Pepper Computer RS232 user manual — 5.3.8.9 SMADCSetMode 5-75
Page 231 · click to enlarge
Page 231

5.3.8.9 SMADCSetMode

error_code SMADCSetMode(u_int8 PortNr, u_int8 channel,

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 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);

Syntax · u_int8 mode); · Description

Page 232 of the Pepper Computer RS232 user manual — 5.3.8.10 SMADCGetMode
Page 232 · click to enlarge
Page 232

5.3.8.10 SMADCGetMode

error_code SMADCGetMode(u_int8 PortNr, u_int8 channel,

This function checks if an SM-THERM board is fitted on the specified port and if the channel is valid. It gets the mode setting of the channel and stores the value in a user defined buffer. The user has to take care that the buffer is large enough to store the data.

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, &Buffer);

Syntax · u_int8 *pBuffer); · Description

Page 233 of the Pepper Computer RS232 user manual — 5.3.8.11 SMADCSetSignal
Page 233 · click to enlarge
Page 233

5.3.8.11 SMADCSetSignal

error_code SMADCSetSignal(u_int8 PortNr, u_int8 channel, process_id procID, signal_code sigCode);

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 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_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 = SMADCSetSignal(0, 1, 0, 0x100);

Syntax · Description

Page 234 of the Pepper Computer RS232 user manual — 5.3.8.12 SMADCSetGain
Page 234 · click to enlarge
Page 234

5.3.8.12 SMADCSetGain

error_code SMADCSetGain(u_int8 PortNr, u_int8 channel,

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

Syntax · u_int8 gain); · Description

Page 235 of the Pepper Computer RS232 user manual — 5.3.8.13 SMADCGetGain
Page 235 · click to enlarge
Page 235

5.3.8.13 SMADCGetGain

error_code SMADCGetGain(u_int8 PortNr, u_int8 channel,

This function checks if an SM-THERM board is fitted on the specified port and if the channel is valid. It gets the gain amplifier setting of the ADC and stores the value in a user defined buffer where the user has to take care that the buffer is large enough to store the data.

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, &Buffer);

Syntax · u_int8 *pBuffer); · Description

Page 236 of the Pepper Computer RS232 user manual — 5.3.8.14 SMADCEnableRead
Page 236 · click to enlarge
Page 236

5.3.8.14 SMADCEnableRead

error_code SMADCEnableRead(u_int8 PortNr, u_int8

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 (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 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);

Syntax · channel, BOOLEAN enable); · Description

Page 237 of the Pepper Computer RS232 user manual — 5.3.8.15 SMADCEnableConversion
Page 237 · click to enlarge
Page 237

5.3.8.15 SMADCEnableConversion

error_code SMADCEnableConversion(u_int8 PortNr, u_int8

This function checks if an SM-THERM board is fitted on the specified port and if the channel is valid and forces the HW task to convert the raw values. If the flag enable is TRUE (0), then conversion of raw values to degrees Celsius is executed, else if (enable=FALSE) no conversion takes place. The function invalidates converted data, if enable is 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 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 is specified or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).

Example RetVal = SMADCEnableConversion(0, 1, FALSE);

Syntax · channel, BOOLEAN enable); · Description

Page 238 of the Pepper Computer RS232 user manual — 5.3.8.16 SMADCReadRaw
Page 238 · click to enlarge
Page 238

5.3.8.16 SMADCReadRaw

error_code SMADCReadRaw(u_int8 PortNr, u_int8 channel,

This function checks if an SM-THERM board is fitted on the specified port and if the channel is valid. It reads the raw value of the last conversion and stores it in a user defined buffer. The user has to take care that the buffer is large enough to store the data.

Input u_int8 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_int16 *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 = SMADCReadRaw(0, 1, &Buffer);

Syntax · u_int16 *pBuffer); · Description

Page 239 of the Pepper Computer RS232 user manual — 5.3.8.17 SMADCReadConverted
Page 239 · click to enlarge
Page 239

5.3.8.17 SMADCReadConverted

error_code SMADCReadConverted(u_int8 PortNr, u_int8

This function reads the converted value of the last AD Conversion and stores the value in degrees Celcius in a user defined buffer. The user has to take care that the buffer is large enough to store the data.

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, &Buffer);

Syntax · channel, double *pBuffer); · Description

Page 240 of the Pepper Computer RS232 user manual — 5.3.8.18 SMADCDeinit
Page 240 · click to enlarge
Page 240

5.3.8.18 SMADCDeinit

This function frees the resources attached to this module if it was initialized.

Input u_int8 PortNr Number of the port 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 = SMADCDeinit(0);

Syntax · error_code SMADCDeinit(u_int8 PortNr); · Description

Page 241 of the Pepper Computer RS232 user manual — 5.3.9 ISaGRAF Programming
Page 241 · click to enlarge
Page 241

5.3.9 ISaGRAF Programming

5.3.9.1 The ISaGRAF Board Parameters

Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual.

Figure 5.3.9.1.1 a Typical Screen Section for the SM-THERM Module

Pepper Computer RS232 — 5.3.9 ISaGRAF Programming diagram (page 241)
Fig. 64 · 5.3.9 ISaGRAF Programming

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

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.

Logical Address · Module Specific Information

Page 242 of the Pepper Computer RS232 user manual — 5.3.9.2 The ISaGRAF Operate Calls
Page 242 · click to enlarge
Page 242

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:

:= OPERATE(, COMMAND,

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:

:= OPERATE(, 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 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.

);

Page 243 of the Pepper Computer RS232 user manual — 5.3.9.2 The ISaGRAF Operate Calls
Page 243 · click to enlarge
Page 243

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-THERM module. The syntax is as follows:

:= OPERATE(, O_ENABLE_CONV, 0);

where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred. 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 is as follows:

:= OPERATE(, O_DISABLE_CONV, 0);

where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred. is the variable name for the channel where the operate call is to take effect.

Page 244 of the Pepper Computer RS232 user manual — 5.3.9.2 The ISaGRAF Operate Calls
Page 244 · click to enlarge
Page 244

This page has been left blank intentionally.

Page 245 of the Pepper Computer RS232 user manual — 5.4 SM-ADC1
Page 245 · click to enlarge
Page 245

5.4 SM-ADC1

5.4.1 Introduction

The SM-ADC1 provides a fast, 12-bit, bipolar (± 10V DC), 6-channel analog to digital converter. Two configurable red LEDs on the front panel form the user interface while an on-board EEPROM stores unique calibra- tion data required by the signal converter.

A version of the SM-ADC1 for current input (0 .. 20mA) is also available.

5.4.2 Specifications

Isolation 1.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. 440kΩ (124Ω ) 10kHz Filter On-Chip Ref. Voltage 13µs Conversion Time @ 1MHz SCLK † EEPROM 256 Byte serial EEPROM for Calibration Data Front Panel 2 Red LEDs (User Configurable) Power Cons. 350mW (min.), 450mW (max.) Temperature Range Standard (0°C to +70°C), Ext./Storage (-40°C to +85°C) Module Weight 70g ID Byte $62, read by the SPI Interface

† The conversion time applies per channel

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 89

Input

Page 246 of the Pepper Computer RS232 user manual — LED 0 LED 1
Page 246 · click to enlarge
Page 246

5.4.3 Front Panel Layout

Pepper Computer RS232 — 5.4.3 Front Panel Layout diagram (page 246)
Fig. 65 · 5.4.3 Front Panel Layout

5.4.4 Board Overview

LED 0 LED 1

Pepper Computer RS232 — LED 0 LED 1 diagram (page 246)
Fig. 66

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 90

Red LEDs · User Descriptor Fields · Component Side

Page 247 of the Pepper Computer RS232 user manual — AGND
Page 247 · click to enlarge
Page 247

5.4.5 Functional Description

The SM-ADC1 has 6 differential voltage or current inputs depending on the ordered type. An on-board EEPROM contains board specific calibration data, module ID byte, sub ID byte and production data. A DC/DC converter generates the 5V to ±15V power requirements for the ADC converter and provides additional system isolation.

5.4.5.1 Input Circuitry

The input circuitry of the SM-ADC1 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.1SM-ADC1 Input Shematic Diagram

MUX

8:1 Input Amplifier ADC System Interface

Source -10 .. +10V

AGND

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.

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 91

Show 4 more labels / short text on this page
+ · Filter Voltage · Low Pass · Single Ended
Page 248 of the Pepper Computer RS232 user manual — 5.4.6 Configuration
Page 248 · click to enlarge
Page 248

5.4.6 Configuration

Although the SM-ADC1 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

The following shows the pinout/signal relationship for the SM-ADC1 when connected to a particular screw terminal block.

Pin Nr. Signal Description Pin Nr. Signal Description 1 IN0+ Analog Input Ch. 0+ 2 IN3+ Analog Input Ch. 3+ 3 IN0- Analog Input Ch. 0- 4 IN3- Analog Input Ch. 3- 5 AGND Analog GND 6 AGND Analog GND 7 IN1+ Analog Input Ch. 1+ 8 IN4+ Analog Input Ch. 4+ 9 IN1- Analog Input Ch. 1- 10 IN4- Analog Input Ch. 4- 11 IN2+ Analog Input Ch. 2+ 12 IN5+ Analog Input Ch. 5+ 13 IN2- Analog Input Ch. 2- 14 IN5- Analog Input Ch. 5-

Pepper Computer RS232 — 5.4.6 Configuration diagram (page 248)
Fig. 67 · 5.4.6 Configuration

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 92

Show 5 more labels / short text on this page
Screw Terminal Pinouts · Pin 1 · Pin 13 · Pin 2 · Pin 14
Page 249 of the Pepper Computer RS232 user manual — 5.4.6 Configuration
Page 249 · click to enlarge
Page 249

Connection:

Pepper Computer RS232 — 5.4.6 Configuration diagram (page 249)
Fig. 68 · 5.4.6 Configuration

Input Circuit:

Pepper Computer RS232 — 5.4.6 Configuration diagram (page 249)
Fig. 69 · 5.4.6 Configuration

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 93

+Vcc (24V) · Gnd (0V)

Page 250 of the Pepper Computer RS232 user manual — 5.4.8 ‘C’ Programming
Page 250 · click to enlarge
Page 250

5.4.8 ‘C’ Programming

5.4.8.1 SM-ADC1 Library

The SM-ADC1 library of functions smartio.l provide a convenient way of accessing the SM-ADC1 module.

  • All functions are written in ANSI C;
  • Prototypes are to be found in the file adc1lib.h .
  • SMART I/O Base Module or Base Module and Extension unit;
  • SM-ADC1 Module.

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 SMADC1Init must first be called. This allocates the requested resources. Furthermore, this function needs to be called for each SM-ADC1 Module called within the task. Upon completion of the application, the function SMADC1DeInit needs to be called for each SM-ADC1 Module that has been initialised.

In order to illustrate the use of the SM-ADC1 library, an application example called demoadc1.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 - 94

Hardware Requirements · Software Requirements

Page 251 of the Pepper Computer RS232 user manual — 5.4.8.2 SMADC1Init
Page 251 · click to enlarge
Page 251

5.4.8.2 SMADC1Init

This function initialises the SM-ADC1 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

u_int8 PortNr Port number of module to initialise (from 0 to 10)

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 = SMADC1Init(0);

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 95

Show 5 more labels / short text on this page
Syntax · error_code SMADC1Init(u_int8 PortNr); · Description · Input · Output
Page 252 of the Pepper Computer RS232 user manual — 5.4.8.3 SMADC1GetVRaw
Page 252 · click to enlarge
Page 252

5.4.8.3 SMADC1GetVRaw

Syntax error_code SMADC1GetVRaw(u_int8 PortNr, u_int8

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.

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 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, 0x07FF);

Value (16-bit HEX) Unipolar Bipolar Positive Full-Scale $0FFF Positive Full-Scale $07FF +1LSB $0001 +1LSB $0001 0 $0000 -1LSB $FFFF Negative Full-Scale $F800

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 96

Channel, int16 *pValue);

Page 253 of the Pepper Computer RS232 user manual — 5.4.8.4 SMADC1GetV
Page 253 · click to enlarge
Page 253

5.4.8.4 SMADC1GetV

Syntax error_code SMADC1GetV(u_int8 PortNr, u_int8 Channel,

Description This function fetches the conversion result of a selected channel. A gain and offset correction is performed and the result stored as a signed integer value.

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 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, 0x07FF);

Value (16-bit HEX) Unipolar Bipolar Positive Full-Scale $0FFF Positive Full-Scale $07FF +1LSB $0001 +1LSB $0001 0 $0000 0 $0000 -1LSB $FFFF Negative Full-Scale $F800

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 97

int16 *pValue);

Page 254 of the Pepper Computer RS232 user manual — 5.4.8.5 SMADC1SetLed
Page 254 · click to enlarge
Page 254

5.4.8.5 SMADC1SetLed

Syntax error_code SMADC1SetLed(u_int8 PortNr, u_int8 LedNr);

Description This function switches on one of the two LEDs fitted to the SM-ADC1.

Input u_int8 PortNr 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 = SMADC1SetLed(0, 2);

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 98

Page 255 of the Pepper Computer RS232 user manual — 5.4.8.6 SMADC1ClrLed
Page 255 · click to enlarge
Page 255

5.4.8.6 SMADC1ClrLed

Syntax error_code SMADC1ClrLed(u_int8 PortNr, u_int8 LedNr);

Description This function switches off one of the two LEDs fitted to the SM-ADC1.

Input u_int8 PortNr 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);

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 99

Page 256 of the Pepper Computer RS232 user manual — 5.4.8.7 SMADC1DeInit
Page 256 · click to enlarge
Page 256

5.4.8.7 SMADC1DeInit

Syntax error_code SMADC1DeInit(u_int8 PortNr);

Description This function deinitialises the SM-ADC1 Module on the port PortNr by freeing the resources tied up with it and setting all outputs and inputs to zero.

Input u_int8 PortNr SM-Port number to de-initialise (from 0 to 10)

Output error_code SUCCESS 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);

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 100

Page 257 of the Pepper Computer RS232 user manual — 5.4.9 ISaGRAF Programming
Page 257 · click to enlarge
Page 257

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

Pepper Computer RS232 — 5.4.9 ISaGRAF Programming diagram (page 257)
Fig. 70 · 5.4.9 ISaGRAF Programming

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 is the same as the physical slot position! In the example shown here, the board being addressed is in slot 3 i.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).

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 101

Logical Address

Page 258 of the Pepper Computer RS232 user manual — 5.4.9.2 The ISaGRAF Operate Calls
Page 258 · click to enlarge
Page 258

5.4.9.2 The ISaGRAF Operate Calls

Operate calls are built into a program using ST or FBD languages when defining the project. A typical use could be at the initialization stage to check that the SMART-Modules are in fact located where they have been pro- grammed to be. The syntax of the operate call is as follows:

:= OPERATE(, COMMAND,

Here the return variable is assigned a value associated with the selected COMMAND parameter. Each SMART-Module possesses its own set of these COMMANDS.

:= OPERATE(, 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 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.

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 102

Syntax · ); · Example

Page 259 of the Pepper Computer RS232 user manual — 5.4.9.2 The ISaGRAF Operate Calls
Page 259 · click to enlarge
Page 259

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 call tells ISaGRAF to enable the conversion of a particular channel of a connected SM-ADC1 module. The syntax is as follows:

:= OPERATE(, O_ENABLE_CONV, 0);

where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred. 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-ADC1 module. The syntax is as follows:

:= OPERATE(, O_DISABLE_CONV, 0);

where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred. is the variable name for the channel where the operate call is to take effect.

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 103

Page 260 of the Pepper Computer RS232 user manual — O_DISABLE_LINE_CHECK :
Page 260 · click to enlarge
Page 260

O_ENABLE_LINE_CHECK :

This operate call allows the user to enable open- loop checking on the current version of the SM- ADC1. The syntax is as follows:

:= OPERATE(, O_ENABLE_LINE_CHECK,

where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred. is the variable name for the channel where the operate call is to take effect. 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- ADC1. The syntax is as follows:

:= OPERATE(, O_DISABLE_LINE_CHECK,

where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred. is the variable name for the channel where the operate call is to take effect. is not used.

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 104

); · );

Page 261 of the Pepper Computer RS232 user manual — O_GET_LINE_STATE :
Page 261 · click to enlarge
Page 261

O_SET_LINE_LIMIT :

This operate call allows the user to set the open loop detect level on the current version of the SM-ADC1. The syntax is as follows:

:= OPERATE(, O_SET_LINE_LIMIT,

where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred. is the variable name for the channel where the operate call is to take effect. is the current value in mA and calculated using the following formula:

var = 0xFFF0 mA

O_GET_LINE_STATE :

This operate call allows the user to check the line state on the current version of the SM-ADC1. The syntax is as follows:

:= OPERATE(, O_GET_LINE_STATE,

where represents the analog return variable and is zero if an open loop is detected. Otherwise it returns 1. is the variable name for the channel where the operate call is to take effect. is not used.

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 105

); · );

Page 262 of the Pepper Computer RS232 user manual — 5.4.9.2 The ISaGRAF Operate Calls
Page 262 · click to enlarge
Page 262

This page has been left blank intentionally.

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 106

Page 263 of the Pepper Computer RS232 user manual — 5.5 SM-DAC1
Page 263 · click to enlarge
Page 263

5.5 SM-DAC1

5.5.1 Introduction

The SM-DAC1 provides a fast, 12-bit, bipolar (± 10V DC), 2/6-channel digital to analog converter. Two configurable red LEDs on the front panel form the user interface while an on-board EEPROM stores unique 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

Isolation 1.0 kV Optoisolated from the system

2/6 Outputs Output Range ± 10V DC (0 .. 20mA) 12-bit DAC with 1-bit non-linearity 11-bit Repeating Accuracy Glitch-Free Power-On-Reset 2mA (max.) output current (voltage version) 75µs Conversion Time @ 1MHz SCLK † Ext. Vcc 24V DC (-10% .. +20%) EEPROM 256 Byte serial EEPROM for Calibration Data Front Panel 2 Red LEDs (User Configurable) Power Cons. 660mW (max. voltage version) 400mW (max. current version) Temperature Range Standard (0°C to +70°C), Ext./Storage (-40°C to +85°C) Module Weight 70g ID Byte $40, read by the SPI Interface

† The conversion time applies per channel for a full scale voltage swing of (-10V .. +10V)

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 107

Output

Page 264 of the Pepper Computer RS232 user manual — LED 0 LED 1
Page 264 · click to enlarge
Page 264

5.5.3 Front Panel Layout

Pepper Computer RS232 — 5.5.3 Front Panel Layout diagram (page 264)
Fig. 71 · 5.5.3 Front Panel Layout

5.5.4 Board Overview

LED 0 LED 1

Pepper Computer RS232 — LED 0 LED 1 diagram (page 264)
Fig. 72

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 108

Component Side

Page 265 of the Pepper Computer RS232 user manual — AGND
Page 265 · click to enlarge
Page 265

5.5.5 Functional Description

The SM-DAC1 has 2, 4 or 6 differential voltage or current outputs depending on the ordered type. An on-board EEPROM contains board specific calibra- tion data, module ID byte, sub ID byte and production data. A DC/DC converter generates the 5V to ±15V power requirements for the D/A con- verter and provides additional system isolation.

5.5.5.1 Output Circuitry

The output stage of the SM-DAC1 comprises a fast D/A converter followed by a software controlled switch that ensures the on-board op-amp remains inactive and produces 0V at it’s output during power-up. The current version has an additional MOSFET after this op-amp.

Figure 5.5.5.1SM-DAC1 Output Shematic Diagram

DAC System Interface Operational

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.

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 109

Show 4 more labels / short text on this page
Software Controlled · Output · Switch · Amplifier
Page 266 of the Pepper Computer RS232 user manual — 5.5.6 Configuration
Page 266 · click to enlarge
Page 266

5.5.6 Configuration

Although the SM-DAC1 has one solder jumper for EEPROM configuration, the user should not interfere with it.

5.5.7 Pinouts

The following shows the pinout/signal relationship for the SM-DAC1 when connected to a particular screw terminal block.

Pepper Computer RS232 — 5.5.6 Configuration diagram (page 266)
Fig. 73 · 5.5.6 Configuration

Pin Nr. Signal Description Pin Nr. Signal Description 1 OUT0 Analog Output Ch. 0 2 OUT3 Analog Output Ch. 3 3 AGND Analog GND 4 AGND Analog GND 5 OUT1 Analog Output Ch. 1 6 OUT4 Analog Output Ch. 4 7 AGND Analog GND 8 AGND Analog GND 9 OUT2 Analog Output Ch. 2 10 OUT5 Analog Output Ch. 5 11 AGND Analog GND 12 AGND Analog GND 13 AGND Analog GND 14 AGND Analog GND

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 110

Show 5 more labels / short text on this page
Screw Terminal Pinouts · Pin 1 · Pin 13 · Pin 2 · Pin 14
Page 267 of the Pepper Computer RS232 user manual — AGND
Page 267 · click to enlarge
Page 267

Connection:

Pepper Computer RS232 — 5.5.6 Configuration diagram (page 267)
Fig. 74 · 5.5.6 Configuration

Current Output Circuit:

Pepper Computer RS232 — 5.5.6 Configuration diagram (page 267)
Fig. 75 · 5.5.6 Configuration

AGND

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 111

+Vcc (24V) · Gnd (0V)

Page 268 of the Pepper Computer RS232 user manual — AGND
Page 268 · click to enlarge
Page 268

Voltage Output Circuit:

Software Controlled Switch 1/4 DG413

1/2 LT112

DAC

± 10V DC

GND

-2.04V reference source for bipolar operation

AGND

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 112

Show 4 more labels / short text on this page
20k · 20k · 49k9 · 5k6
Page 269 of the Pepper Computer RS232 user manual — 5.5.8 ‘C’ Programming
Page 269 · click to enlarge
Page 269

5.5.8 ‘C’ Programming

5.5.8.1 SM-DAC1 Library

The SM-DAC1 library of functions smartio.l provide a convenient way of accessing the SM-DAC1 module.

  • All functions are written in ANSI C;
  • Prototypes are to be found in the file dac1lib.h .
  • SMART I/O Base Module or Base Module and Extension unit;
  • SM-DAC1 Module.

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 SMDAC1Init must first be called. This allocates the requested resources and should be noted that it is not designed for multi-tasking. Furthermore, this function needs to be called for each SM-DAC1 Module called within the task. Upon completion of the application, the function SMDAC1DeInit needs to be called for each SM- DAC1 Module that has been initialised.

In order to illustrate the use of the SM-DAC1 library, an application example called demodac1.c can be found in the SMART I/O application directory (normally found in /<device>/APPLIC/SMART/CMDS).

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 113

Hardware Requirements · Software Requirements

Page 270 of the Pepper Computer RS232 user manual — 5.5.8.2 SMDAC1Init
Page 270 · click to enlarge
Page 270

5.5.8.2 SMDAC1Init

This function initialises the SM-DAC1 Module on port PortNr, and:

- tests the module’s ID - reads the conversion table held in EEPROM - allocates space for the fetched resources

u_int8 PortNr Port number of module to initialise (from 0 to 10)

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 = SMDAC1Init(0);

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 114

Show 5 more labels / short text on this page
Syntax · error_code SMDAC1Init(u_int8 PortNr); · Description · Input · Output
Page 271 of the Pepper Computer RS232 user manual — 5.5.8.3 SMDAC1OpenLoop
Page 271 · click to enlarge
Page 271

5.5.8.3 SMDAC1OpenLoop

Syntax error_code SMDAC1OpenLoop(u_int8 PortNr, u_int8

Description This function should only be used for the current version of the SM-DAC1 module and checks the wires for open loop in a 4..20mA environment. The result is stored in a register with the following definition.

Register value111110 -> channel 0 connected and o.k 101111 -> channel 4 connected and o.k

Input u_int8 PortNr SM-Port to be accessed u_int8 pStatus Pointer to the location where the status is stored: 0 -> line connected and o.k 1 -> 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 = SDAC1OpenLoop(0, &Status);

If this function is called and requested for use with a voltage version of the SM-DAC1 module then an error will be returned. Likewise, if a channel is requested that is out of range then an error is returned.

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 115

pStatus);

Page 272 of the Pepper Computer RS232 user manual — 5.5.8.4 SMADAC1Operate
Page 272 · click to enlarge
Page 272

5.5.8.4 SMADAC1Operate

Syntax error_code SMDAC1Operate(u_int8 PortNr);

Description This function powers up the outputs as they are disconnected from the screw terminals by default. This is the software control of the software switch shown in the schematics earlier in this section of the manual.

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 is unknown or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).

Example RetVal = SMAC1Operate(0);

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 116

Page 273 of the Pepper Computer RS232 user manual — 5.5.8.5 SMDAC1StandBy
Page 273 · click to enlarge
Page 273

5.5.8.5 SMDAC1StandBy

Syntax error_code SMDAC1StandBy(u_int8 PortNr);

Description This function places the module connected on Port PortNr in standby mode where the outputs are disconnected from the screw terminal block.

Input u_int8 PortNr 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 = SMDAC1StandBy(0);

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 117

Page 274 of the Pepper Computer RS232 user manual — 5.5.8.6 SMDAC1PutVRaw
Page 274 · click to enlarge
Page 274

5.5.8.6 SMDAC1PutVRaw

Syntax error_code SMDAC1PutVRaw(u_int8 PortNr, u_int8

Description This function sets the selected DAC channel to the chosen value. No gain or offset correction is performed and the given value will always be masked to a 12-bit value.

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 the OS-9 Technical Manual Error Codes Section).

Example RetVal = SMDAC1PutVRaw(0, 1, 0x0FFF);

Value (16-bit HEX) Unipolar Bipolar Positive Full-Scale $0FFF Positive Full-Scale $0FFF +1LSB $0001 +1LSB $0801 0 $0000 0 $0800 -1LSB $07FF Negative Full-Scale $0000

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 118

Channel, u_int16 Value);

Page 275 of the Pepper Computer RS232 user manual — 5.5.8.7 SMDAC1PutV
Page 275 · click to enlarge
Page 275

5.5.8.7 SMDAC1PutV

Syntax error_code SMDAC1PutV(u_int8 PortNr, u_int8 Channel,

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-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 = SMDAC1PutV(0, 1, 0x0FFF);

Value (16-bit HEX) Unipolar Bipolar Positive Full-Scale $0FFF Positive Full-Scale $07FF +1LSB $0001 +1LSB $0001 0 $0000 0 $0000 -1LSB $FFFF Negative Full-Scale $F800

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 119

int16 Value);

Page 276 of the Pepper Computer RS232 user manual — 5.5.8.8 SMDAC1SetLed
Page 276 · click to enlarge
Page 276

5.5.8.8 SMDAC1SetLed

Syntax error_code SMDAC1SetLed(u_int8 PortNr, u_int8 LedNr);

Description This function switches on one of the two LEDs fitted to the SM-DAC1.

Input u_int8 PortNr 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 = SMDAC1SetLed(0, 2);

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 120

Page 277 of the Pepper Computer RS232 user manual — 5.5.8.9 SMDAC1ClrLed
Page 277 · click to enlarge
Page 277

5.5.8.9 SMDAC1ClrLed

Syntax error_code SMDAC1ClrLed(u_int8 PortNr, u_int8 LedNr);

Description This function switches off one of the two LEDs fitted to the SM-DAC1.

Input u_int8 PortNr 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 = SMDAC1ClrLed(0, 2);

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 121

Page 278 of the Pepper Computer RS232 user manual — 5.5.8.10 SMDAC1DeInit
Page 278 · click to enlarge
Page 278

5.5.8.10 SMDAC1DeInit

Syntax error_code SMDAC1DeInit(u_int8 PortNr);

Description This function deinitialises the SM-DAC1 Module on the port PortNr by freeing the resources tied up with it and shuts down the outputs.

Input u_int8 PortNr SM-Port number to de-initialise (from 0 to 10)

Output error_code SUCCESS 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);

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 122

Page 279 of the Pepper Computer RS232 user manual — 5.5.9 ISaGRAF Programming
Page 279 · click to enlarge
Page 279

5.5.9 ISaGRAF Programming

5.5.9.1 The ISaGRAF Board Parameters

Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual.

Figure 5.5.9.1.1 Typical Screen Section for the SM-DAC1 Module

Pepper Computer RS232 — 5.5.9 ISaGRAF Programming diagram (page 279)
Fig. 76 · 5.5.9 ISaGRAF Programming

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

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 123

Logical Address

Page 280 of the Pepper Computer RS232 user manual — 5.5.9.2 The ISaGRAF Operate Calls
Page 280 · click to enlarge
Page 280

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 operate call is as follows:

:= OPERATE(, COMMAND,

Here the return variable is assigned a value associated with the selected COMMAND parameter. Each SMART-Module possesses its own set of these COMMANDS.

:= OPERATE(, 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 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.

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 124

Syntax · ); · Example

Page 281 of the Pepper Computer RS232 user manual — 5.5.9.2 The ISaGRAF Operate Calls
Page 281 · click to enlarge
Page 281

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 two red LEDs on the board’s front panel. The syntax is as follows:

:= OPERATE(, O_SET_LED, );

where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred. represents any module variable and 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-DAC1 module. The syntax is as follows:

:= OPERATE(, O_ENABLE_CONV, 0);

where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred. is the variable name for the channel where the operate call is to take effect.

©1996 PEP Modular Computers GmbH October 01, 1996 Page 5 - 125

Page 282 of the Pepper Computer RS232 user manual — O_GET_LINE_STATE :
Page 282 · click to enlarge
Page 282

O_DISABLE_CONV: This operate call tells ISaGRAF to disable the conversion of a particular channel of a connected SM-DAC1 module. The syntax is as follows:

:= OPERATE(, O_DISABLE_CONV, 0);

where represents the analog return variable and can be zero if the operate call is supported and the correct is passed or non-zero if an error occurred. is the variable name for the channel where the operate call is 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-DAC1. The syntax is as follows:

:= OPERATE(, O_GET_LINE_STATE,

where represents the analog return variable and is zero if an open loop is detected. Otherwise it returns 1. is the variable name for the channel where the operate call is to take effect. is not used.

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 5 - 126

);

Page 283 of the Pepper Computer RS232 user manual — Communications Modules
Page 283 · click to enlarge
Page 283

Chapter 6 Communications Modules

Communications Modules

for

SMART I/O

Page 287 of the Pepper Computer RS232 user manual — 6.1 SM-RS232
Page 287 · click to enlarge
Page 287

Chapter 6 Communications Modules

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

Output Transceiver TxD and DTR † Up to 19200 Baud EEPROM 256 Byte Serial EEPROM

Front Panel Green RxD LED Yellow TxD LED Power Consumption 23mW (min.), 75mW (max.) Module Weight 30g ID Byte $80 Read by the SPI Interface

† CTS/DTR lines are NOT supported by PEP standard software. XON/ XOFF software protocol is used instead.

Page 288 of the Pepper Computer RS232 user manual — LED 0 LED 1
Page 288 · click to enlarge
Page 288

Chapter 6 Communications Modules

6.1.3 Front Panel Layout

RxD User Descriptor Fields

SM-RS232

6.1.4 Board Overview

LED 0 LED 1

EEPROM

BU1 BU2

Show 5 more labels / short text on this page
Yellow LED TxD · Green LED · 1 Serial Interface · Component Side · Inverter J1 Transceiver
Page 289 of the Pepper Computer RS232 user manual — DTR
Page 289 · click to enlarge
Page 289

Chapter 6 Communications Modules

6.1.5 Functional Description

Figure 4.3.5.1SM-RS232 Schematic Diagram

System Interface LED Driver

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.

TxD · RxD · Transceiver

Page 290 of the Pepper Computer RS232 user manual — 6.1.6 Configuration
Page 290 · click to enlarge
Page 290

Chapter 6 Communications Modules

6.1.6 Configuration

Jumper J1 - EEPROM Protection

J1 set EEPROM is not hardware write protected

open EEPROM is hardware write protected

6.1.7 Pinouts

The following shows the pinout/signal relationship for the SM-RS232 when connected to a particular screw terminal block.

Pin Nr. Signal Description Pin Nr. Signal Description 1 TxD Transmit Signal 2 N/C No Connection 3 RxD Receive Signal 4 N/C No Connection 5 DTR Data Terminal Ready 6 N/C No Connection 7 CTS Clear to Send 8 N/C No Connection 9 N/C No Connection 10 N/C No Connection 11 N/C No Connection 12 N/C No Connection 13 GND Ground 14 GND Ground

Pepper Computer RS232 — 6.1.6 Configuration diagram (page 290)
Fig. 77 · 6.1.6 Configuration
Show 6 more labels / short text on this page
Jumper Settings Description · Screw Terminal Pinouts · Pin 1 · Pin 13 · Pin 2 · Pin 14
Page 291 of the Pepper Computer RS232 user manual — GND
Page 291 · click to enlarge
Page 291

Chapter 6 Communications Modules

GND

Pepper Computer RS232 — GND diagram (page 291)
Fig. 78

TxD RxD DTR CTS

User Interface System Interface

Pepper Computer RS232 — GND diagram (page 291)
Fig. 79

Connection · Interface

Page 292 of the Pepper Computer RS232 user manual — 6.1.8 ISaGRAF Programming
Page 292 · click to enlarge
Page 292

Chapter 6 Communications Modules

6.1.8 ISaGRAF Programming

6.1.8.1 The ISaGRAF Board Parameters

Information on board parameters may be found in the PEP online help and ISaGRAF online help or user’s manual.

Figure 6.1.8.1.1 Typical Screen Sections for the SM-RS232 Module

Pepper Computer RS232 — 6.1.8 ISaGRAF Programming diagram (page 292)
Fig. 80 · 6.1.8 ISaGRAF Programming
Pepper Computer RS232 — 6.1.8 ISaGRAF Programming diagram (page 292)
Fig. 81 · 6.1.8 ISaGRAF Programming

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 is able to access the module directly without the need of a manu- ally entered logical address.

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.

Logical Address · Module Specific Information

Page 293 of the Pepper Computer RS232 user manual — 6.1.8 ISaGRAF Programming
Page 293 · click to enlarge
Page 293

Chapter 6 Communications Modules

char_length : This represents the number of data-bits within a transmitted character and may be 5, 6, 7 or 8 stop_bits : 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 parity : The parity bit of a data string may be :

0 for no parity 1 for odd parity or 2 for even parity baud_rate : The board rates supported by the SM-RS232 are standard values up to 19200 baud xon_char : XON character; typically set to 11 hex xoff_char : XOFF character: typically set to 13 hex eor_char : Character to be used to detect the end of record; is usually set to 0D hex.

The input and output devices are represented by keyboard and display respectively.

Page 294 of the Pepper Computer RS232 user manual — 6.1.8.2 The ISaGRAF Operate Calls
Page 294 · click to enlarge
Page 294

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:

:= OPERATE(, COMMAND,

Here the return variable is assigned a value associated with the selected COMMAND parameter. Each SMART-Module possesses its own set of these COMMANDS.

:= OPERATE(, 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 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.

Syntax · ); · Example

Page 295 of the Pepper Computer RS232 user manual — 6.1.8.2 The ISaGRAF Operate Calls
Page 295 · click to enlarge
Page 295

Chapter 6 Communications 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_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 if the buffer for incoming data contains data. If so, the data will be collected. The syntax is as follows:

:= OPERATE(,O_SERIAL_READ,);

where represents the actual number of characters read from the buffer. is the input device name. the number of characters expected to be read.

ret := OPERATE(keyboard, O_SERIAL_READ, 10);

If the default value 0D hex is used for the eor_char then the scanning of the input will terminate when either the key is pressed or 10 characters have been read.

Example

Page 296 of the Pepper Computer RS232 user manual — 6.1.9 OS-9 Programming
Page 296 · click to enlarge
Page 296

Chapter 6 Communications Modules

6.1.9 OS-9 Programming

Due to the fact that the device descriptor for the serial I/O is burnt into EPROM, it cannot be over-written with new values. Therefore a copy has to be generated in RAM where the parameters may be manipulated. This procedure is only useful for those users who wish to alter the default 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

change the revision number from 0 to 1 so that OS-9 selects the newest:-

$ fixmod -ua=8001 scc3 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 load:loaded /scc3

delete the copy held on the ramdisk to free the space:-

$ del scc3

check the port settings:-

$ xmode/scc3 /scc3 noupc bsp bsl echo if null=0 pause pag=24 bsp=08 del=18 eor=0D eof=1B reprint=04 dup=01 psc=17 abort=03 quit=05 bse=08 bell=07 type=00 baud=9600 xon=11 xoff=13 tabc=09 tabs=4

Page 297 of the Pepper Computer RS232 user manual — 6.1.9 OS-9 Programming
Page 297 · click to enlarge
Page 297

Chapter 6 Communications Modules

modify the settings, for example:-

$ xmode baud=19200 cs=7 par=none /scc3

check that the system has taken the parameters:-

$ xmode/scc3 /scc3 noupc bsp bsl echo if null=0 pause pag=24 bsp=08 del=18 eor=0D eof=1B reprint=04 dup=01 psc=17 abort=03 quit=05 bse=08 bell=07 type=00 baud=19200 xon=11 xoff=13 tabc=09 tabs=4

refer to the OS-9 help page for parameter descriptions by using the follow- ing:-

$ xmode -?

and finally initialise the device:-

$ iniz scc3

Page 298 of the Pepper Computer RS232 user manual — 6.1.9 OS-9 Programming
Page 298 · click to enlarge
Page 298

Chapter 6 Communications Modules

This page has been left blank intentionally.

Page 299 of the Pepper Computer RS232 user manual — 6.2 SM-SSI
Page 299 · click to enlarge
Page 299

Chapter 6 Communications Modules

6.2 SM-SSI

6.2.1 Introduction

The SM-SSI is an optoisolated single-channel, 24-bit RS422 interface for absolute encoders. Configurable data input together with flexibility afforded by software configurable encoder types transforms this SMART Module into an intelligent interface suitable for the most demanding applications. Data flow is indicated by the presence of two red LEDs on the front panel.

6.2.2 Specifications

Isolation 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 Output† 2 optoisolated 24V DC/300mA digital outputs for Encoder Reset and Encoder Direction 1 optoisolated 24V DC/300mA digital output for Match SSI Interface None, Even or Odd (software configurable), 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 Front Panel 2 Red LEDs indicating MATCH and data conversation Ext. Vcc 24V DC (±5%) Power Cons. 325 mW (min.), 375mW (max.) Temperature Range Standard (0˚C to +70˚C), Extended/Storage (-40˚C to +85˚C) Operating Humidity 0% to 95% (non-condensing)

† All outputs are referenced to the common Ext. Vcc

©1996 PEP Modular Computers GmbH October 01, 1996 Page 6 - 17

Page 300 of the Pepper Computer RS232 user manual — LED 0 LED 1
Page 300 · click to enlarge
Page 300

Chapter 6 Communications Modules

6.2.3 Front Panel Layout

Red LEDs User Descriptor Fields

An option to install a 12-bit DAC on a special piggyback is reserved for future use.

6.2.4 Board Overview

LED 0 LED 1

EEPROM

PROM

FPGA

J1

BU1 BU2

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 6- 18

Component Side · Crystal · Optocouplers

Page 301 of the Pepper Computer RS232 user manual — BU1
Page 301 · click to enlarge
Page 301

Chapter 6 Communications Modules

6.2.5 Functional Description

Figure 6.2.5.1SM-SSI Schematic Diagram

BU1

BU1

Pepper Computer RS232 — BU1 diagram (page 301)
Fig. 82

The Synchronous Serial Interface working together with a photographically etched encoder disk allows absolute codes (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.

©1996 PEP Modular Computers GmbH October 01, 1996 Page 6 - 19

Page 302 of the Pepper Computer RS232 user manual — 6.2.6 SSI Operation
Page 302 · click to enlarge
Page 302

Chapter 6 Communications Modules

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 is continuously clocked.
  • Position data is ready for conversion by the parallel -> serial converter.
  • The controller (SM-SSI) demands the axis angle from the encoder which starts the SSI clock - the number of clock pulses required is dependent on the data width (24-bits).
Figure 6.2.6.1SM-SSI Timing Diagram
Pepper Computer RS232 — 6.2.6 SSI Operation diagram (page 302)
Fig. 83 · 6.2.6 SSI Operation

m - 1 m m + 1

m = Stored parallel data T = SSI clock period td = Delay time for the first clock G0 = LSB of Gray* code Gn = MSB of Gray* code tm = Monoflop time Tp = Pause time in SSI clock

* Binary code may also be converted.

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 6- 20

Tp · Parallel Data

Page 303 of the Pepper Computer RS232 user manual — 6.2.6 SSI Operation
Page 303 · click to enlarge
Page 303

Chapter 6 Communications Modules

  • The first HIGH to LOW clock edge (1) in figure 6.2.6.1, triggers the monoflop and allows the current parallel data word present in the parallel -> serial converter to be processed. The monoflop prevents other data transfers to this parallel to serial converter.
  • The crossing of the first LOW to HIGH clock edge after the trigger (2) in figure 6.2.6.1 allows the MSB of the Gray code or binary signal to be transferred.
  • With every successive LOW to HIGH transition of the SSI clock, the next bit in the data stream is 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 -> serial converter.
Figure 6.2.6.2SM-SSI Timing Diagram for serial transfer

©1996 PEP Modular Computers GmbH October 01, 1996 Page 6 - 21

Show 4 more labels / short text on this page
T Clock · Tp Pause · Pause · Tp
Page 304 of the Pepper Computer RS232 user manual — 6.2.7 Register Description
Page 304 · click to enlarge
Page 304

Chapter 6 Communications Modules

6.2.7 Register Description

The SM-SSI SMART-Module connected to a SMART I/O slot uses the SPI transparent mode for on-board data reading and writing and 5 parallel lines for data selection. On board are a set of registers and peripherals shown in the table below:

No. Description Direction 1 Internal 16-bit Status Register Read Only 1 Internal 24-bit Control Register Write Only 1 Internal 8-bit Identification Register Read Only 1 Internal 24-bit Data Register Read Only 1 Internal 24-bit Compare Register Write Only 1 SPI compatible serial EEPROM Read/Write 1 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 is written to, simul- taneously the Status Register is 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
  • AR : Automatic Reading Mode
  • P : Parity Enable/Disable
  • RST : Encoder Reset Control
  • ENI : Interrupt Masks
  • PT : Parity Type (Odd/Even)
  • SOT : Start Transmission
  • DT : Data Type (Gray/Binary)
  • CF : Data Clock Frequency
  • CM : Clear Match output

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 6- 22

Page 305 of the Pepper Computer RS232 user manual — 6.2.7.2 CTRL1 Register
Page 305 · click to enlarge
Page 305

Chapter 6 Communications Modules

6.2.7.2 CTRL1 Register

CTRL1-7 CTRL1-6 CTRL1-5 CTRL1-4 CTRL1-3 CTRL1-2 CTRL1-1 RST AR SOT DIR EN13-MH EN12-EOR ENI1-TC

ENIO-P enable / disable (1 / 0) interrupt on parity error ENI1-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 -> ‘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 CF1 CF0 P FDL4 FDL3 FDL2 FDL1

FDL0-4 number of data bits, excluding parity, minus 1 P enable / disable (1 / 0) use of parity (encoder dependent) CF1-0 data transmission frequency: 0-0 62.5 kHz 1-0 125 kHz 0-1 250 kHz 1-1 500 kHz

6.2.7.4 CTRL3 Register

CTRL3-7 CTRL3-6 CTRL3-5 CTRL3-4 CTRL3-3 CTRL3-2 CTRL3-1 unused PT DT

CM A logical ‘1’ clears the MATCH output and LED DT data type (0:Gray, 1:Binary) 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.

©1996 PEP Modular Computers GmbH October 01, 1996 Page 6 - 23

Page 306 of the Pepper Computer RS232 user manual — 6.2.7.5 Compare Register
Page 306 · click to enlarge
Page 306

Chapter 6 Communications Modules

6.2.7.5 Compare Register

This 24-bit register indicates the comparison value and is cleared after a power-on reset.

6.2.7.6 Identification Register

The identification register is read only and fixed at a value of $81.

6.2.7.7 Status Register

The 16-bit status register is divided into two sub-registers which are partly cleared after a power-on reset and show:

  • IP : Interrupt Pending flags
  • DF : Data Flow
  • PE : Parity Error
  • ER1 : End-of-Range 1
  • TC : Transmission Complete
  • ER2 : End-of-Range 2
  • OL : Open Line
  • MH : Match

IP, PE, TC, OL, DF and MH flags are cleared after a reset. ER1 and ER2 represent the current hardware condition

6.2.7.8 STAT1 Register

ST1-7 ST1-6 ST1-5 ST1-4 ST1-3 ST1-2 ST1-1 OL unused DF IP4-MH IP3-ER2 IP2-ER1 IP1-TC

IP0-PE interrupt pending on parity error IP1-TC interrupt pending on transmission complete IP2-ER1 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)

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 6- 24

Page 307 of the Pepper Computer RS232 user manual — 6.2.7.9 STAT2 Register
Page 307 · click to enlarge
Page 307

Chapter 6 Communications Modules

Interrupt pending flags (IP0 - IP4) are set by the interrupt source if the corresponding line is not masked in the CTRL1 register. All flags are cleared when the STAT1 register is read.

6.2.7.9 STAT2 Register

ST2-7 ST2-6 ST2-5 ST2-4 ST2-3 ST2-2 ST2-1 unused unused unused MH ER2 ER1 TC

PE parity error on last transmission (True/False) TC transmission complete (True/False) ER1 current status of end-of-range switch 1 ER2 current status of end-of-range switch 2 MH comparison match (True/False)

The MH flag is set internally as soon as the encoder reaches the preset register value with the flag being cleared immediately the status is read. This feature is 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 is 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.

©1996 PEP Modular Computers GmbH October 01, 1996 Page 6 - 25

Page 308 of the Pepper Computer RS232 user manual — 6.2.8 MATCH Function
Page 308 · click to enlarge
Page 308

Chapter 6 Communications Modules

6.2.8 MATCH Function

The match output, which is useful for detecting when an event occurs, is set using an A > B comparator where:

A = the SSI data B = the compare register

The MATCH output is set on an edge transition of the comparator output as follows:

When counting up: MATCH is set when A passes from (AB) When counting down: MATCH is set when A passes from (A>B) to (A

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 RA58S Single-turn 12-bit Gray code Balluff BTL 3-S11-0250-F-S50 Trans sonar distance gauge 24-bit Gray code.

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 6- 26

Page 309 of the Pepper Computer RS232 user manual — 6.2.10 Configuration
Page 309 · click to enlarge
Page 309

Chapter 6 Communications Modules

6.2.10 Configuration

Jumper J1 - EEPROM Protection

Jumper Settings Description J1 set EEPROM is not hardware write protected open EEPROM is hardware write protected

6.2.11 Pinouts

The following shows the pinout/signal relationship for the SM-SSI when connected to a particular screw terminal block.

Pepper Computer RS232 — 6.2.10 Configuration diagram (page 309)
Fig. 84 · 6.2.10 Configuration

Pin Nr. Signal Description Pin Nr. Signal Description 1 CLK+ SSI Clock + 2 CLOCK- SSI Clock - 3 DATA- SSI Data - 4 DATA+ SSI Data + 5 COM+ Common + 6 MATCH- Match - 7 RESET- Encoder Reset - 8 DIR- Direction - 9 EORC EOR Common 10 GND Ground 11 EOR1 End-of-Range 1 12 EOR2 End-of-Range 2 13 Reserved 14 Reserved

©1996 PEP Modular Computers GmbH October 01, 1996 Page 6 - 27

Show 5 more labels / short text on this page
Screw Terminal Pinouts · Pin 1 · Pin 13 · Pin 2 · Pin 14
Page 310 of the Pepper Computer RS232 user manual — 6.2.10 Configuration
Page 310 · click to enlarge
Page 310

Chapter 6 Communications Modules

Pepper Computer RS232 — 6.2.10 Configuration diagram (page 310)
Fig. 85 · 6.2.10 Configuration
Pepper Computer RS232 — 6.2.10 Configuration diagram (page 310)
Fig. 86 · 6.2.10 Configuration

Parallel Data Photo Receiver Photo Transmitter

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 6- 28

Show 10 more labels / short text on this page
Connection · +Vcc (24V) · Gnd (0V) · Input Circuit · Encoder Wheel · Schmitt- Trigger · Parallel-Serial Converter · Input Switch · Monoflop · Driver
Page 311 of the Pepper Computer RS232 user manual — 6.2.12 ‘C’ Programming
Page 311 · click to enlarge
Page 311

Chapter 6 Communications Modules

6.2.12 ‘C’ Programming

6.2.12.1 SM-SSI Library

The SM-SSI library of functions smartio.l provide a convenient way of accessing the SM-SSI module.

  • All functions are written in ANSI C;
  • Prototypes are to be found in the file ssilib.h .
  • SMART I/O Base Module or Base Module and Extension unit;
  • SM-SSI1 Module.

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 is slot 1!

Before a library function can be used, the function SMSSIInit must first be called. 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 SMSSIDeInit 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).

©1996 PEP Modular Computers GmbH October 01, 1996 Page 6 - 29

Hardware Requirements · Software Requirements

Page 312 of the Pepper Computer RS232 user manual — 6.2.12.2 SMSSIInit
Page 312 · click to enlarge
Page 312

Chapter 6 Communications Modules

6.2.12.2 SMSSIInit

Syntax error_code SMSSIInit(u_int8 PortNr);

Description This function initializes the SM-SSI Module on port PortNr, resetting and clearing the status of registers and allocating resource memory.

Input u_int8 PortNr 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);

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 6- 30

Page 313 of the Pepper Computer RS232 user manual — 6.2.12.3 SMSSIDeInit
Page 313 · click to enlarge
Page 313

Chapter 6 Communications Modules

6.2.12.3 SMSSIDeInit

Syntax error_code SMSSIDeInit(u_int8 PortNr);

Description This function deinitializes the SM-SSI Module on the port PortNr by freeing the resources tied up with this module.

Input u_int8 PortNr 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 = SMSSIDeInit(0);

©1996 PEP Modular Computers GmbH October 01, 1996 Page 6 - 31

Page 314 of the Pepper Computer RS232 user manual — 6.2.12.4 SMSSISetSetPoint
Page 314 · click to enlarge
Page 314

Chapter 6 Communications Modules

6.2.12.4 SMSSISetSetPoint

Syntax error_code SMSSISetSetPoint(u_int8 PortNr,

Description This function copies the setpoint to an internal register which will only be sent to the SM-SSI when the function SMSSISetCtrlReg() is called. This function is used to set the preset value for the comparator if testing for a match.

Input u_int8 PortNr Number of the SM port to set u_int32 Setpoint Value of the comparator register (0x0 -> 0xFFFFFF) 24-bit

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 = SMSSISetSetPoint(0, 0xFF00FF);

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 6- 32

u_int32 Setpoint);

Page 315 of the Pepper Computer RS232 user manual — 6.2.12.5 SMSSISetCtrlReg
Page 315 · click to enlarge
Page 315

Chapter 6 Communications Modules

6.2.12.5 SMSSISetCtrlReg

Syntax error_code SMSSISetCtrlReg(u_int8 PortNr, long CtrlReg1, long CtrlReg2, long CtrlReg3, u_int32 *pData);

Description This function sets the internal register images of all 3 parts of the 24-bit control register with values -1 and sends them to the SM-SSI. Simultane- ously, the contents of the data register holding the last value is read back to the address pointed to by pData.

Input u_int8 PortNr SM-Port number to send register (0 to 10) long CntrlReg1 Control register 1 value (0x0 -> 0xFF) long CntrlReg2 Control register 2 value (0x0 -> 0xFF) long CntrlReg3 Control register 3 value (0x0 -> 0xFF) u_int32 *pData Pointer to the value returned from the data register (0x0 -> 0xFFFFFF)

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, 0x1, &Data);

©1996 PEP Modular Computers GmbH October 01, 1996 Page 6 - 33

Page 316 of the Pepper Computer RS232 user manual — 6.2.12.6 SMSSIGetStatus
Page 316 · click to enlarge
Page 316

Chapter 6 Communications Modules

6.2.12.6 SMSSIGetStatus

Syntax error_code SMSSIGetStatus(u_int8 PortNr,

u_int8 *pStatus1, u_int8 *pStatus2);

Description This function reads the status of the module selected on port PortNr.

Input u_int8 PortNr SM-Port number to get status u_int8 *pStatus1 Pointer to the value read in the status register 1 (0x0 -> 0xFF) u_int8 *pStatus2 Pointer to the value read in the status register 2 (0x0 -> 0xFF)

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 = SMSSIGetStaus(0, &Status1, &Status2);

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 6- 34

Page 317 of the Pepper Computer RS232 user manual — 6.2.12.7 SMSSIGetData
Page 317 · click to enlarge
Page 317

Chapter 6 Communications Modules

6.2.12.7 SMSSIGetData

Syntax error_code SMSSIGetData(u_int8 PortNr,

Description This function returns the absolute position data from the SM-SSI. If auto- matic mode is selected then a wait will not be performed otherwise SOT will be set and the read performed only when TC has been set.

Input u_int8 PortNr SM-Port number to get data u_int32 *pData Pointer to the value returned from the data register (0x0 -> 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, &pData);

©1996 PEP Modular Computers GmbH October 01, 1996 Page 6 - 35

u_int32 *pData);

Page 318 of the Pepper Computer RS232 user manual — 6.2.13 ISaGRAF Programming
Page 318 · click to enlarge
Page 318

Chapter 6 Communications Modules

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

Pepper Computer RS232 — 6.2.13 ISaGRAF Programming diagram (page 318)
Fig. 87 · 6.2.13 ISaGRAF Programming

One of:

FB_SSI_INIT This is 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, prior 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.

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 6- 36

Command

Page 319 of the Pepper Computer RS232 user manual — 6.2.13 ISaGRAF Programming
Page 319 · click to enlarge
Page 319

Chapter 6 Communications Modules

FB_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 This is the register which contains the value of the setpoint which is sent to the SSI module with the Command statement.

port The port register is used for setting the port number of the attached SM-SSI Module.

ctrx The control register elements; for a description of the register please refer to the relevant section appearing earlier.

error If an error occurs then it’s value appears in this variable.

position The position of the encoder following a read is recorded in this variable.

statusx The status register elements; for a description of the register please refer to the relevant section appearing earlier.

©1996 PEP Modular Computers GmbH October 01, 1996 Page 6 - 37

Page 320 of the Pepper Computer RS232 user manual — 6.2.13 ISaGRAF Programming
Page 320 · click to enlarge
Page 320

Chapter 6 Communications Modules

This page has been left blank intentionally.

October 01, 1996 ©1996 PEP Modular Computers GmbH Page 6- 38

Sources

References & links

Pages referenced in this manual — manufacturer, support and downloads.

Ask about the Pepper Computer RS232

Owners and our team usually reply within a day — and your question helps the next person too.

Add your email to get notified when it’s answered — no spam, ever.

0 questions
No questions yet about the Pepper Computer RS232

Be the first to ask — other owners or our team will answer.

Original document

Pepper Computer RS232 manual PDF

320 pages·3.2 MB·Network Card·PDF
Click any page above to open it here
Page 1 / …
100%
Loading pages…