13.07.2015 Views

AL16AN Programmable Logic Controller Instruction ... - FF-Automation

AL16AN Programmable Logic Controller Instruction ... - FF-Automation

AL16AN Programmable Logic Controller Instruction ... - FF-Automation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

30/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualTABLE OF CONTENT1. SYSTEM COMPONENTS ...................................................................................................... 1-12. SPECIFICATIONS.................................................................................................................. 2-12.1 Basic Board <strong>AL16AN</strong> .................................................................................................. 2-12.2 Display/Keypad units AL1093D/F, AL1094, AL1094R/F, AL1095A/B, AL1096........... 2-23. COMPONENT LAYOUTS ...................................................................................................... 3-13.1 <strong>AL16AN</strong> .......................................................................................................................3-13.2 Expansion boards AL32EX, AL32EXA, AL32EXO...................................................... 3-24. SWITCHES ............................................................................................................................ 4-14.1 Basic Board <strong>AL16AN</strong>................................................................................................... 4-14.2 Expansion boards AL32EXA, AL32EXO..................................................................... 4-25. INDICATOR LIGHTS.............................................................................................................. 5-15.1 Basic Board <strong>AL16AN</strong>................................................................................................... 5-15.2 Expansion boards AL32EX and AL32EXA.................................................................. 5-25.3 Expansion board AL32EXO ........................................................................................ 5-26. INSTALLATION AND CONNECTIONS................................................................................. 6-16.1 Environmental requirements ....................................................................................... 6-16.2 Field wiring .................................................................................................................. 6-16.3 Connection example digital inputs / outputs................................................................ 6-36.4 Analog inputs............................................................................................................... 6-66.5 Analog outputs ............................................................................................................ 6-86.6 Serial communication.................................................................................................. 6-96.7 Terminal strip numbering and connection diagrams ................................................. 6-117. RESRVED MEMORY LOCATIONS ....................................................................................... 7-17.1 Memories reporting on or controlling the operation of the PLC................................... 7-17.2 Memory locations to be initialized................................................................................ 7-27.3 Memory locations reserved for controllers .................................................................. 7-38. DISPLAY/KEYPAD UNITS ..................................................................................................... 8-18.1 AL1096 Display/Keypad units...................................................................................... 8-18.2 AL1095A/B Display/Keypad unit.................................................................................. 8-18.3 AL1093C/D/F Display/Keypad unit .............................................................................. 8-28.4 AL1094/R/AF Display/Keypad unit .............................................................................. 8-28.5 Reading the Keypad.................................................................................................... 8-38.6 Control of LED Indicators ............................................................................................ 8-38.7 Display Control Characters ......................................................................................... 8-48.8 Display Modes............................................................................................................. 8-48.9 Porgram examples ...................................................................................................... 8-79. CONTROLLERS..................................................................................................................... 9-19.1 Register memories of controllers ................................................................................ 9-19.2 Control algorithm ......................................................................................................... 9-29.3 <strong>Controller</strong> types ........................................................................................................... 9-39.4 <strong>Controller</strong> tuning .......................................................................................................... 9-49.5 Three point controllers................................................................................................. 9-5<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual30/05/9910. DATA COMMUNICATION.................................................................................................. 10-110.1 Terminal / printout ..................................................................................................... 10-210.2 MODBUS Communication ........................................................................................ 10-210.3 Modem - <strong>AL16AN</strong>...................................................................................................... 10-511. OPERATION OF THE PROGRAMMABLE LOGIC CONTROLLER .................................. 11-111.1 Switching on and special supply conditions .............................................................. 11-111.2 Start of program execution........................................................................................ 11-211.3 START command ..................................................................................................... 11-211.4 Remedies for problem situations .............................................................................. 11-312. PROGRAMMING ............................................................................................................... 12-112.1 Programming methods.............................................................................................. 12-112.2 <strong>AL16AN</strong> variables...................................................................................................... 12-312.3 <strong>AL16AN</strong> INSTRUCTIONS......................................................................................... 12-512.4 Terminal programming commands ......................................................................... 12-3912.5 Programming pointer............................................................................................... 12-4012.6 Entering an instruction in memory by terminal programming.................................. 12-4112.7 Deleting an instruction from memory ...................................................................... 12-4112.8 Locating an istruction in a program by terminal programming ................................ 12-4212.9 Listing the program by terminal programming ........................................................ 12-4212.10 Stroring the program by terminal programming ...................................................... 12-4212.11 If there is no AutoLog program in memory.............................................................. 12-4212.12 Monitoring the operation of a program by terminal programming ........................... 12-4312.13 Fast program loop................................................................................................... 12-4412.14 Special keys and corresponding ASCII codes ........................................................ 12-4512.15 Error messages....................................................................................................... 12-4613. TABLES.............................................................................................................................. 13-113.1. ASCII-codes .............................................................................................................. 13-113.2. Decimal / Octal conversions...................................................................................... 13-214. LIST OF <strong>AL16AN</strong> PRODUCTS .......................................................................................... 14-114.1 Basic board ............................................................................................................... 14-114.2 Expansion boards ..................................................................................................... 14-114.3 Analog input modules................................................................................................ 14-114.4 Analog outputs .......................................................................................................... 14-114.5 Converters for serial communication ........................................................................ 14-114.6 Accessory boards...................................................................................................... 14-214.7 Power supplies.......................................................................................................... 14-214.8 Programming cables ................................................................................................. 14-214.9 Programming software.............................................................................................. 14-214.10 Other programs ......................................................................................................... 14-2<strong>FF</strong>-<strong>Automation</strong> Oy


30/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual15. LIST OF INSTRUCTIONS.................................................................................................. 15-1Commands of Autolog English-> Finnish ............................................................................ 15-3Commands of Autolog Finnish-> English ............................................................................ 15-4The behaviour of <strong>AL16AN</strong> memories on poer failure, addresses in decimal ...................... 15-5The memory map of <strong>AL16AN</strong>, addresses in decimal ......................................................... 15-616. <strong>Instruction</strong>s for the adjustment of the analog inputs of <strong>AL16AN</strong> and AL32EXA................. 16-116.1 Adjustment potentiometers on the <strong>AL16AN</strong> and AL32EXA boards .......................... 16-116.2 <strong>AL16AN</strong> ..................................................................................................................... 16-216.3 AL32EXA................................................................................................................... 16-216.4 What is needed for adjustment ................................................................................. 16-216.5 How to read the input values using the PC and ALPro (DOS version) ..................... 16-316.6 Current input.............................................................................................................. 16-416.7 Voltage input ............................................................................................................. 16-516.8 Temperature inputs with Pt100 sensor ..................................................................... 16-616.9 Temperature inputs with KTY10 sensor (Thermistor) (PTC) .................................... 16-6APPENDIX A DIMENSIONAL DRAWINGS ...............................................................................A-1Figure A.1 Dimensions of <strong>AL16AN</strong>.....................................................................................A-1Figure A.2 Dimensions of expansion board AL32EX .........................................................A-2Figure A.3 Dimensions of expansion board AL32EXA.......................................................A-2Figure A.4 Dimensions of expansion board AL32EXO ......................................................A-3Figure A.5 Dimensions of expansion display/keypad AL1094............................................A-3Figure A.6 Dimensions of expansion display/keypad AL1094R .........................................A-3Figure A.7 Dimensions of expansion display/keypad AL1094F ........................................A-4Figure A.8 Dimensions of expansion display/keypad AL1093D .........................................A-4Figure A.9 Dimensions of expansion display/keypad AL1093F ........................................A-5Figure A.10 Dimensions of expansion display/keypad AL1095A .........................................A-5Figure A.11 Dimensions of expansion display/keypad AL1095B .........................................A-6Figure A.12 Dimensions of graphic display - keypad/touchscreen AL1096S/T....................A-6Figure A.13 Dimensions of graphic display - keypad/touchscreen AL1096PS/PE...............A-7Figure A.14 Dimensions of AL9624/3.5 power supply..........................................................A-8Figure A.15 Dimensions of AL9624/8 power supply.............................................................A-8<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual30/05/99<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 1- 130/05/991. SYSTEM COMPONENTSAutolog 16AN is suitable to control of individual machine units or small group of machines.Autolog Display/keypad units (AL1093D, AL1094, AL1094R/F, AL1095A/B and AL1096-series) are available to provide a user interface.<strong>AL16AN</strong>- 8 digital inputs- 8 digital outputs- 6 analog inputs- 1 analog output- RS-232C/RS485 interface (parallel on one serial port)- Contains user program- Adapts external signals to match the <strong>Programmable</strong><strong>Logic</strong> <strong>Controller</strong>- Amplifies the output signals of the <strong>Programmable</strong><strong>Logic</strong> <strong>Controller</strong> to meet external circuit requirementsAL32EXAL32EXAJ0J10J1J2J3J12321J9J8J4J7J5J11J6- 16 digital inputs - 8 individually adjustable analog inputs- 16 digital outputs (Pt100, KTY10, current, voltage)- Adapts external signals to match - 4 analog outputs (voltage 0 - 5 V or 0 - 10 V)the <strong>Programmable</strong> <strong>Logic</strong> <strong>Controller</strong>- Amplifies the output signals of the<strong>Programmable</strong> <strong>Logic</strong> <strong>Controller</strong>to meet external circuit requirements<strong>FF</strong>-<strong>Automation</strong> Oy


Page 1- 230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualAL1094AL1094R-4 digit LCD display- 8 keys (0 ... 7)- 4 LED indicator lights- Connection to AutoLog’s I 2 C bus-2x16 chracter LCD display with backlight- 4 keys (0 ... 3)- 2 LED indicator lights- Connection to AutoLog’s I 2 C busAL1094F- 2x20 character alphanumeric display- clock/calendar- 8 keys- 4 indicating leds, buzzer and one 24VDC300 mA output for external indicating ligth- AL1904AF can display text (using the PRT instruction)- Unit can be fitted with client designed front plate.- Output O 4 = buzzer, output O 5 = control output for external indicating ligth .- Connection to Autolog’s I 2 C busAL1093D- 2x 16 character LCD display with backlight- Clock and calendar with battery backup- 16 keys (0 ... F)- Connection to AutoLog’s I 2 C bus<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 1- 330/05/99AL1093F- 2x 16 character LCD display with backlight- Clock and calendar with battery backup- 16 keys (0 ... F)- Connection to AutoLog’s I 2 C busAL1095AAL1095B- 8x 21 character LCD display/128x64 pixel graphic display with backlight- Clock and calendar with battery backup- 8 LED indicator lights- 16 keys (0 ... F)- Scandinavian/cyrillic character support(slectable by jumper)- Connection to AutoLog’s I 2 C busAL1096 seriesAL1096S/T models- 240x128 dot graphic LCD displaywith backlight- S model, 5 function keys- T model is touch screen- connection to PLC through serial portAL1096PE/PS models- 320x240 dot graphic LCD displaywith backlight- Touch screen, max. 40x30 switches- connection to PLC through serial port<strong>FF</strong>-<strong>Automation</strong> Oy


Page 2- 130/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual2. SPECIFICATIONS2.1 Basic Board <strong>AL16AN</strong><strong>Instruction</strong>s<strong>Logic</strong>, arithmetic, compare, timer, counter, step drive, and reportinginstructionsNumber of instructions About 260Program capacity4096 logic instructionsProgramming<strong>Instruction</strong> list; relay diagram also possible when using PCProgramming device Terminal or microcomputer with RS232C interfaceCycle time3 ms + 20 ms per instruction (avg). In addition, a program loop to beAuxiliary memoryexecuted every 5 ms can be programmed.256 x 1 bit; 64 of these with differentiation256 x 1 bit (BM)256 x 1 bit common memory (GM)224 x 1 bit internally accessible outputs256 x 8 bit register memory255 x 8 bit internally accessible output256 x 16 bit word memory direct addressable,indirect 2048 pcs.256 x 16 bit word output direct addressable, indirect 1024 pcs.Timers4 timers 0.01 s to 2.55 s, set by program4 timers 0.1 s to 25.5 s, set by program8 timers 1 s to 255 s, set by program64 timers 0.1 s to 25.5 s, set by programCounters16 counters, 0 to 255, set by programSequence registers 32 sequence registers, steps 0 to 255Shift register4 pcs, places 0 - 255 8 bit registersFIFO register8 pcs, 256 places 8 bit registers<strong>Controller</strong>s8 PID controllers with programmable parametersSerial interface1 asynchronous communication at 300/1200/2400/4800/9600/28800 Bde.g. terminal/modem/MODBUS, or for programming (with terminal or PC)Memory retentionThe program is held in memory (EEPROM or EPROM)The single-bit auxiliary memories M 0-63, outputs O 0-39, timers,counters, and sequence registers (0 - 3) are reset after a power failure.Register memories, auxiliary memories M 64-192, outputs O 40-192, register outputs 27-255, word variables, FIFOs, and shift registersretain their contents if desired.Digital inputsDigital outputsAnalog inputsAnalog outputAnalog signal precisionTiming controlBattery backupSuuply voltageDegree of protectionOperating temperatureStorage temperatureNOTE! Register memories0 - 255 and word memories0 - 127 are located in samememory area8 inputs at 24 V DC, 8 mA max. Inputs are not isolated8 outputs at 24 to 60 V DC, 0.5 A max. Outputs are not isolatedTwo, individually adaptable for Pt100/KTY10 temperature signals,current signals 4 - 20 mA/0 - 20 mA, or voltage signals 0 - 5 V/0 - 10 V,and four individually adaptable current signals 4 - 20 mA/0 - 20 mA,or voltage signals 0 - 5 V/0 - 10One, 0 - 5 V or 0 - 10 V (obtainable by jumper connections fromanalog input 0; the maximum number of available temperature inputs willthen be 1, and a current or voltage signal can be applied to input 0)0.1 % (10 bit resolution)Connection for clock/calendar/display/keypad unit2 years (full battery in storage condition), app. 10 years in normal use.20 to 32 VDC, 0.5A max., or 18 to 21 VAC, 0.5A max.IP 20 (unprotected)+ 5 to +45°C-20 to +50°C (non condensing)<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 3- 230/05/993.2 Expansion boards, AL32EX, AL32EXA, AL32EXOAL32EXJ1 Ribbon cable connector to basic boardJ2, J3 Connectors for digital outputsJ4, J5 Connectors for digital inputsJ6 Power input connectorLD1 - 16 Indicator lights for digital outputsLD17 - 32 Indicator lights for digital inputsAL32EXAJ0 Connector for analog outputs 0 and 1J1 Connector for analog outputs 2 and 3J2 - 9 Connector for analog inputs 0 - 7(J2 analog input 0, J3 analog input 1 etc.)J10 Power input connectorJ11 Ribbon cable connector to basic boardJ12 Analog output selector (0 - 5 V/0 - 10 V)LD1 + 24VDC Indicator lightLD2 + 5VDC Indicator lightM0 - M7 Adapter modules for analog inputs(M0 analog input 0, M1 analog input 1, etc)P201 - 217 Adjustment potentiometersAnalogue input Offset Gain01234567201 207202 208203 209204 210205 211206 212214 215216 217<strong>FF</strong>-<strong>Automation</strong> Oy


Page 3- 330/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualAL32EXOJ1 Ribbon cable connector to basic boardJ2, J3 Connectors for digital outputsJ4, J5 Connectors for digital inputsJ6 Power input connectorLD1 - 16 Indicator lights for digital outputsLD17 - 32 Indicator lights for digital inputs<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 4 - 130/05/994. SWITCHES4.1 Basic board <strong>AL16AN</strong>DIP switch SW1B1F1J1J400RS485 moduleLD25J3J16LD32J605J603BATBATSW1IC4J12SW1J8IC4J101IC2IC3IC1J9LD17J5LD24J206J606J607J600J601DIP ON O<strong>FF</strong>1 EEPROM not write protected EEPROM write protected2 Serial line:(Mode selected by R M 215 )- for controller printouts- Modbus- Used for programmingSerial line:Used for programmingDIP 300 bd 1200 bd 9600 bd Rate determined by R M22934O<strong>FF</strong>O<strong>FF</strong>ONO<strong>FF</strong>O<strong>FF</strong>ONONONNOTE! System programreads DIP switch settingsand values of registermemories 229 and 215after every program cycle.This means that settingssuch as line communicationparameters can bechanged without switchingpower off.DIP ON O<strong>FF</strong>5 Data memory cleared whencontroller is switched on6 Program capacity for 4096logic instructions (additional option)Data memory retainedduring poer failureProgram capacity for 2048logic instructionsPin strip J11B1J1J400RS485 moduleLD25J3J16LD32J605J603BATO<strong>FF</strong> ONBATSW1O<strong>FF</strong> ONBATIC4IC2IC3F1A: B.A. Battery backupB. No battery backupJ12J8J101J9IC1LD17J5LD24J206J606J607J600J601<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 5 - 130/05/995. INDICATOR LIGHTS5.1 Basic board <strong>AL16AN</strong>J12J8IC1An amber LED indicator light indicatesthe functional state of thecontroller as follows:J101J9LIGHT PROGRAM STATE CAUSED BY ACTIONSteady light or dark, i.e.duty cycle 100 % or 5%Program halted.Outputs retain their statesProgram halted withprogramming deviceProgram can be startedwith START (!) characterSlow flashing (0.5Hz),duty cycle 50 %Program running<strong>Controller</strong> is operatingnormallyCombined slow andfast flashing rateProgram runningUnsteady supply power.Flashing rate will return tonormal 4 minutes afterthe disturbance.Check quality of supplypowerFast flash,duty cycle 90 %Program halted.Outputs cleared to zeroLow supply voltage, hasfallen below 17 V and notrisen again over 20 VCheck quality of supplypowerFast flash (5Hz),duty cycle 50 %Program halted.Outputs cleared to zeroProgram errorCorrect the program andstart program executionVery fast flash,duty cycle 20 %Program halted.Outputs cleared to zeroHardware fault, or STOPinstruction has been removed,or END instructionhas been relocated duringprogram executionSwitch controller poweroff and back on, correctthe program and startexecution<strong>FF</strong>-<strong>Automation</strong> Oy


Page 5 - 230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualEvery digital input and output line has an individual indicatior light showing the state ofthe line (lit = 1, dark = 0). The indicator lights are located adjacent to the approriate inputor output terminal strip (amber = input, red = output, as shown in the figure below.5.2 Expansion boards AL32EX and AL32EXAAL32EX: The digital inputs and outputs have indicator lights arranged in the same wayas on the basic board.AL32EXA:Indicator lights for supplyvoltages ( +5 V adjacentto ribbon cable connector,+24 V adjacent to terminalstrips)5.3 Expansion board AL32EXO<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 6 - 130/05/996. INSTALLATION AND CONNECTIONS6.1 Environmental requirementsThe inputs and outputs of the <strong>AL16AN</strong> are not isolated. The serial connectors RS232and parallel with is not isolated from PLC’s internal voltages. The RS485 serial communicationis isolated by aditional isolation module from PLC’s internal voltages. Toensure proper function of AL20AN must the circumstances of installing place be carefullyconsidered.Operating temperature + 5 to + 45°CMoisture, corrosive gases, liquids and conductive dust may not exist in thespace, where PLC boards are installed.The PLC boards don't resist heavy vibration very well.The distance from electromagnetic fields generating devices, such as electricmotors, switch gears, thyristors, welding equipment switched power suppliesand power converters/inverters has to be wide enough.PLC boards are quite immune against light sources, but the possible erasingwindow on the system program EPROM has to be well covered.If some item above or any other feature in surrounding may cause errors to PLCfunction it is advisable to install the PLC in the steel plate enclosure. It is also advisableto install possible auxiliary input/output relays, fuses and power units in theirown enclosure near the PLC. All the contactors connected to PLC have to beequipped with RC protection devices and the 24 VDC control relays with extinguishdiodes.6.2 Field wiring6.2.1 Earthing/groundingThe metal parts of the PLC enclosure must be connected to the plants logic ground.6.2.2 Power supply connectionsNormally no functional grounding is necessary when 24 volt floating voltage system isused with the PLC’s power supply connection. It is important that the 24 volt wiring iscarefully kept isolated from ground level and 220 volt supply voltages.The CPU board, <strong>AL16AN</strong> receives the +24 V DC supply voltage from an external, isolatedpower supply unit (such as AL 9624/3.5 or AL 9624/8). The controller convertsthis to the +5 V and +15 V supplies it requires.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 6 - 230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualExpansion boards AL 32EX, AL 32EXA receive their +5 V supply voltage from thebasic board through the ribbon cable. The expansion boards further require a +15 Vsupply, which is generated on the expansion board from +24 V DC wired from the basicboard to the terminal strip of the expansion board.The expansion board AL32EXOreceives + 5 V supply voltage from the basic board, the 24 VDC voltage for loads mustbe wired from external power supply unit.The +24 V DC supply voltage to the relay output boards is taken from an externalpower supply unit. The RE 16 board further requires a connection to the VDIODEterminal of the basic board.6.2.3 Digital inputsThe digital inputs are unisolated in AL16 PLC series. Only potential free contacts orNPN type inductive/capacitive sensors may be connected to PLC. The supply voltagefor the NPN sensors is normally taken from PLC's terminals.It is recommended to usetwisted pair shielded cables in input wiring. The cabling should be installed separatefrom the 220/380 VAC power cabling. The cable shields may be connected to logicground only at one point, normally at the end on the PLC encloseure.If there is heavyelectromagnetic disturbances, the PLC's inputs and outputs can be isolated from fieldequipments with relays or with optoelectronics modules. Look at chapter 6.3.26.2.4 Digital outputsThe digital outputs are unisolated in AL16 PLC series. Only lowpowered 24 VDCcontrol relays, LED indicating lights or 24 volt indicating lights may be connected toPLC. The supply voltage for loads is taken from PLC's supply pwer unit.It is recommendedto use twisted pair shielded cables in output wiring. The cabling should beinstalled separate from the 220/380 VAC power cabling. The cable shields may beconnected to logic ground only at one point, normally at the end on the PLCencloseure.If there is heavy electromagnetic disturbances, the PLC's inputs andoutputs can be isolated from field equipments with relays or with optoelectronicsmodules. Look at chapter 6.3.26.2.5 Analog inputs/outputsThe analog inputs and outputs are unisolated in AL32 PLC series. If the usedtransmitters are active, they have their own separate supply connection and if theoutputs from the transmitters are unisolated from their supply power, it is recommendedto use galvanic isolators in connections. The galvanic isolators may be eitherpassive or active. The input inpedance of analog input of AL32 series is 250 Ω. Therecommended cable type in analog connections is twisted pair shielded cable.Thecable shields may be connected to logic ground only at one point, normally at the endon the PLC encloseure.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 6 - 430/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual6.3.3 Optoelectronic / relay isolation of inputs and outputsSince the inputs and outputs are not isolated on <strong>AL16AN</strong> PLC board, it is advisableto provide external isolation in an environment prone to disturbances. A suitable solutionis the use of PHOENIX digital optical input interface modules and relay outputmodules. The Modules protect the PLC against the static discharges and cut the circulatingfault currents. The modules are mechanically fully protected DIN rail units.Features of the I/O modules: very long life optoelectronic isolation rated at 2500 V low power consumption vibration proofPHOENIX’s digital I/O modulestype I/O voltage max. current logic voltageDEK-OE-24DCDEK-OE-230ACDEK-REL-24/1/SEN24 ± 20% VDC230 ± 10% VAC12 - 250 VAC10 - 125 VDC3 A24 V24 V24 V24 VOE modules are inputmodules and REL modules are relay output modules.INPUT MODULE DEK-OE-230ACOUTPUT MODULE DEK-REL-24/1/SENA1A1+ 13AA2A20 14PHOENIX modules: DEK-OE input module and DEK-REL type output module<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 6 - 530/05/99The figure below shows how Phoenix DEK-... -interface modules may be connectedto <strong>AL16AN</strong> CPU board’s input/output points. Same input isolation connection can beused also with input points on expansion boards.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 6 - 630/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual6.4 Analog inputsThe AL 16AN board provides 2 individually adaptable analog inputs that can be usedfor the measurement of temperature, current, or voltage signals*) and 4 individuallyadaptable analog inputs that can be used for the measurement of current, or voltagesignals. The AL 32EXA board provides 8 additional individually adaptable analog inputs.Each variable type or range requires its own input adapter module (refer toChapter 14, LIST OF PRODUCTS).6.4.1 Connection examplesBecause of the low signal levels to be measured, shielded twisted-pair cables shouldbe used. The shield should be grounded at one end only in order to avoid degradationof accuracy by external disturbances.Temperature measurement with a Pt100 sensor.The current (I+, I-) flows through the Pt100 sensor.The measurement is made by inputs sign+and sign-. (100 Ω 0°C)Temperature measurement with a KTY10, 11 or15 thermistor.(2000 Ω 25°C).Measuring range -50 ... +150°C.Voltage measurementTwo ranges are available:0 ... +5 V or 0 ... +10 V.Current measurementTwo ranges are available:0 ... 20 mA or 4 ... 20 mA.*) Exeption: Analog input 0. Jumpers J206, 606 and 607 can beused to connect it as an analog input or output. If analog output 0 isin use, the remaining pins (connector J600) can only be used as acurrent or voltage input.<strong>FF</strong>-<strong>Automation</strong> Oy


6.4.2 Adjustment of the analog inputs<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 6 - 730/05/99Occasionally you might need to replace an input module of an <strong>AL16AN</strong> with a modulefor another measurement range. In order to carry out the necessary adjustments youneed to proceed in the way described in chapter 16.6.4.3 Analog inputs of AL 32EXA boardIn order to read the analog inputs of the expansion board, you must load into thePLC's register memory R M 228 number 1. If you connect a EX32 board, the value is0 and in case of AL32EXA board the value is 1. The PLC's system program uppdatesall inputs every program cycle.6.4.4 Reading analog inputs by means of word variablesThe values of analog inputs on basic board are obtained in the form of word inputs(W I) as shown below (underlined bits).High byte Low byte0000xxxx xxxxxx00The analog input has a resolution of 10 bits. Its value is seen in steps of 4, as thenumbers 0, 4, 8, ..., 4092. If the value is desired in steps of 1 (0, 1, 2, ..., 1023), programas follows:STR W I 001DIV W C 004EQ W M 010The table below shows the word input and register input variables corresponding tothe analog inputs.Word inputRegister inputAnalog input 0 W I 0 R I 0, R I 100Analog input 1 W I 1 R I 1, R I 101Analog input 2 W I 2 R I 2, R I 102Analog input 3 W I 3 R I 3, R I 103Analog input 4 W I 4 R I 4, R I 104Analog input 5 W I 5 R I 5, R I 105The values of the analog inputs(underlined bits) are obtained at theregister inputs as follows:Example: R I 0 R I 100xxxxxxxx 0000xx00MSB LSB<strong>FF</strong>-<strong>Automation</strong> Oy


Page 6 - 830/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual6.5 Analog outputsThe <strong>AL16AN</strong> board has one and the AL32EXA board has four analog outputs. Theanalog outputs are voltage outputs (0 - 5 V or 0 - 10 V).6.5.1 Connection example<strong>AL16AN</strong> or AL32EXA<strong>AL16AN</strong>: Analog input 0 can be changned into ananalog output by putting jumpers on connectorsJ206, J606, and J607 (refer to Chapter 4,SWITCHES).NOTE: Pins 72 and 73 can then still be used as acurrent or voltage input but not as a temperatureinput.6.5.2 Analog outputs of AL 32EXA boardIn order to write into the analog outputs of the expansion board, you must load into thePLC's register memory RM344o number 1. If you connect a EX32 board, the value is0 and in case of AL32EXA board the value is 1. The PLC's system program uppdatesall outputs every program cycle.6.5.3 Special boards of <strong>AL16AN</strong>You can connect following special boards to <strong>AL16AN</strong>- AL32EXO32 32 unisolated transistor outputs- AL32EXIO16 16 unisolated inputs and 16 unisolated outputs- AL32PRD32 power supply unit for PLC and 32 relay outputsDelivery time and technical data by request.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 6 - 930/05/996.6 Serial communicationThe <strong>AL16AN</strong> CPU board has one RS232 serial 9 pin connector and parallel with it optionalisolated RS485 connector. The function of serial communication is defined byDIP switch (SW1) and register memories R M 215 and R M 229.6.6.1 Connector signalsPin Signal Pin Signal1 +5V (form PLC)2 RXD (data to PLC)3 TXD (data from PLC)4 DTR (approx. 12V from PLC)5 GND6 N/C7 RTS8 CTS9 N/C6.6.2 Interconnection cables<strong>FF</strong>-<strong>Automation</strong> Oy


Page 6 - 1030/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual6.6.3 <strong>AL16AN</strong> and CNV-1 Signal level converter boardThe CNV-1 provides isolation of the serial communication signal and conversion ofthe voltage level of the signal. The signal level can be +5 V, RS-232C or RS-422/485. Isolation is neccessary when the devices communicating through the lineare fed from power sources at differing potentials. The output of the RS-422/485inter-face is in a high-impedance state when not transmiting, and several PLC’s canthus be connected to the same bus. The communication cable to the CNV-1 boardcomes to connect from 9 pin RS232C connector of the <strong>AL16AN</strong>.The CNV-1 signal level converter board is described in more detail in a separateinstruction: CNV-1.The figure below shows an example of the use of the CNV-1: the connection of<strong>AL16AN</strong> controller via an RS-232C interface to RS422 board.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 6 - 1130/05/996.7 Terminal strip numbering and connection diagrams6.7.1 Connecting supply power to <strong>AL16AN</strong> CPU board and expansion board.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 6 - 1230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual6.7.2 Terminal strip numbering of <strong>AL16AN</strong> CPU boardJ101J9J8J12SW1IC4IC2BATF1B1654321+ 24 VDC inputGNDGND+ 24 VDC outputGNDVDIODEIC1IC3RS485 module10987GNDGNDD-D+Analog input/output12I0I1I2I3I4I5I6I7GNDI+0 SIGN+SIGN -Analog inputsI -SIGN+SIGN-I -SIGN+SIGN-I -313233343536373839J607LD17LD2471727374J206J606J600161162163164165166J601Pxx AnalogtrimmerpotentiometersJ603LD25LD32J605J1610210110099176175174173172171191817161514131211O0O1O2O3O4O5O6O7GNDAnalogI-SIGN-SIGN+I+I-SIGN-SIGN+I-SIGN-SIGN+543inputsMeasuring range modulesfor analog inputsP201 - P212 Adjustment potentiometers for analogue inputsAnalogue input Offset Gain012345P213 Analogue output adjustment201 207202 208203 209204 210205 211206 212<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 6 - 1330/05/996.7.3 Terminal strip numbering of AL32EX boardI 024 131129O 024I 025 132LD 25LD 1128O 025I 026 133LD 26LD 2 127O 026I 027 134LD 27LD 3 126O 027I 028 135LD 28LD 4 125O 028I 029 136LD 29LD 5 124O 029I 030 137LD 30LD 6 123O 030I 031 138122O 031LD 31LD 7GND (24-31)139121GND (24-31)LD 32LD 8LD 17LD 9I 032 141119O 032I 033 142LD 18LD 10118O 033I 034 143 LD 19LD 11 117O 034I 035 144 LD 20LD 12 116O 035I 036 145 LD 21LD 13 115O 036I 037 146 LD 22LD 14 114O 037I 038 147LD 23LD 15 113O 038I 039 148112LD 24O 039GND (32-39) 149LD 16111GND (32-39)153152151GND+24 VVDIODE6.7.4 Terminal strip numbering of AL32EXA boardOutput 0 + -Output 1 + -Output 2 + -Output 3 + -Input 0I +SIGN +SIGN -I -Input1I +SIGN +SIGN -I -Input 2I +SIGN +SIGN -I -I+Input 3SIGN +SIGN -I -301302303304305306307308311312313314321322323324331332333334341342343344J0J1J2J3J4J5M0M1M2M3P207P201P208P202P209P203P210P204J12321J11P213P217P216P215P214P212P206P211P205M7M6M5M4J10J9J8J7J6394393392391384383382381374373372371364363362361354353352351N/CN/CGND+24VinI -SIGN -SIGN +I +I -SIGN -SIGN +I +I -SIGN -SIGN +I +I -SIGN -SIGN +I +Input 7Input 6Input 5Input 4Analog input offset trimmers: P201-P206, P214, P216Analog input gain trimmers: 207-P212, P215, P217Analog output gain trimmers: P213Analog input selection modules: M0 -M7Analog outputs, switch J121- 2: 0 . . 10V2 - 3: 0 . . 5V<strong>FF</strong>-<strong>Automation</strong> Oy


Page 6 - 1430/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual6.7.5 Terminal strip numbering of AL32EXO boardJ10LD37LD36LD35LD34LD33LD32LD31LD30LD27LD26LD25LD24LD23LD22LD21LD20J100J 101outputaddresses0 0 16 ... 471 0 48 ... 790 1 80 ... 111LD40LD41LD42LD43LD44LD45LD46LD47LD50LD51LD52LD53LD54LD55LD56LD57<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 7 - 130/05/997. RESERVED MEMORY LOCATIONS7.1 Memories reporting on or controlling the operation of the PLCR M 128 to 191Operating register memories of contollers / AL1095R M 206 Counter for accepted Modbus messagesR M 207 Send delay for Modbus response, default 50 ms = 50R M 208 The Version Code of connected Display/Keypad UnitR M 209 Character last received from keypadR M 210 Serial line data length + parity in terminal modeR M 211 Test dataR M 212 Selection of language versionR M 213R M 214R M 215 Serial line mode: programming/terminal/printout/MODBUSR M 224 Three-position controllers: ReservedR M 225 Three-position controllers: Open bitsR M 226 Three-position controllers: Close bitsR M 227 Three-position controllers: Pulse intervalR M 228 Identification number of connected expansion boardR M 229 Serial line Baud rate 300/1200/2400/4800/9600/28800R M 230 Word variable: Multiplication/Division (MSB)R M 231 Word variable: Multiplication/Division (LSB)R M 232R M 233R M 234R M 235R M 236R M 237R M 238R M 239R M 240R M 241R M 242R M 243R M 244R M 245R M 246R M 247R M 248R M 249R M 250R M 251R M 252R M 253R M 254R M 255Character last received from user terminalPrevious character (last - 1) from user terminalPrevious character (last - 2) from user terminalPrevious character (last - 3) from user terminalPrevious character (last - 4) from user terminalPrevious character (last - 5) from user terminalPrevious character (last - 6) from user terminalPrevious character (last - 7) from user terminalSelection of display dataAccumulated POWFAIL interruptsClock settingAddress of PLC in computer communicationMultiplication high byte, Remainder (8 bit)Left half of digit displayRight half of digit displayClock/calendar: monthClock/calendar: day of monthClock/calendar: weekdayClock/calendar: hoursClock/calendar: minutesClock/calendar: secondsClock/calendar: six-minute units from midnightClock/calendar: year<strong>FF</strong>-<strong>Automation</strong> Oy


Page 7 - 230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual7.2. Memory locations to be initializedR M 210 Terminal mode: data configuration0 8 bits, no parity1 7 bits, parity EVEN2 7 bits, parity ODD3 8 bits, parity EVEN4 8 bits, parity ODDR M 212 Selection of language version0 English1 FinnishR M 215 Serial line mode0 Programming device1,2 Terminal/printout4 MODBUS computer interfaceR M 228 Identification number of connected expansion board0 AL32EX1 AL32EXA2 AL32EXOR M 229 Serial line Baud rate0 300 Bd1 1200 Bd2 2400 Bd3 4800 Bd4 9600 Bd6 28800 Bd<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 7 - 330/05/99R M 240 Display/keypad unit function mode0 Mode 0. Normal display mode2 Mode 1. Displays the contents of RM 245 and RM 246.4 Mode 2. RM 245 and RM 246 controls 7 segment display.8 Mode 3. The left display = the content of RM 245 (charactersA ... F in hexadecimal format), the right display =content of RM 246 (numbers 0 ... 99)16 The whole display area is reserved for character output ( the unitdoes not show the time)32 The change of content of variables is disabled (the B key)128 The display is blocked (all output into the display is disabled,the last output remains)O 211 Function of the serial line (RS 323/RS 485, connector J101)0 The state of CTS handshake is shown in output O 209 andRTS handshake can be written into output O 208.1 PLC's system program controls handshake signals.7.3 Memory locations reserved for controllersRegister memory locations R M 128 - 191 are reserved for controller use, and locationsR M 224- 227 for three-point controller use. Refer to Chapter 9. CON-TROLLERS.With AL1095 display/keypad unit register memories 128 - 190 is used to displaygraphical objects ( 8 graphs). This means that if you use graph 0 you can’t use controller0 and so on.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 7 - 430/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 8-130/05/998. DISPLAY/KEYPAD UNITSThere are several display/keypad units available for <strong>AL16AN</strong>, all of which can be connectedto the <strong>AL16AN</strong> module via the I 2 C interface.8.1 AL1096 Display/Keypad UnitsAL 1096PS/PEAL1096S/T- Front panel mounted enclosure- touch screen, max. 40 x 30 elements- back lighted graphic LCD display, resolution 320 x 240- Front panel mounted enclosure- 5 function keys ( S-model)- touch screen, 10 x 8 touch keys (T-model)- back lighted graphic LCD display, resolution 240 x 1288.2 AL1095A/B Display/Keypad UnitDIS1L1 / Out 232L2 / Out 233L3 / Out 234L4 / Out 235L5 / Out 236L6 / Out 237L7 / Out 238L8 / Out 2390 1 2 34 5 6 78 9 A BC D E FDIS10123AL1095AAL1095B- Front panel mounted enclosure- 8x21 character LCD display/128x64 pixel graphic displaywith backlight- 8 LED indicator lights- 16 keys ( 0 ... F) in AL1095A and4 keys (0 ... F) in AL1095B- Scandinavian/cyrillic character support(selectable by jumper)- Connection to AutoLog’s I 2 C bus<strong>FF</strong>-<strong>Automation</strong> Oy


Page 8-230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual8.3 AL1093C/D/F Display/Keypad UnitsThere are three versions of the AL1093 unit. These are the AL1093C, AL1093D and theAL1093F. All AL1093 units have 2x16 character alphanumeric displays, 16-key hexadecimalkeypads and 6 LED indicators. In addition to displaying the values of variablesand time/date information, the AL1093 units can also display text (using the PRT instruction).The clock and calendar functions are battery backed-up.Model AL1093C and D is panel mounting version, and it can be fitted with customisedkeypad face plate.Model AL1093F is enclosured, front panel mounted type and it can'tbe fitted with customised keypad face plate.AL1093C / DAL1093FDIS10 1 2 3 48 9 A B C5 6 7D E F8.4 AL1094/R/AF Display/Keypad UnitsThe AL1094 display/keypad unit withoutclock and calendar functions. It has a4-digit, 7-segment display,four LED indicatorsand an 8-key keypad. Customisedkeypad face plates may be fitted to thisunit.04152637The AL1094R is a display/keypad unit withoutclock and calendar functions. It has 2 x 16 characteralphanumeric display, two LED indicatorsand a 4-key keypad. The AL1094R can displaytext (using the PRT instruction). Customised faceplates may be fitted to this unit.0 12 3<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 8-330/05/99The AL1094AF display/keypad unit has 2x20 character alphanumeric display, clock/calendar,8 keys, 4 indicating leds, buzzer and one 24VDC 300 mA output for external indicatingligth. The AL1904AF can display text (using the PRT instruction). The unit can befitted with client designed front plate. Output O 4 = buzzer, output O 5 = control output forexternal indicating ligth .AL1094AF041 2 35 6 743218.5 Reading The KeypadR M 209:Contains the ASCII code of the character last received fromthe keypad. The keypad is connected to I 2 C.R M 240:Content02481632128FunctionMode "0" (normal mode)Mode "1"Mode "2"Mode "3"Mode "4" the hole display area is reserved for character outputMode "5" like mode "0", but function of b-key is disabledMode "6" the display is blocked (all output into display is disabled)Example:A character is sent to the display from the keypad in serial line.STR R M 209 ; Read character from serial lineLES R C 000 ; If value 0EQ R RM 209 ; Reset the bufferPRT R T ; print the characterSTOPBit outputs 240 ... 255 are set,when the corresponding keyhas been pressed(regardless of the operatingmode).240 241 242 243244 245 246 247248 249 250 251252 253 254 2558.6 Control of LED indicatorsThe LED indicators are contolled by PLC'soutputs O 232 ...O 237LED 1 O 232LED 4 O 235LED 2 O 233LED 5 O 236LED 3 O 234LED 6 O 237L0L1L2L3L4L5<strong>FF</strong>-<strong>Automation</strong> Oy


Page 8-430/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual8.7 Display Control charactersMnemonic Hex FunctionBS (Back space) 08 Moves the cursor one character to the left and clears that position.If the cursor is at the beginning of a line, it moves to the end of theprevious line.HT (Tabulator) 09 Moves the cursor one character to the right without clearing thatposition. If the cursor is at the end of a line, it goes to the beginningof the next line.LF (Line Feed) 0A Moves the cursor to the next line.<strong>FF</strong> (Form Feed) 0C Clears the display and moves the cursor to the beginning of thefirst line.CR (Return/Enter) 0D Moves the cursor to the beginning of the present line.NAK 15 Moves the cursor one character to the left without clearing that position.If the cursor is at the beginning of a line, it goes to the end ofthe previous line,"Y",,8.8 Display Modes1B 5901 08Moves the cursor to line 1, column 8.Line 1...4, column 1...40, maximum numbers along displays.All display/keypad units have several display modes. Some modes are not available forevery unit (e.g. those without clock and calendar functions and reduced keypads). Thedisplay modes are outlined below.8.8.1 Normal display mode - Mode '0' (R M 240 = 0)KeyFunction0-9 Numeric keysASet clock/calendarBEnter parameters into register variablesCDisplay register variablesDNext display/entryEDisplay address (in register variable display mode)FReturn to clock display'A' Set Clock/CalendarThe clock/calendar is set as follows:Key Display Continue'A' 1-xx year (two digits) D or F2-xx month (two digits, 01-12) D or F3-xx day (two digits, 01-31) D or F4-xx hour (two digits, 01-24) D or F5-xx minute (two digits, 01-59) D or F6-x day of week (one digit, 01-07) D or F(1 = mon, 2 = tue ,..., 7 = sun)<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 8-530/05/99'B' Enter Parameters into Register variableKey Display Continue'B' RM000 new address (octal) D or B or FWM000continue with 'B' browsing variables D or B or FRO000 address of variable with 'D'D or Fxxx enter parameters value D or FXX001 address 0001 or new address D or Fxxx enter parameters value D or Fand/or quitF'C' Display Register memories/outputs or word memoriesThe value of the register variables is updated continuously into the display.Key Display Continue'C' RM000 Enter address (octal) C or D or FWM000continue with 'C' browsing variables C or D or FRO000 address of variable with 'D'C or D or Fxxx parameter value (to update) D or Fyyy next parameter D or Fzzz 'E' to display address C or D or FXXwwwChange the address if desiredand continue with 'D''D' Next Display ModeIn the normal display mode (mode '0'), the display information may be changed by pressingthe 'D' key. This is performed as follows:Key Display ContinueD or F 15:30 hours:minutes D or F17.05 date.month D or F00:01 day of week (AL1093 models) D or <strong>FF</strong>F:<strong>FF</strong> R M 245 and R M 246 in hexD or F15:30 hours:minutest.... etc.8.8.2 Data Display Mode '1' (R M 240 = 2)This mode is available for all models. In this mode the contents of RM 245 and RM 246are sent to the display. In this mode it is not necessary use the 'D' key to change the displaymode (as with mode '0') each time on power-up.Example: I 000 connects the display control program and the contents of R M 245 and RM 246 are immediately displayed. I 001 disconnects the control program, and the displaywill again show the time.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 8-630/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualSTR R C 000 ; Normal display modeEQ R M 240 ; is selected for AL1093STR I 000 ;set the memory to mark the ON stateEQ SM 004STR I 001EQ RM 004 ;reset the memory (=O<strong>FF</strong>)STR M 004STR R C 002 ;code for mode '1'EQ R SM 240 ;to display mode control registerSTR NM 004STR R C 000 ;code for mode '0'EQ R SM 240 ;to display mode control registerSTOP8.8.3 7-Segment mode - mode '2' (R M 240 = 4)This mode is available only for the AL1094 with 7-segment display. In this mode RM 245controls the left hand side of the 7-segment display, so that seven of the eight bits controlsa segment each, and the eighth bit controls the minus sign as shown in the diagrambelow.xfgabR M 245: bit 7 6 5 4 3 2 1 0segment x g f e d c b aecdSegments are illuminated by writing the sum of the corresponding values into R M 245Segment Number Segment Numberabcd1248efgx163264128For example, to display segments e, cand d, the sum of corresponding numbers(16+8+4=28) should be written intoR M 245.STR R C 028EQ R M 245 ; Display segment e, c and d8.8.4 Text Display Mode ‘4’ (R M 240 = 16)This mode is available only for the AL1093 and AL1094R models with alphanumeric displays.The entire display will be reserved for text produced by the PRT instruction.8.8.5 Normal mode with key 'B' function disabled Mode ‘5’ (R M 240 = 32)This mode is available only for the AL1093 and AL1094R models with alphanumeric displays.The unit functions otherwise normally but the changes of content of variables aredisabled.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 8-730/05/998.8.6 Display Lock Mode ‘6’ (R M 240 = 128)This mode is available only for the AL1093 and AL1094R models with alphanumeric displays.Current display information will be retained and no changes will be allowed.8.9 Program Examples8.9.1 Printing Date InformationSTR I 001EQ M 000STR DP 000 ; printPRT R M 248 ; datePRT T .@ ; print a dotPRT R M 247 ; monthPRT T .19@ ; print dot + centuryPRT R M 255 ; print year ( 0 - 99)8.9.2 24 Hour Timer InformationSTR R M 253 ; read number of six minute periods from beginning of dayLES R C 174 ; every day starting from 17:30EQ M 000 ; (17.5 * 60/6 = 175)GRT R C 210 ; until 21:00AND M 000EQ O 001 ; output onSTOP8.9.3 Display Step Registers 0 and 1 (0 ... 99)STR R C 002 ; set register memories RM 245 and 246EQ R M 240 ; display mode '1' valueSTR R S 000 ; read step register 0 into accumulatorBCD; convert to BCD formEQ R M 245 ; send memory to displaySTR R S 001BCDEQ R M 246STOP8.9.4 Display Control CharactersSTR W I 001 ; read word input 001 into word accumulatorBDC W T ; convert to BCDEQ W M 000 ; save into word memorySTR P 001 ; print on 1 second periodPRT (,"Y",,) ; to line 1 column 4PRT R M 000 ; the value of W T 1, first high bytePRT R M 001 ; and then low byteSTOP<strong>FF</strong>-<strong>Automation</strong> Oy


Page 8-830/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual8.9.5 Setting the Time and Date Using Register variablesSTR R S 000 ; Step register 0 in useSTR I 000 ; Clock synchronising inputEQ M 065STR DP 065AND S 000STEP S 001 ; activate clock time settingSTR R S 000 ; step registers step to register accumulatorLES R C 000 ; program is executed only if currentIF T ; step is greater than 0STR R S 000LES R C 019 ; 2 seconds delay, made by STEP register 0STEP S 000STR R C 005EQ R SM 242 ; transfer time to real time clockSTR S 001 ; if in stepSTR R C 001EQ R SM 242 ; disable reading of real time clockSTR R C 001 ; check if reading of real time clockEQU R M 242 ; is disabledAND P 000 ; pulse, interval 0.1 secondSTEP T ; go to next stepSTR R C 96 ; set yearBCD R TEQ R M 255STR R C 3 ; set monthBCD R TEQ R M 247STR R C 10 ; set day of monthBCD R TEQ R M 248STR R C 9 ; set hour part of timeBCD R TEQ R M 250STR R C 25 ; set minute part of timeBCD R TEQ R M 251CONTSTOP<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 9-130/05/999. CONTROLLERS9.1 Register memories of controllersThe system software of the <strong>AL16AN</strong> <strong>Programmable</strong> <strong>Logic</strong> <strong>Controller</strong> includes eightDirect Digital <strong>Controller</strong>s (DDC) with PID characteristics. The controller parameters areheld in register memories.<strong>Controller</strong>No.12345678StatusActualvalueSetpointDtimeItimeGaintermOutputAux.128136144152160168176184129137145153161169177185130138146154162170178186131139147155163171179187132140148156164172180188133141149157165173181189134142150158166174182190135143151159167175183191Register memories R M 128, 136...184 indicate to the controller program if the controlleris in operation, in manual or automatic mode, or not in operation. This is determined bythe lowest two bits as follows:0 controller not in operation1 controller operating in automatic mode3 controller operating in manual modeFor example, in order to activate controller No. 2 in automatic mode, the number '1' iswritten into register memory R M 136. The contents of register memory R M 142 willfrom then on be generated in accordance with the control algorithm and parameters.Three-point control outputs will also be written into register memories R M 225 and 226.The controller program computes the control algorithm once and then leaves the controllerin manual mode (for example, in the case of controller No. 2, by writing '3' into RM 136). This is done in order to allow the user to determine the control interval. If thelogic program continually writes '1's into the status memory, the control interval will bethe shortest possible, or 0.8 seconds.If it is desired to control the controller output either from the terminal or with the logicprogram, the sequence in the logic program where '1' is written into the status memory isremoved. Return to automatic control will not cause a bump in the controller output, becausethe controller program continually monitors the output.If a controller is deactivated by writing '0' into register memory R M 136, the remainingregister memories for that controller, R M 137 - 143 became available for other purposes.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 9-230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual9.2 Control algorithmThe following control algorithm is used:DY = P * {e( t i ) - e( t i-1 ) + D * [ e( t i ) - 2e( t i-1 ) + e( t i-2 )] + e( ti )/ l }P = gain (0 - 1)I = integration time constantD = differentiation time constante = errorGain PThe numerical value 128 corresponds to a gain of 0.5.Figure 1 Figure 2Figure 1P = 100 P = 150I = 20 I = 20D = 2 D = 2Figure 2P = 100 P = 20I = 2 I = 2D = 2 D = 2Set pointOutputFigure 1 shows how increasingthe gain gives faster controlaction.Figure 2 shows how reducingthe gain stabilizes the oscillationcaused by a short integration time.The sum of the proportional, derivative and integral terms is multiplied by the gain P. Thegain thus weakens or strengthens the effects of these coefficients.Effect of integration time constant IFigure 1 Figure 2Figure 1P = 150 P = 150 P = 150I = 20 I = 12 I = 12D = 2 D = 2 D = 2Figure 2P = 100 P = 100 P = 100I = 120 I = 12 I = 2D = 2 D = 2 D = 2Set pointOutput<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 9-330/05/99The figures show the behaviour of the same process for two different values of gain P,and varying integration time I. If the gain is high, an overshoot will take place even at alonger integration time.If the integration time I is too short for the process in question, an oscillation of the typeshown in the right-hand figure will occur.Effect of differentiation time constant DThe effect of the differentiation time is critical, as illustrated in the figures below. Derivativecontrol is unsuitable for many types of systems, and it is often not at all necessary touse it.D = 0 D = 2 D = 5 D = 109.3 <strong>Controller</strong> typesSet pointOutputThe figure below shows how the resulting control output of the different basic controllertype varies with time after a step change.t t tP controller PI controller PID controller- The P controller has constant gain, and the result is often unsatisfactory, especially ifthe gain is low.- In PI control the apparent gain changes and corrects the error with time.- In PID control the variations of the error are exaggerated in order to obtain rapid errorcorrection. The step response becomes faster.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 9-430/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual9.4 <strong>Controller</strong> tuningIn a control system, suitable values must be found for the controller parameters P, I, andD. Suitable parameters for a control loop can be determined by purely mathematicalmethods or by means of a Bode diagram, but these methods are often laborious.Usually, controllers are tuned on the basis of experimental data from the control system.Two simple and effective methods are described below.- The step response method: The delay and rise time of the step responseof the process are determined, and thecontroller settings are determined on this basisT t U 0P controller: U P = = cT s Y 0PI controller:U P = 1.25 cT I = 3 T tPID controller: U P = 1.25 cT I = 3 T tT D = 0.42 T t- The oscillation method: The gain and oscillation cycle time at the point ofoscillation are determined, and the controller settingsare determined on this basis.P controller:PI controller:PID controller:K P = 0.5 K PcrK P = 0.455 K PcrT I = 0.85T crK P = 0.6 K PcrT I = 0.5T crT D = 0.12T crK P =1U P= gainT I = integration time constantT D = differentiation time constantK Pcr = critical gain, at which theprocess oscillatesT cr = cycle time of process oscillationThese methods yield reasonable starting points for the controller parameter values;these can then be refined as necessary during actual operation.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 9-530/05/99A special program is provided for controllers. This AR program runs on IBM PC compatiblecomputers. The program simulates analog and three-point controllers. The controlleroperation can be monitored with "recorders", and the resulting graphs can be stored ondisk. The program is accompanied by an operating manual, which also contains generalinformation on controllers.The PLC programming program (ALPro) can also be used for monitoring controller variables,collecting historical data, and for documentation.9.5 Three-point controllersAll controllers also provide three-point control outputs in the form of bit data in registermemories R M 225 and 226.<strong>Controller</strong>No.12345678Close outputR M 225 bit01234567Open outputR M 226 bit01234567The pulse interval, i.e. the dead time that the controller will wait for the process responseto settle, is programmed into register memory R M 227. The time range is from 0.1 s to25.5 s, corresponding to the numbers 1 - 255. Register memory R M 224 is reserved forinternal use by the controller program.A typical application, controlling the temperature of the circulating water in a central heatingsystem, is illustrated on the next page.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 9-630/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualThe mixing valve is controlled by pulses driving the actuator motor. The dead time in anapplication of this kind can be several seconds, as a change in the water temperature willnot be immediately felt by the sensor. It is pointless to give further drive pulses to thevalve before the settled effect of the previous action is known. The dead time can be accountedfor when tuning the controller by means of the step response method.Example Temperature control of circulating water by 3-point control.Desired value R I 002Actual value R I 001Mixing valveBoilerO 001 'open'O 002 'close'<strong>Logic</strong> program for water heating:STR R C 050 ; Integration time (50/255*1500 s)EQ R M 140STR R C 002 ; Differentiation timeEQ R M 139STR R C 110 ; Gain (110/255*2)EQ R M 141STR R I 002 ; Set point, e.g. from a potentiometerEQ R M 138STR R I 001 ; Actual value from temperature sensorEQ R M 137STR R C 001 ; Keep controller in automatic modeEQ R M 136STR R C 010 ; Pulse interval 1 sEQ R M 227STR R M 226 ; Read 'open' bitsBIT M 020 ; Convert to bits (controllers 1 - 8)STR M 021 ; Use bit for controller 2EQ O 001 ; to open valveSTR R M 225 ; Read 'close' bitsBIT M 020 ; Convert to bitsSTR M 021 ; Use bit for controller 2EQ O 001 ; to close valveSTOP<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 10 - 130/05/9910. DATA COMMUNICATIONSThe AL 16AN board has an RS-232C level connector for data communication (a 9-pinDIN type connector) and parallel with it a module isolated RS485 connector (J400). Thedata communication operating mode is determined by means of a DIP switch and registermemories. The used connector (J101/J400) is selected with jumper. The switchescan be set to override the effect of the register memories.Refer to Chapter 4. SWITCHES.BATJ12J8SW1J101IC4J9IC1RS485 moduleJ40010987Register memory Effect AlternativesR M 215 Operating mode 0 = programming device1,2 = terminal / printout4 = MODBUS computer bus (slave)2 or 4 = modemR M 229 Baud rate 0 = 300 Bd1 = 1200 Bd2 = 2400 Bd3 = 4800 Bd4 = 9600 Bd6 = 28800 BdThe following items should be checked, if serial communication is not working:Settings of DIP switchSetting of R M 229Setting of R M 215Setting of DIP switch 2( R M 229 setting is active only if swithces 3 and 4 are in 'on' position)( Be sure that the baud rate is correct)( Check that operating mode is correct)( DIP switch 2 selects if the serial connection is used for communicationor for programming)( Check that you connected the wires correctly)( If CNV-1 is used)Cable connectionsCNV-1 jumpersModem settings and connections, if one is usedSubstation's address ( In R M 243, address is decimal number)<strong>FF</strong>-<strong>Automation</strong> Oy


Page 10 - 230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual10.1 Terminal / PrintoutThe characters received from the serial line are available for reading in register memoriesR M 232 - 239 as follows:RegistermemoryR M 232R M 233...R M 239ContentLast character receivedLast but one.... etc.Last but 7thBy using PLC’s PRT instruction PLC’s application program can print characters into theserial port for printer or modem etc.10.2 MODBUS CommunicationThe MODBUS protocol allows the <strong>Programmable</strong> <strong>Logic</strong> <strong>Controller</strong> to be connected to theserial line of a computer or another PLC (e.g. AL 2000). In this serial connection, the <strong>AL16AN</strong> always operates as the slave.Before the bus is used, certain settings must be made at the PLC. Thus, if the addressof the PLC is to be 2 and the communication rate is to be 9600 Bd, the following settingsmust be made:DIP switch SW1:The serial line has the followingcharacteristics:DIP234PositionONO<strong>FF</strong>ONRegister memories:R M 215 = 4 ; ModeR M 243 = 2 ; Address- asynchronous- RS-232C (or with CNV-1, RS-422 with high-impedance output)- 1 start + 8 data + 2 (1) stop bits (Transmission 2, receive 1 stop bits)- rate 300/1200/2400/4800/9600/28800 Bd10.2.1 ProtocolModicon Modbus RTU, using the following functions:01 Read binary outputs or memories 05 Write binary output or memory02 Read binary inputs 06 Write register output or memory03 Read register outputs or memories 15 Write binary outputs or memoriesor read word outputs or memories 16 Write register outputs or memories04 Read register inputs 08 Loop back test return- slave addresses 1 - 255, and address 0, which the slave recocnizes for functions 5,6,15 and 16.( sending write commands to address 0 means broadcasting to all slaves)<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 10 - 330/05/99- Error CheckingAll MODBUS communication is subject to the following error checks on slave unit:- CRC16 Checksum - Command Validity Check- Address Validity Check - Message Length Check- Framing Check - Message Integrity CheckMessages may be transmitted at rates of 300,1200,4800,9600 or 28800 baud. The compositionof the message frames is shown below:SLAVEADDRESSFUNC-TIONMEMORYADDRESSDA- TA CRC16CHECKSUMSTART(1 bit)DATA( 8 BITS)STOP(2 bits)- a pause of about 50 milliseconds indicates end of message- response time to command:The message is processed between program cycles, and the time will thus vary; in additionthere is a delay of 0.1 - 2 s depending on the message length and baud rate.- Modbus parameters:R M 215 ; Serial line mode (4 = Modbus slave)R M 229 ; Baud rate (4 = 9600 Bd)R M 207 ; Send delay for Modbus response (milliseconds)default 50 milliseconds (= 50)R M 206 ; Counter for accepted Modbus messagesWhen the Modbus slave mode is defined, the system program set the data configurationto 8 bits, NONE parity, 2 stop bits on transmission and 1 stop bit on receive.The register variables (R M, R I, R O) are 8-bit variables, but they are transferred as 16-bit words with the high byte set to zero.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 10 - 430/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualBinary outputs and memories as well as register outputs and memories are distinguishedfrom each other by means of the Modbus data address, such that references tomemory variables are 1024 = 400H higher in the address field than output variables.Thus, for example: Variable Modbus addressR O 000 = 0000HR O 001 = 0001HR M 000 = 0400HR M 001 = 0401HW O 000 = 0800HW M 000 = 0C00HW M 1024 = 1C00HO 002 = 0002HM 005 = 0405H(This address conversion istransparent when AL 2000and <strong>AL16AN</strong> PLCs areused together.)In many control software systems, Modbus is configured on the basis of number of theregister type. The following table shows variable addresses:Read/Write OperationModbusreadModbuswriteAddressOffsetAddress inControl softwareAddress inFCS softw.Binary output (O)Binary memory (M)General memory (GM)Binary memory (BM)Binary input (I)Register input (R I)Register output (R O)Register memory (R M)Word output (W O)Word memory (W M)Word input (W I)Additional word memory (W M)Additional word output (W O)Step register010101010204030303030403030305, 1505, 1505, 1505, 1506, 1606, 1606, 1606, 1606, 1606, 1606, 16010242048307200010242048307210247168614481920000101025020490307300001000014000141025420494307331025471694614548193SDO 0001SDO 1025SDO 2049SDO 3073SDI 0001SAI 0001SAO 0001SAO 1025SAO 2049SAO 3073SAI 1025SAO 7169SAO 6145SAO 8193RS485 data communication, connector J9 (pins D-, D+ and GND), should be activated insame way as RS232C data communication, but binary output O 211 must be set on.When output O 211 is on the PLC system program can control the direction of data flow.When O 211 is on, RTS-, CTS-handshakes are also activated for RS232C-communications.When O 211 is off, the PLC's application program can read CTS state from output O 209and write the RTS state to output O 208. With this selectable feature the PLC's applicationprogram can control the behaviour of the output device, when the PLC's PRT instructionis used.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 10 - 530/05/9910.3 Modem - AL 16ANTwo-wire carrier modems are typically used on dialled lines in the public telephone network.Modems to the following CCITT recommendations are suitable for <strong>Programmable</strong><strong>Logic</strong> <strong>Controller</strong> applications:* V.22 (1200 bit/s)* V.22bis (2400/1200 bit/s)* V.32 (9600/4800 bit/s)If it is desired that the <strong>Programmable</strong> <strong>Logic</strong> <strong>Controller</strong> should be able independently tocall, for example, the central control room, the modem must be of the auto-dialling type,using the "AT" command set (alternatively V.25bis).PRT commands of the PLC are used for dialling a telephone number, for example:ATDP 123456. The modem gives the "CONNECT" response when a connection hasbeen successfully set up. The details of the "AT" command set can be found in the manualof the modem.Transmission errors are not uncommon in the telephone network at speeds higher than1200 bit/s. If PRT commands are used for data transmission, rather than an errorcorrectingprotocol such as Modbus, it is advisable to use an error-correcting modem, ortake other precautions against disturbances caused by transmission errors.Only type approved modems may be connected to the public telephone network!Controlsoftware<strong>AL16AN</strong>MODEMMODEMMasterDial-upconnectionSlave<strong>FF</strong>-<strong>Automation</strong> Oy


CPU2000SDIC 32DC AIC 8 DIC 32DCPage 10 - 630/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualBaseband modems are mostly used on short distance connections (telephone cablelength not exceeding 15 km). A 4-wire connection is generally used, allowing the networkto be branched.ControlsoftwarelMasterMODEMRS-232CRxTxPrivatenetworkRS-232CpermanentlineTx Rx Tx Rx Tx RxModemDS 28565 4 7 2 38 7 5 3 2serial connectornumberingModemModemDS 2856 DS 285655AL 2000AL 16ANAL 32Slave Slave SlaveAmodem can also be used on a point-to-point connection.basebandMost modems use a mains supply. It is advisable to check the power supply arrangementsof the modems with a view to battery back-up.AL2000<strong>AL16AN</strong>SRM-6SRM-6AutoLog 2000In or-der touse a modem with the <strong>Programmable</strong> <strong>Logic</strong> <strong>Controller</strong>, the data communication protocol(R M 215 = 2 or 4) and the transfer rate (R M 229) of the PLC must first be defined.The sample program on the next page shows how the PLC can contact the modem.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 10 - 730/05/99STR R C 000 ; Commands in EnglishEQ R M 212STR R C 002 ; Terminal communicationEQ R M 215STR R C 001 ; 1200 BdEQ R M 229STR S 000 ; Set up connectionAND I 000STEP S 001STR S 001 ; Dial numberPRT ("ATE0V0DP123456",)STEP S 002EQ R RM 232EQ R RM 233EQ R M 000NEXT S 002 030 ; Timeout control in case of errors.NEXT S 003 060STR S 004STEP S 001STR R M 232 ; Check if connectionEQU R C 013 ; has been madeAND S 002STEP S 010STR R M 233EQU R C 049AND S 010STEP S 011STR S 011 ; Data transferPRT ("AL16 LOOKING FOR A CHAT",)STEP S 055NEXT S 055 060STR S 056STEP S 012NEXT S 012 003 ; Hang upSTR S 013PRT ("+ + +")STEP S 014NEXT S 014 003STR S 015PRT ("ATH0",)STEP S 016EQ R RM 232EQ R RM 233NEXT S 016 005 ; PLC begins to waitSTR R M 232 ; for the next callEQU R C 013AND S 017STEP S 019AND S 019STEP S 000NEXT S 017 005 ; If call was not successfullySTR S 018 ; cleared, repeat hang-up procedureSTEP S 012STOP<strong>FF</strong>-<strong>Automation</strong> Oy


Page 10 - 830/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 11 - 130/05/9911. OPERATION OF THE PROGRAMMABLE LOGICCONTROLLER11.1 Switching on and special supply conditionsThe incoming supply power is smoothed and any spikes are suppressed. The events immediatelyafter switching on and in response to supply voltage variations are describedbelow.Voltage, UMax.+32 V+24 V+20 V(b+17 V+14 V(c1. 2. 3. 4.5.(aTime, s1. Bit outputs are at zero (cleared).2. The chopper circuit starts; the supply voltage is converted to a +5 V regulated supply forthe logic processor and the rest of the electronics. The POWFAIL signal from the voltagemonitor is active.3. The POWFAIL signal is deactivated. The logic processor does not start regular programexecution until POWFAIL has been inactive for at least 600 ms.4. The <strong>Programmable</strong> <strong>Logic</strong> <strong>Controller</strong> operates normally.If the supply voltage falls below +17 V for any reason, the <strong>Programmable</strong> <strong>Logic</strong> <strong>Controller</strong>responds as follows:5. The POWFAIL signal is activated. The logic processor suspends normal operation and awaitsthe development of the supply voltage, and the power fail counter (R M 241) is incremented by 1.a) The supply voltage falls below +14 V.The Reset signal stops the processor and protects the memory circuits (reset light is on).b) The supply voltage falls below +17 V and rises again to a value above +20 V withinless than 20 ms.The logic processor resumes program execution. Power fail counter (R M 241) isincremented by 1 to indicator a brief power interruption.The indicator light on thebasic board flashes at a combined slow (0.5 Hz) and fast (5 Hz) rate for 4 minutes.c) The supply voltage falls below +17 V but not below +14 V and rises again to a valueabove +20 V within a longer time than 20 ms.The logic processor stops program execution, all outputs of the PLC are cleared,and the logic processor flashes the indicator light at a very fast rate while awaitingthe return of supply power. When the supply voltage again rises, the logicprocessor resumes program execution in the same way as after an ordinary switch-on,but flashes the indicator light at a combined slow and fast rate for 4 minutes.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 11 - 230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual11.2 Start of program executionWhen the PLC is started, bit memories 0-63, bit outputs 0-39, register outputs 0-31,timers, counters, and step registers 4-7 are cleared, and depending on the position of theSW1 switch DIP 5 on the board, bit memories 64-191, bit outputs 64-191, step registers8-31, register outputs 32-255, register memories, shift registers and word variables arealso cleared. If SW1 switch DIP 5 is in position that defines to save the register and wordmemory values and there is no battery backup, the memories gets random values andthe function can be very strange after power failure.Next, the logic program stored in an EEPROM is transferred to RAM memory.The logic program is checked and any error messages are sent to the programmingdevice. If the program is OK, it starts.After the second program cycle the logic processor examines those register memoriesthrough which the logic program can tell:−−−what the serial interface is to be used for, if not programmingthe Baud rate of the serial interface, if not defined by the switchesthe language selection, English or Finnish.All kinds of communication in the PLC (computer, Modbus, user terminal) can commenceafter the second program cycle.The bit accumulator is '1' at the start of the first two program cycles, and zero for allfurther cycles.11.3 START commandWhen program execution is initiated with the START command from the programmingdevice, the following takes place:−−−−the states of outputs and memories remain unchangedthe logic program is transferred from the EEPROM to RAMthe logic program is checked, and started if it is OK.after the second program cycle the parameters are read from the registermemories.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 11 - 330/05/9911.4 Remedies for problem situationsProblems with the cooperation of the programming device and the PLC:- Set SW1 switch DIP 2 on board to 0 (O<strong>FF</strong>).- Set the Baud rates of the programming device and the PLC to the same value with DIPs3 and 4.- Check the type of the interconnection cable.- If the programming device is an IBM PC or equivalent, the correct programming program to use isALProWin or ALPro (previously AL, the on-line program - not AX).- When using the AL program, remember to use CAPITALS, i.e. to have Caps Lock ON.- Check the operation of serial communication by pressing CLR (N). One program line or an errormessage must appear on the screen; if the AL program is used, a program line or an error messageshould also appear at the bottom of the screen.- Check that the correct serial port is used in PCs (COM1/COM2).- Check that supply power for the programming device is taken, as far as possible, from the sameoutlet/phase/fuse as for the PLC.Switch off both the PLC and the PC for a moment and restart them.The instructions/variables PRT, P, GM cannot be found in the AL program; operation isotherwise normal.- An alternative keyboard arrangement is being used (KEYBxx program), which "misplaces" some ofthe characters required for programming.- Any missing ASCII codes can be found by pressing + + to restore the default(US) keyboard. Now try the characters \, [, ], + on the keyboard. Press + + to restore the alternative keyboard.- In the beginning of every progran cycle the register accumulator holds the value of program cycletime in milliseconds<strong>FF</strong>-<strong>Automation</strong> Oy


Page 11 - 430/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 12 - 130/05/9912. PROGRAMMING(Paragraph 12.1 discusses the available alternative programming methods. Since separate documentationis provided for the programming programs, they are only briefly outlined below.The other paragraphs describe the internal features of the <strong>Programmable</strong> <strong>Logic</strong> <strong>Controller</strong>; thisinformation also applies to terminal programming.)12.1 Programming methodsThe programming device can be any IBM compatible PC computer or a dump terminal.The program is transferred through the programming cable to the PLC. When programmingwith a PC, the AlPro programming program is used. With the programming program,the PLC program can be written either in O<strong>FF</strong> LINE mode (without a PLC, forsubsequent transfer) or in ON LINE mode (the program is immediately transferred to thePLC). The built-in programming features of the PLC are utilized during terminalprogramming.The <strong>AL16AN</strong> <strong>Programmable</strong> <strong>Logic</strong> <strong>Controller</strong> incorporates a programming program(information on the operation of instructions and commands) and an RS-232C interface.Accordingly, the following alternative programming methods are available:- the ALProWin programming program- the ALPro programming program- a terminal- a PROM programmerA complete program for the PLC can be produced using a terminal, but it is decidedlyeasier to write, edit and otherwise handle a program with the programming programALProWin or ALPro, which run on a personal computer. The programming program alsoallows for off-line programming and versatile program documentation etc.Memories of the PLC and programs:When a program is transferred from a programming device to the PLC, the program first goes to RAMand, after completion of the START command, to EEPROM memory. When a logic program is transferredfrom the PLC to a programming device, the program is first stored from RAM to EEPROM, andthen transferred to the programming device.The logic program is stored in an EEPROM memory circuit. When power is applied to the <strong>Programmable</strong><strong>Logic</strong> <strong>Controller</strong>, the program is read into RAM for execution.12.1.1 Programming with a PROM programmerWhen a number of PLCs with identical functions are required, programming is easiest todo by duplication. First program one PROM using one of the programming programs or aterminal and then copy the finished program into the program memories of the remainingPLCs with a PROM programmer.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual12.1.2 Programming with ALProThe program, with comments, is first written in plain text form using the text editor of AL-Pro. (Any other text editor producing ASCII text will do just as well.) The program is thencompiled with ALPro into a form that the <strong>Programmable</strong> <strong>Logic</strong> <strong>Controller</strong> understands,stored on a diskette, and transferred into the memory of the PLC when desired.Further features of ALPro:Macros: Emphasizing the program structure. (Page division, writing similar programsections, etc.)Windowing: Error messages easy to include in the listing file.ON-LINE features including display of variables, history display, on-line editor, etc.For example, the basic displays can be stored on disk, which facilitates the clearing offault conditions.ALPro contains HELP screens describing the functions.Available in Finnish and English language versions.A free version of the program, ALProWin-demo or ALPro-demo, is also available (similarto ALProWin / ALPro proper, but the length of the program that can be written is limited)as well as a manual (ALProWin / ALPro Programming manual).12.1.3 Terminal programmingTerminal programming makes direct use of the instructions and commands contained inthe <strong>Programmable</strong> <strong>Logic</strong> <strong>Controller</strong>. The terminal can be any "dumb" terminal equippedwith an RS-232C interface. Terminal programming is thus entirely based on the"intelligence" built into the PLC.For fast program entry, almost all instructions have a dedicated key (Refer to paragraph12.15. Special keys and the corresponding ASCII characters.) Sets of adhesive labelsare available from <strong>FF</strong>- <strong>Automation</strong> Oy for marking the dedicated AL command keys onthe keyboard.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 12 - 330/05/9912.2 <strong>AL16AN</strong> variables12.2.1 One-bit variablesIInput, 24 off. Numbered from 00 to 07 and 24 to 39 (octal).NI One's complement of input. When In = 1, NIn = 0.M Auxiliary memory, 256 off. Numbered from 000 to 255.B Auxiliary memory, 256 off. Numbered from 000 to 255.NM, NB One's complement of auxiliary memory.GM Common memory, 256 off. Numbered from 000 to 255.NG One's complement of auxiliary memory.O Output, 24 off. Numbered from 00 to 07 and 24 to 39.Outputs 040 - 255 can also be used as one-bit auxiliary memories.NO One's complement of output.SM, SO Conditional setting of memory or output, 256 off. Used in conjunction with theEQ instruction.RM, RO Conditional resetting of memory or output, 256 off. Used in conjunction with theEQ instruction.DP Change of auxiliary memory from 0 to 1, 64 off. Numbered from 000 to 063.Compares the state of the memory to its state at the beginning of the cycle.DN Change of auxiliary memory from 1 to 0, 64 off. Numbered from 000 to 063.Compares the state of the memory to its state at the beginning of the cycle.PPulse variable. The variable is 1 for the duration of one program cycle, P000 tentimes per second, P001 once per second, and P002 once per minute.SSequence register or a step of a sequence register. There are 32 sequence registers,with 256 steps each.TTimer, 80 off. Numbered from 000 to 79. The resolution and range ofthe timers varies as follows:resolution rangeT000 - 003 10 ms 0.02 to 2.55 sT004 - 007 100 ms 0.2 to 25.5 sT008 - 015 1 s 2 to 255 sT016 - 079 100 ms 0.2 to 25.5 sIn the IF and STEP instructions T refers to the bit accumulator.In the PRT instruction T refers to TEXT.C Counter, 16 off. Numbered from 000 to 015 (octal). The counters count down;their range is from 255 to 0.In the PRT instruction C refers to a numerical value.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 430/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual12.2.2 Register variables or 8-bit variablesR I Register input, 8 off. Numbered from 000 to 007. Used as analog inputs.R NI One's complement of register input.R M Register memory, 256 off. Numbered from 000 to 255.The registers are 8 bits wide. Some of the registers are reserved for special uses.R NM One's complement of register memory.R O Register output, 1 + 4 off (R O 0); reg. outputs 001 - 255 can be used as aux. memories.R NO One's complement of register output.R SM Conditional setting of register memory. Used in conjunction with the EQ instruction.R SO Conditional setting of register output. Used in conjunction with the EQ instruction.R RM Conditional resetting of register memory. Used in conjunction with the EQ instruction.R RO Conditional resetting of register output. Used in conjunction with the EQ instruction.R T Register timer. Identical with the timers listed above; T or R T is used asthe variable according to the instruction. Also refers to the register accumulatorin some instructions.R C Register constant 000 - 255 (decimal), except register counter with the READ andLOAD instructions. C or R C is used as the variable according to the instruction.Q Queue, 4 off. Numbered from 0 to 3. The queue length can be 1 - 256.<strong>FF</strong>IFO store, 8 off. Numbered from 0 to 7. The FIFO store has 256 locations.12.2.3 Word variables or 16-bit variablesW I Word input, 8 off. Numbered from 000 to 007. Used as (10-bit) analog inputs.W M Word memory, 2048 off. Directly addressable numbered from 000 to 255.Indirectly addressable 1536 pcs (ONI and STI instructions). Certain addressesoverlaps with FIFO storages. The memories are 16 bits wide.Memories 000 to 127 overlap register memories 000 to 255.W O Word output, 1024 off. Directly addressable numbered from 000 to 255.Indirectly addressable 512 pcs (ONI and STI instructions). Certain addressesoverlaps with queue storages. The memories are 16 bits wide.Word outputs can be used as auxiliary memories.W SM Conditional setting of word memory.W SO Conditional setting of word output.W RM Conditional resetting of word memory.W RO Conditional resetting of word output.W T Word accumulator.W C Word constant 0 - 9999 (decimal).NOTE: Refer to chapter 15 at the end of this Manual:- AL 16 Memory and I/O map- AL 16 Data retention during power failure<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 530/05/9912.3 <strong>AL16AN</strong> INSTRUCTIONSBA Bit Accumulator RA Register AccumulatorWA Word Accumulatorn variable number d constant AND I/M/O/NI/NM/NO/BM/GM/NB/NG/DP/DN/P nOperation Sets the bit accumulator equal to the logical product of its oldvalue and the variable.BA RA WA VariableAffected Yes No No NoExample STR M 000AND NM 000 ;Reset bit accumulator. AND S dOperation If the bit accumulator is 1 before the instruction and the current sequence registeris at step d, the bit accumulator remains at 1; otherwise it is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR I 000 ;If input 0 is 1 and theAND S 019 ;sequence register is at step 19,EQ SM 201 ;set memory 201 to 1. AND R I/M/O/NI/NM/NO nOperation Sets the register accumulator equal to the bit-by-bit logical product of its old valueand the variable.BA RA WA VariableAffected No Yes No NoExample STR R I 002 ;R I 002 = 10010001 BAND R M 005 ;R M 5 = 00110001 BEQ R M 006 ;R M 6 = 00010001 B AND R C dOperation Sets the register accumulator equal to the logical product of its old value andthe constant d (0 - 255).BA RA WA VariableAffected No Yes No NoExample STR R I 002 ;R I 002 = 10010001 BAND R C 015 ; = 00001111 BEQ R M 006 ;R M 6 = 00000001 B<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 630/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual AND W I/M/O nOperation Set the word accumulator equal to the logical product of its old value and variable n.BA RA WA VariableAffected No No Yes NoExample STR W I 003 ;W I 03 = 0000 0011 0000 1101 BAND W M 014 ;W M 14 = 0000 0000 0010 0110 BEQ W M 015 ;W M 15 = 0000 0000 0000 0100 B AND W C dOperation Set the word accumulator equal to the logical product of its old value and the constant d.BA RA WA VariableAffected No No Yes NoExample STR W I 003 ;W I 3 = 0000 0011 0000 1101 BAND W C 05667 ; = 0001 0110 0010 0011 BEQ W M 015 ;W M 15 = 0000 0010 0000 0001 B BCD R TOperation Converts the number in the register accumulator into a two-digit BCD number00 - 99; if the number in the accumulator is greater than 99, the result isindeterminate.BA RA WA VariableAffected No Yes No NoExample STR R C 080 ;Acc. = 0101 0000B (= 80 DES)BCD ;now = 1000 0000B (= 80 BCD) BCD W TOperation Convert the number in the word accumulator into a four-digit BCD number;if the number in the accumulator is greater than 9999, the result is indeterminate.BA RA WA VariableAffected No No Yes NoExample STR W C 04396 ;W A before = 0001 0001 0001 0001 BBCD W T ;W A after = 0100 0011 1001 0110 B; before ( 4396 DEC) after ( 4396 BCD)EQ W M 000 ;W M 0 = 17302 DEC BIN R TOperation Converts the contents of the register accumulator into binary format, assuming itcontained a two-digit BCD number before the instruction; if the accumulator doesnot contain a BCD number, the result is indeterminate.BA RA WA VariableAffected No Yes No NoExample STR R C 148 ;Acc. = 1001 0100B (= 94 BCD)BIN R T ;now = 0101 1110B (= 94 DES)<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 730/05/99 BIN W TOperation Convert the contents of the word accumulator into binary format, assuming itcontained a four-digit BCD number before the instruction; if the accumulator doesnot contain a BCD number, the result is indeterminate.BA RA WA VariableAffected No No Yes NoExample STR W C 00512 ;W A before=0000 0010 0000 0000 BBIN W T ;W A after = 0000 0000 1100 1000 B; before W A = 200 BCD, after 200 DEC BIT M/O/BM/GM nOperationMoves the content of the register accumulator into 8 successive bit variables suchthat the least significant bit goes to address n, the next to address n + 1, etc., andthe most significant bit to address n + 7.Register accumulator Variablebit 0nbit 1 n + 1bit 2 n + 2bit 3 n + 3bit 4 n + 4bit 5 n + 5bit 6 n + 6bit 7 n + 7BA RA WA VariableAffected No No No YesExample STR R C 130 ;= 10000010BBIT O 2.08 ;Turn on outputs 2.15 and 2.09 BYT I/M/O/BM/GM nOperation Converts 8 successive variables to a byte in the register accumulator. Variable nbecomes the least significant bit and variable n + 7 the most significant bit.Variable Register accumulatorn bit 0n + 1 bit 1n + 2 bit 2n + 3 bit 3n + 4 bit 4n + 5 bit 5n + 6 bit 6n + 7 bit 7BA RA WA VariableAffected No Yes No NoExample BYT I 000 ;The time setting forBIN;timer 6 is read fromSTR NI 010 ;inputs, for exampleLOAD R T 006 ;a thumbwheel switch.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 830/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual CLO R M/O nOperation Compares the 16-bit value in register memories RM 250 and RM 251 (RM 250 =high byte) with the variable given as the instruction parameter. The bit accumulatoris reset to 0 when (RM 250, RM 251) = (R M/O n, R M/O n + 1).CAUTION: The 16-bit values compared must naturally be in the same format, i.e.both binary or both BCD.BA RA WA VariableAffected Yes No No NoExample CLO R M 192 ;Output 012 is turned onEQ O 012 ;when the clock time reachesCLO R M 194 ;the value written into RM 192INV;and RM 193, and off when theAND O 012 ;clock time reaches the valueEQ O 012 ;written into RM 194 and RM 195.CONTOperation Terminates the skipping of instructions. (The STOP instruction also has this effect.)The first CONT instruction encountered stops the effect of all nested IF instructions.BA RA WA VariableAffected No No No NoExample IF I 000 ;If Input 000 = 1,STR I 001 ;then ...EQ O 001IF I 002 ;if Input 000 = 1 and Input 002 = 1,STR O 003 ;then ...EQ O 004CONT;Continue here in any case. CSR nOperation The PLC executes the subprogram n if the bit accumulator is trueBA RA WA VariableAffected Yes Yes Yes YesThe states of the accumulators remain unchanged, so subroutine can use theaccumulator states.See page 12-38.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 930/05/99 DCD R I/M/O nOperation Decodes the value of the variable n into the register accumulator. If the variable isbetween 0 and 7, the corresponding bit is set to 1 and the remaining bits are resetto 0. If the variable is greater than 7, the register accumulator is reset to 0.The value 0 corresponds to the least significant bit and 7 to the most significant bit.BA RA WA VariableAffected No Yes No NoExample STR R C 006EQ R M 000DCD R M 000 ;Acc. = 01000000B DCR C nValue of variableRegister accumulator after DCD instruction0 11 22 43 84 165 326 647 128>7 0Operation If the bit accumulator is 1, decrement counter n by 1. This instruction does notperform differentiation - for example, when counting pulses, the program mustensure that the counter is decremented by one for each pulse.BA RA WA VariableAffected No No No YesExample STR NI 000LOAD C 000 100 ;Count 100 pulsesEQ O 000STR I 001EQ M 001STR DP 001 ;Differentiate input 1DCR C 001 DEC R M/O nOperation If the bit accumulator is 1, decrement the variable by 1 and load the value of thevariable into the register accumulator. Decrementing a variable whose value is 0gives 255. If the bit accumulator is 0, the variable is not decremented but onlyloaded into the register accumulator. If the variable was decremented (the bit accumulator was 1) and the result was 255 (zero minus 1), the bit accumulator is set to 1;otherwise the bit accumulator remains at 0.BA RA WA VariableAffected Yes Yes No YesExample STR P 001 ;Decrement memory 112DEC R M 112 ;once per second. Every timeXOR O 001 ;the memory goes fromEQ O 001 ;0 to 255, invert output 1.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 1030/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual DEC W M/O nOperation If the bit accumulator is 1, decrement variable n by 1 and load the new value ofthe variable into the word accumulator. If the bit accumulator is 0, the variable is notdecremented but only loaded into the word accumulator. Decrementing a variablewhose value is 0 gives 65535. If the variable is decremented (the bit accumulatorwas 1)and the result is 65535, the bit accumulator is set to 1; otherwisethe bit accumulator is reset to 0.BA RA WA VariableAffected Yes No Yes YesExample STR P 000 ;Decrement memory 130DEC W M 130 ;10 times per second. Every timeXOR O 000 ;the memory goes fromEQ O 000 ;0 to 65535, invert output 0. DIV R I/M/O nOperation Divide the register accumulator by the variable n. The quotient remains in theregister accumulator and the remainder is stored in register output RM 244.BA RA WA VariableAffected No Yes No NoExample STR R M 100DIV R I 000 DIV R C dOperation Divide the register accumulator by the constant d. The quotient remains inthe register accumulator and the remainder is stored in register output RM 244.BA RA WA VariableAffected No Yes No NoExample STR R M 010 ;RM 10 = 15DIV R C 006 ;Acc. = 2;RM 244 = 3 DIV W I/M/O nOperation Divide the word accumulator by the variable n. The quotient remains in the wordaccumulator and the remainder is stored in register outputs RM 231,231 (MSB/LSB).BA RA WA VariableAffected No No Yes NoExample STR W M 025DIV W I 010 ;result is in word accumulatorEQ W M 010STR R O 230EQ R M 230STR R O 231EQ R M 231STR W M 115EQ W M 011 ; the remainder is in W M 011<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 1130/05/99 DIV W C dOperation Divide the word accumulator by the constant d. The quotient remains in the wordaccumulator and the remainder is stored in register outputs RM 231,231 (MSB/LSB).BA RA WA VariableAffected No No Yes NoExample STR W M 025DIV W C 01040ENDOperation Last instruction of the fast program loop. CAUTION: The END instruction must notbe written while the program is being executed. The program execution must alwaysbe suspended if any of the instructions preceding the END instruction are removed,added, or altered.BA RA WA VariableAffected No No No NoExample STR NO 000 ;A 100 Hz oscillator.EQ O 000 ;This loop runs every 5 ms.ENDSTR I ... ;The regular program starts here. EQ M/O/BM/GM nOperation Sets the variable equal to the contents of the bit accumulator.BA RA WA VariableAffected No No No YesExample STR I 000 ;Output O0EQ O 000 ;follows input I0. EQ SM/SO/SB/SG nOperation If the bit accumulator is 1, set the variable to 1;if the bit accumulator is 0, do nothing.BA RA WA VariableAffected No No No YesExample STR I 000 ;Input O0 setsEQ SO 010 ;output 10 to 1. EQ R M/O nOperation Sets the variable equal to the contents of the register accumulator.BA RA WA VariableAffected No No No YesExample STR R C 085 ;Constant 85 loaded intoEQ R M 211 ;register memory 211<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 1230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual EQ RM/RO/RB/RG nOperation If the bit accumulator is 1, reset the variable to 0;if the bit accumulator is 0, do nothing.BA RA WA VariableAffected No No No YesExample STR I 0.00 ;Input I 0.00 resetsEQ RO 1.00 ;output O 1.00. EQ R RM/RO nOperation If the bit accumulator is 1, reset the variable to 0;if the bit accumulator is 0, do nothing.BA RA WA VariableAffected No No No YesExample STR R C 123 ;If input 10 = 1,EQ R M 100 ;register memory 100STR I 010 ;is set to 0,EQ R RM 100 ;otherwise 123. EQ R SM/SO nOperation If the bit accumulator is 1, set the variable equal to the contents of the registeraccumulator; if the bit accumulator is 0, do nothing.BA RA WA VariableAffected No No No YesExample STR R C 123EQ R M 100 ;If input I1 = 1,STR R C 200 ;register memory 100 = 200,STR I 001 ;otherwise registerEQ R SM 100 ;memory 100 = 123. EQ W M/O nOperation Set the variable equal to the contents of the word accumulator.BA RA WA VariableAffected No No No YesExample STR W I 000 ;Word memory 3EQ W M 003 ;follows analog input 0. EQ W RM/RO nOperation If the bit accumulator is 1, reset the variable to 0; if the bit accumulator is 0,do nothing.BA RA WA VariableAffected No No No YesExample STR W C 03000 ;If input I004 = 1,EQ W M 130 ;word memory 130STR I 004 ;is set to 0,EQ W RM 130 ;otherwise 3000.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 1330/05/99 EQ W SM/SO nOperation If the bit accumulator is 1, set variable n equal to the contents of the wordaccumulator; if the bit accumulator is 0, do nothing.BA RA WA VariableAffected No No No YesExample STR W C 04500EQ W M 130 ;If input I004 = 1,STR W C 05000 ;word memory 130 = 5000,STR I 004 ;otherwise wordEQ W SM 130 ;memory 130 = 4500. EQI M/O/BM/GM nOperation Writes the state of bit accumulator into bit output/memory.Register accumulator is pointing to the bit variable to be written. Remark! Variablesaddress is octal, but it must be written as decimal to register accumulator.BA RA WA VariableAffected No No No YesExample STR R C 008 ;program sets the state of bit accumulatorEQI O ;into output I0o. EQI R M/O nOperation Loads the content of the register accumulator into the variable whose address isthe value of the variable given as the instruction parameterBA RA WA VariableAffected No No No NoExample STR R C 001EQ R M 000EQI R M 000 ;1 into memory 1INC R M 000EQI R M 000 ;2 into memory 2INC R M 000EQI R M 000 ;3 into memory 3 EQI W M/O nOperation Load the content of the word accumulator into the variable whose address isthe value of the variable given as the instruction. Accessible addresses areW M variables 0 to 2047, W O variables 0 to 1023BA RA WA VariableAffected No No No YesExample STR W C 11 ; min 0, max 2047EQ W M 000EQI W M 000 ;value of word accumulator into memory 11INC W M 000EQI W M 000 ;value of word accumulator into memory 12<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 1430/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual EQU R I/M/O nOperation If variable n is equal to the number in the register accumulator, the bit accumulatoris set to 1; if unequal, the bit accumulator is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR R I 001 ;If inputs 1 and 2EQU R I 002 ;are equal,EQ O 000 ;output 0 is 1. EQU R C dOperation If the constant d is equal to the register accumulator, the bit accumulator is set to 1;if unequal, the bit accumulator is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR R M 001EQU R C 010EQ O 001 ;There may be severalEQU R C 020 ;successive comparisonsEQ O 002 EQU W I/M/O nOperation If variable n is equal to the number in the word accumulator, the bit accumulator isset to 1; if unequal, the bit accumulator is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR W C 03000 ;If word memory 37EQU W M 037 ;equals 3000,EQ O 008 ;output 8 is on. EQU W C dOperation If the constant d is equal to the number in the word accumulator, the bit accumulatoris set to 1; if unequal, the bit accumulator is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR W M 001EQU W C 01000EQ O 001 ;There may be severalEQU W C 02000 ;successive comparisonsEQ SO 001<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 1530/05/99 FCN nOperationIf the bit accumulator is true, the FCN instruction executes one of followingfunctions. After successful execution of the instruction the bit accumulator is true.An undefined function call or illegal calculation parameter(s) may cause bitaccumulator to reset.CAUTION! The FCN instruction must not be used in the fast program loop!BA RA WA VariableAffected Yes No Yes Non selects the function for execution calculation time0 = logarithm a. 13 ms1 = natural logarithm a. 12 ms2 = sqrt (square ) a. 7 ms8 = percent10 = scaling of word variable a. 7 msBefore calling the FCN intsruction the variables content, which is to be scaled, mustbe written to word accumulator. After execution of FCN instruction the result ofcalculation is in word accumulator. The resolution of the result depends of theused function.0 log 65535 = 4.8164, in word acc. is 481641 ln 65535 = 11.090, in word acc. is 110902 sqrt 65535 = 255.99, in word acc. is 255998 %, value in WA, number in RA = percent value, after execution the resultis in word accumulator ( WA * RA)/10010 ScalingIn WA is number to be scaled, in RA is the starting address of wordmemories, that contents the scaling parameters. The area of scale wordword memories is freely selectable. The order of scaling parameters is:W M 100 = low limit of measured input (0 ... 4095)W M 101 = high limit of measured input (0 ... 4095)W M 102 = low range scaled output (eg. 10 (°C))W M 103 = high range scaled output (eg. 115 (°C))Example STR W C 0800 ; low limit of input (4 - 20 mA)EQ W M 100 ; wanted output 0 - 1000 (tenths of percent)STR W C 4095 ; high limit of inputEQ W M 101STR W C 0000 ; low limit of outputEQ W M 102STR W C 1000 ; high limit of outputEQ W M 103STR R C 100 ; parameters start address to RASTR W I 0.05 ; word input to be scaled into WASTR C 001 ; set bit accumulator to 1FCN 010 ; call scaling functionEQ W M 200 ; save the result to WM 200STOP<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 1630/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual FIN F nOperation If the bit accumulator is 1, move the contents of the register accumulator into FIFOstore n (0 - 7). If there was room in the FIFO, set the bit accumulator to 1, if not,clear the bit accumulator to 0.BA RA WA VariableAffected Yes No No YesExample STR I 000 ;At the rising edge of input 0EQ M 000STR DP 000STR R C 012 ;enter the number 12FIN F 000 ;into FIFO 0.FOU F nOperation If the bit accumulator is 1, move the "oldest" number in FIFO store n (0 - 7) intothe register accumulator. If a number was available in the FIFO, setthe bit accumulator to 1, if not, clear the bit accumulator to 0.BA RA WA VariableAffected Yes Yes No YesExample STR I 000 ;At the rising edge of input 0EQ M 000STR DP 000STR R C 024 ;enter the number 24FIN F 000 ;into FIFO 0,STR R C 034 ;enter the number 34FIN F 000 ;into FIFO 0,FOU F 000 ;move the number 24 from FIFO 0 into the;register acc. GRT R I/M/O nOperation If variable n is greater than the register accumulator, the bit accumulator is set to 1;otherwise the bit accumulator is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR R C 100 ;When register input 0GRT R I 000 ;is greater than 100,EQ O 000 ;output 0 is 1. GRT R C dOperation If the constant d is greater than the register accumulator, the bit accumulator is setto 1; otherwise the bit accumulator is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR R I 001 ;When register input 0GRT R C 100 ;is less than 100EQ O 000 ;output 1 is on.GRT R C 200 ;When RI 1 is less than 200EQ O 002 ;output 2 is on.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 1730/05/99 GRT W I/M/O nOperation If variable n is greater than the number in the word accumulator, the bit accumulatoris set to 1; otherwise the bit accumulator is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR W C 00500 ;When analog input 002GRT W I 002 ;is greater than 500,EQ O 033 ;output 33 is on. GRT W C dOperation If the constant d is greater than the number in the word accumulator, the bitaccumulator is set to 1; otherwise the bit accumulator is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR W M 001 ;When word memory 1GRT W C 04009 ;is less than 4009,EQ O 030 ;output 030 is on;GRT W C 01050 ;when WM 1 is less than 1050,EQ O 031 ;output 031 is on.IF TOperation If the bit accumulator is 0, subsequent instructions up to the CONT instruction areskipped; if the bit accumulator is 1, the instructions are executed. Further IFinstructions can be placed between the IF and CONT instructions. The effect ofall IF instructions ceases at the first CONT instruction encountered.BA RA WA VariableAffected No No No NoExample STR I 010IF T ;If input 10 = 0,STR I 001 ;theseEQ O 001 ;instructionsSTR I 002 ;will not beEQ O 002 ;executed.CONT IF I/M/O/NI/NM/NO/DP/DN/BM/GM/NB/NG/P nOperation If the variable is 0, subsequent instructions up to the CONT instruction are skipped;if the variable is 1, the instructions are executed. Further IF instructions can beplaced between the IF and CONT instructions. The effect of all IF instructionsceases at the first CONT instruction encountered.BA RA WA VariableAffected No No No NoExample IF DP 077 ;When memory 77 changesSTR I 000 ;from 0 to 1, theseEQ SM 001 ;instructionsSTR I 001 ;are executedEQ RM 001 ;once.CONT<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 1830/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual IF S dOperation If the current sequence register is at step d, subsequent instructions are executed;otherwise execution continues from the next CONT instruction. Further IFinstructions can be placed between the IF and CONT instructions. The effect of allIF instructions ceases at the first CONT instruction encountered.BA RA WA VariableAffected No No No NoExample STR R S 003 ;When the sequence registerIF S 098 ;is at step 98,STR NO 071 ;invert output 71.EQ O 071CONT INC R M/O nOperation If the bit accumulator is 1, add 1 to register variable n. If the variable was 255, thenew value is 0 and the bit accumulator is set to 1; otherwise the bit accumulator isreset to 0. If the bit accumulator was 0, the variable is not incremented. The valueof the variable is loaded into the register accumulator.BA RA WA VariableAffected Yes Yes No YesExample STR P 001 ;Increment register output 0INC R O 000 ;once per second. If an analog;unit is connected to the output,a sawtooth wave; is obtained at the output. INC W M/O nOperation If the bit accumulator is 1, add 1 to variable n and load the new value of the variableinto the word accumulator. If the variable was 65535, the new value is 0 andthe bit accumulator is set to 1; otherwise the bit accumulator is reset to 0.If the bit accumulator was 0, the variable is not incremented but only loaded intothe word accumulator.BA RA WA VariableAffected Yes No Yes YesExample STR P 001 ;Increment word memory 3INC W M 003 ;once per second.INVOperation Changes the bit accumulator to its one's complement.BA RA WA VariableAffected Yes No No NoExample STR O 000 ;Bit accumulatorAND NO 000 ;is zero after thisINV;and one after this<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 1930/05/99 LES R I/M/O nOperation If variable n is less than the register accumulator, the bit accumulator is set to 1;otherwise the bit accumulator is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR R I 001 ;When memory 2LES R M 002 ;is less than input 1,EQ O 000 ;output 0 is 1. LES R C dOperation If the constant d is less than the register accumulator, the bit accumulator is set to 1;otherwise the bit accumulator is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR R I 001 ;When input 1LES R C 145 ;is between 146 and 154,EQ M 000GRT R C 155AND M 000 ;output 0 is 1.EQ O 002 LES W I/M/O nOperation If variable n is less than the number in the word accumulator, the bit accumulator isset to 1; otherwise the bit accumulator is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR W I 001 ;When word memory 4LES W M 004 ;is less than analog input 01,EQ O 030 ;output 30 is 1. LES W C dOperation If the constant d is less than the number in the word accumulator, the bitaccumulator is set to 1; otherwise the bit accumulator is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR W I 0.001 ;When analog input 01LES W C 06000 ;is less than 6000,EQ O 030 ;output 30 is 1.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 2030/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual LOAD T n dOperation If the bit accumulator is 1, timer n is loaded with the initial setting d. After theinstruction, the bit accumulator contains the status of the timer (1 = timed out,0 = running). A setting can be defined for the timer with the programming device.If it is non-zero, it will be used; if it is zero, the time set in the program will be used.When the PLC is switched on, all timers are at zero.BA RA WA VariableAffected Yes No No YesExample STR NI 000LOAD T 008 100 ;A 100-second delayEQ O 000 ;from input 0 to output 0 LOAD C n dOperation If the bit accumulator is 1, counter n is loaded with the initial setting d. After theinstruction, the bit accumulator contains the status of the counter (1 = counted out,0 = running). A setting can be defined for the counter with the programming device.If it is non-zero, it will be used; if it is zero, the value set in the program will be used.When the PLC is switched on, all counters are at zero.BA RA WA VariableAffected Yes No No YesExample STR NI 000 ;Same delay as in theLOAD C 000 100 ;example above,EQ O 000 ;now using a counter 0STR P 001DCR C 001 LOAD R T/C nOperation If the bit accumulator is 1, timer/counter n is loaded with an initial setting equal tothe contents of the register accumulator. After the instruction, the bit accumulatorcontains the status of the timer/counter. A setting made with the programmingdevice or computer has no effect when this instruction is used.BA RA WA VariableAffected Yes No No YesExample STR NI 000 ;Delay from input to output,STR R I 000 ;time set viaLOAD R T 000 ;register inputEQ O 000 LOAD Q n dddOperation If the bit accumulator is 1, move the contents of the register accumulator intoelement d (0 - 255) of shift register n (0 - 3).BA RA WA VariableAffected No No No YesExample STR R C 000 ;Clear the register accumulator.STR I 000 ;At the rising edge of input 0EQ M 000STR DP 000LOAD Q 000 002 ;clear element 2 of shift register 0.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 2130/05/99 MID R I/M/O nOperation Subtracts the variable n and the bit accumulator from the register accumulator,assuming that they are two-digit BCD numbers. If the result is less than 0, the bitaccumulator is set to 1; otherwise the bit accumulator is reset to 0. If the numbersare not BCD numbers, the result is indeterminate.BA RA WA VariableAffected Yes Yes No NoExample IF DP 000INVSTR R M 123MID R I 001EQ R M 123CONT;Reset bit accumulator MID R C dOperation Subtracts the constant d and the bit accumulator from the register accumulator,assuming that both are two-digit BCD numbers. If the result is less than 0, the bitaccumulator is set to 1; otherwise the bit accumulator is reset to 0. If the numbersare not BCD numbers, the result is indeterminate.BA RA WA VariableAffected Yes Yes No NoExample IF DP 000STR NM 000 ;M0 = 1 - NM0 = 0STR R M 015 ; Subtract 16 = 0001 0000B =MID R C 016 ;10 BCD (=16 DES) fromEQ R M 015 ;the 16-bit number inSTR R M 014 ;register memories 14,15.MID R C 000EQ R M 014CONT MID W M/O nOperation Subtract the variable n and the bit accumulator from the word accumulator,assuming that they are BCD numbers. If the result is less than 0, the bit accumulatoris set to 1; otherwise the bit accumulator is reset to 0. If the numbers are not BCDnumbers, the result is indeterminate.BA RA WA VariableAffected Yes No Yes NoExample IF DP 000 ;Reset bit accumulatorINVSTR W M 030 ;Subtract contents of word memory 45MID W M 045 ;(as a BCD number) from word memory 30.EQ W M 030CONT<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 2230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual MID W C dOperation Convert the constant d (0 - 9999) to BCD format and subtract it and the bit acc.from the word accumulator, assuming that the word accumulator contains a BCDnumber. If the result is less than 0, the bit accumulator is set to 1; otherwise the bitaccumulator is reset to 0. If the number in the word accumulator is not a BCDnumber, the result is indeterminate.BA RA WA VariableAffected Yes No Yes NoExample IF DP 000 ;Reset bit accumulatorINVSTR W M 030 ;W M 30 = 0000 0011 0110 0011 B (363 BCD)MID W C 00054 ;const. = 0000 0000 0011 0110 B (36 BCD)EQ W M 030 ;W M 30 = 0000 0011 0010 0111 B (327 BCD)CONT MIN R I/M/O nOperation Subtracts the variable n and the bit accumulator from the register accumulator. Ifthe result is less than 0, the bit accumulator is set to 1; otherwise the bit accumulatoris reset to 0.BA RA WA VariableAffected Yes Yes No NoExample STR C 000 ;Reset bit accumulator.STR R M 013 ;RM 12,13 (16-bit number) =MIN R I 001 ;RM 12,13 - RI 1EQ R M 013 ;If underflow occursSTR R M 012 ; subtract 1 from R M 12MIN R C 000EQ R M 012 MIN R C dOperation Subtracts the constant d and the bit accumulator from the register accumulator. Ifthe result is less than 0, the bit accumulator is set to 1; otherwise the bit acc. is resetto 0.BA RA WA VariableAffected Yes Yes No NoExample STR C 000 ;Subtract the constant 100STR R M 101 ;from the 16-bit number inMIN R C 100 ;register memories RM 100,101EQ R M 100STR R M 100MIN R C 000 ;If underflow occursEQ R M 100 ; subtract 1 from R M 12<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 2330/05/99 MIN W I/M/O nOperation Subtract variable n and the bit accumulator from the word accumulator. If the resultis less than 0, the bit accumulator is set to 1;otherwise the bit accumulator is reset to 0.BA RA WA VariableAffected Yes No Yes NoExample STR I 000 ;Reset bitAND NI 000 ;accumulator.STR W M 60 ;Subtract value of word memory 106MIN W M 106 ;from value of word memory 60. MIN W C dOperation Subtract the constant d and the bit accumulator from the word accumulator. If theresult is less than 0, the bit accumulator is set to 1;otherwise the bit accumulator is reset to 0.BA RA WA VariableAffected Yes No Yes NoExample STR I 000 ;Reset bitAND NI 000 ;accumulator.STR W M 60 ;Subtract the constant 3500MIN W C 03500 ;from word memory 60. MUL R I/M/O nOperation Multiply the register accumulator by the variable n. The least significant byte remainsin the register accumulator and the most significant byte is stored in register outputR O 244.BA RA WA VariableAffected No Yes No NoExample STR R I 001 ;RI 1 * RM 3 = RM 5,4MUL R M 003EQ R M 005STR R O 244EQ R M 004 MUL R C dOperation Multiply the register acc. by the constant d. The least significant byte remainsin the register acc. and the most significant byte is stored in register output RM 244.BA RA WA VariableAffected No Yes No NoExample STR R I 000MUL R C 002<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 2430/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual MUL W I/M/O nOperation Multiply the word accumulator by the variable n. The least significant word ofthe product remains in the word accumulator and the MSB/LSB eight bit variablesare stored in register outputs R O 230, 231.BA RA WA VariableAffected No No Yes NoExample STR W M 001 ;WM 1 * WM 2 = WM 10,11MUL W M 002EQ W M 010STR R O 230EQ R M 230STR R O 231EQ R M 231STR W M 115EQ W M 011 MUL W C dOperation Multiply the word accumulator by the constant d. The least significant word ofthe product remains in the word accumulator and the MSB/LSB eight bit variablesare stored in register outputs R O 230, 231.BA RA WA VariableAffected No No Yes NoExample STR W M 030MUL W C 00010 ;Contents of word memory 30 * 10EQ W M 010 ; WM 30 * 10 = WM10,11STR R O 230EQ R M 230STR R O 231EQ R M 231STR W M 115EQ W M 011 NEXT S d eOperation If the current sequence register has been at step d for e seconds, it moves on tothe next step.BA RA WA VariableAffected No No No NoExample NEXT S 000 010 ;The sequence registerNEXT S 001 010 ;moves around steps 0, 1, 2NEXT S 002 010 ;at intervals of 10 seconds.STR S 003 ;Back to start from step 3STEP S 000 OR I/M/O/NI/NM/NO/DP/DN/BM/GM/NB/NG/P nOperation Sets the bit accumulator equal to the logical sum of its old value and the variable.BA RA WA VariableAffected Yes No No NoExample STR M 000OR NM 000 ;Set bit accumulator to 1. OR S d<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 2530/05/99Operation If the bit accumulator is 1 before the instruction or if the current sequence registeris at step d, the bit accumulator is set to 1; otherwise it is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR S 027 ;If the sequence registerOR S 028 ;is at step 27 or 28,EQ R M 005 ;reset memory 5. OR R I/M/O/NI/NM/NO nOperation Sets the register acc. equal to the logical sum of its old value and the variable.BA RA WA VariableAffected No Yes No NoExample STR R M 001 ;R M 1 = 00001111 BOR R M 002 ;R M 2 = 11110110 BEQ R M 003 ;R M 3 = 11111111 B OR R C dOperation Sets the register acc. equal to the logical sum of its old value and the constant d.BA RA WA VariableAffected No Yes No NoExample STR R M 001 ;R M 1 = 00100011 BOR R C 128 ; = 10000000 BEQ R M 002 ;R M 2 = 10100011 B OR W I/M/O nOperation Set the word accumulator equal to the logical sum of its old value and variable n.BA RA WA VariableAffected No No Yes NoExample STR W M 033 ;W M 33 = 1011 0110 0110 1100 BOR W M 024 ;W M 24 = 0000 0010 1111 0100 BEQ W M 012 ;W M 12 = 1011 0110 1111 1100 B OR W C dOperation Set the word acc. equal to the logical sum of its old value and the constant d.BA RA WA VariableAffected No No Yes NoExample STR W M 045 ;W M 45 = 0001 1101 1111 0000 BOR W C 09006 ; = 0010 0011 0010 1110 BEQ W M 021 ;W M 21 = 0011 1111 1111 1110 B<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 2630/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual PLD R I/M/O nOperation Adds the variable n and the bit accumulator to the register accumulator, assumingthat each contains a BCD number. If the result is greater than 99, the bitaccumulator is set to 1; otherwise the bit accumulator is reset to 0. If the addend andaugend are not BCD numbers, the result is indeterminate.BA RA WA VariableAffected Yes Yes No NoExample STR I 000 ;Register memory 1 = 9,OR NI 000 ;bit accumulator = 1STR R C 016 ;acc. = 0001 0000B (10 BCD)PLD R M 001 ;+ 0000 1001B (9 BCD);+ 1B (bit acc.);acc. = 0010 0000B (20 BCD) PLD R C dOperation Adds the constant d and the bit accumulator to the register accumulator, assumingthat both are BCD numbers. If the result is greater than 99, the bit accumulator isset to 1; otherwise the bit accumulator is reset to 0. If the numbers are not BCDnumbers, the result is indeterminate. NOTE The constant d which is a BCD numberis written in the program as a decimal number.Example: constant 16 = 0001 0000 (bit format)1 0 (BCD format)BA RA WA VariableAffected Yes Yes No NoExample STR R C 017 ; = 0001 0001B = 11 BCDPLD R C 025 ; = 0001 1001B = 19 BCD;Acc. = 0011 0000B = 30 BCD PLD W M/O nOperation Add variable n and the bit accumulator to the word accumulator, assuming that eachcontains a BCD number. If the result is greater than 9999, the bit accumulator is setto 1; otherwise the bit accumulator is reset to 0. If the addend and augend are notBCD numbers, the result is indeterminate.BA RA WA VariableAffected Yes No Yes NoExample STR I 0 ;Word memory 003 = 4900 at the beginning,OR NI 0 ;set bit accumulator to 1STR W C 02450 ;W A =0000 1001 1001 0010 B (992 BCD)PLD W M 003 ;+ WM 3 =0001 0011 0010 0100 B (1324 BCD);+ BA =0000 0000 0000 0001 B (1 BCD);W A =0010 0011 0001 0111 B (2317 BCD)<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 2730/05/99 PLD W C dOperation Convert the constant d (0 - 9999) to BCD format and add it and the bit accumulatorto the word accumulator, assuming that both are BCD numbers. If the result isgreater than 9999, the bit accumulator is set to 1; otherwise the bit accumulator isreset to 0. If the numbers are not BCD numbers, the result is indeterminate.BA RA WA VariableAffected Yes No Yes NoExample STR W C 00313 ;W A = 0000 0001 0011 1001 B (139 BCD)PLD W C 00400 ;W const.= 0000 0001 1001 0000 B (190 BCD);W A = 0000 0011 0010 1001 B (329 BCD) PLU R I/M/O nOperation Adds the variable n and the bit accumulator to the register accumulator. If the resultis greater than 255, the bit accumulator is set to 1; otherwise the bit accumulator isreset to 0. Using the bit accumulator in this way as a carry bit allows calculation withnumbers greater than 255.BA RA WA VariableAffected Yes Yes No NoExample STR I 000 ;Reset bitAND NI 000 ;accumulator.STR R M 002 ;RM 22 = RM 12 + RM 2PLU R M 012EQ R M 022 PLU R C dOperation Adds the constant d and the bit accumulator to the register accumulator. If theresult is greater than 255, the bit accumulator is set to 1; otherwise the bitaccumulator is reset to 0.BA RA WA VariableAffected Yes Yes No NoExample STR P 001 ;Add 1 to register memory 123STR R M 123 ;once per second.PLU R C 000EQ R M 123 PLU W I/M/O nOperation Add variable n and the bit accumulator to the word accumulator. If the result isgreater than 65535, the bit accumulator is set to 1; otherwise the bit accumulator isreset to 0.BA RA WA VariableAffected Yes No Yes NoExample STR I 000 ;When I000 = 1,STR W M 034 ;WM 003 = WM 34 + WM 25 + 1PLU W M 025EQ W M 003<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 2830/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual PLU W C dOperation Add the word constant d and the bit accumulator to the word accumulator. If theresult is greater than 65535, the bit accumulator is set to 1; otherwise it is reset to 0.BA RA WA VariableAffected Yes No Yes NoExample STR P 002 ;Add 1 to word memory 50STR W M 050 ;once per minute.PLU W C 00000EQ W M 050 PRT COperation The number of vacant character positions in the print buffer is returned inthe register accumulator. If there is room for more than 80 characters,the bit accumulator is set to 1; if not, the bit accumulator is reset to 0.BA RA WA VariableAffected Yes Yes No NoExample PRT C ;Repeatedly prints the text:PRT T room ;room again !PRT T agai@PRT T n !# PRT T cccccOperation If the bit accumulator is 1, the five characters given in the instruction are output.If it is not desired to output as many as five characters, the output can be terminatedwith the @ character, in which case a carrier return and line feed will not be added atthe end, or with the # character, in which case a carrier return and line feed will beadded. Any characters that can be produced with the keyboard are valid as parametersexcept that CTRL-B (12 hex) is not acceptable as the second character. The bitaccumulator is 1 after the instruction if the characters were output (there was roomin the output buffer).BA RA WA VariableAffected Yes No No NoExample STR I 000EQ M 000STR DP 000PRT T inputPRT T 0 isPRT T a onPRT T e#<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 2930/05/99 PRT R TOperationIf the bit accumulator is 1, the character in the register accumulator is output. If therewas room for the character in the output buffer, the bit accumulator is 1 afterthe instruction.BA RA WA VariableAffected Yes No No NoExample STR R M 232 ;If a character has beenLES R C 000 ;received from the serial line,PRT R T ;echo it andEQ R RM 232 ;clear the character buffer. PRT R C dOperation If the bit accumulator is 1, the constant d given as the instruction parameter is outputwith two digits. The constant d is assumed to be between 00 and 99. If the constantd is greater than 99, indeterminate characters will be output. If there was room forthe characters in the print buffer, the bit accumulator is 1 after the instruction.BA RA WA VariableAffected Yes No No NoExample STR I 000EQ M 000STR DP 000 ;Print thePRT R C 019 ;year: 19xxPRT R M 255 PRT R I/M/O nOperation If the bit accumulator is 1, the value of the variable n is output with two digits,assuming it to be a BCD number. If the bit accumulator is 0, it will be 0 after theinstruction. If the variable is not a BCD number, indeterminate characters willbe output.BA RA WA VariableAffected Yes No No NoExample STR P 001 ;Outputs the content of registerPRT R M 001 ;memory 1 once per second.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 3030/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual READ F nOperation Read the current number of elements in FIFO store n (0-7) into the register accumulator.If there are elements in the FIFO, set the bit accumulator to 1, if not, clearthe bit accumulator to 0.BA RA WA VariableAffected Yes Yes No NoExample STR I 000 ;At the rising edge of input 0EQ M 000STR DP 000STR R C 012 ;enter the number 12FIN F 000 ;into FIFO 0,STR R C 004 ;the number 4FIN F 000 ;into FIFO 0,STR R C 024 ;the number 24FIN F 000 ;into FIFO 0,READ F 000 ;number 3 into register acc. READ R T/C nOperation The register accumulator is loaded with the remaining count in timer/counter n.If the timer/counter has counted out, the register accumulator will be 0.BA RA WA VariableAffected No Yes No NoExample STR NI 000LOAD T 020 100EQ O 000 ;Register output 0READ R T 020 ;will show theEQ R O 000 ;remaining time READ S nOperation Selects sequence register n as the current sequence register.BA RA WA VariableAffected No No No NoExample READ S 002 ;Subsequent sequence register;instructions apply to sequence register 2. READ T/C nOperation The status of the timer/counter (1=counted out, 0=running) is loaded into the bitaccumulator.BA RA WA VariableAffected Yes No No NoExample READ T 010 ;Output 0 changes stateEQ M 000 ;for a momentLOAD T 010 005 ;at intervals ofSTR DP 000 ;5 seconds.EQ O 000<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 3130/05/99 RES F nFifo operates in data areas F0 WM1024-1151, F1 WM1152-1279,...,F7 WM1920-2047.Operation If the bit accumulator is 1, clear FIFO store n (0 - 7) (delete contents).BA RA WA VariableAffected No No No YesExample STR I 000 ;At the rising edge of input 0EQ M 000STR DP 000RES F 000 ;clear FIFO 0. RES Q nOperation If the bit accumulator is 1, reset all elements of shift register n (0 - 3) to zero.BA RA WA VariableAffected No No No YesExample STR I 000 ;When input 0 is 1, reset allRES Q 002 ;elements of shift register 2.RETOperation The subroutine ends here, execution is then returned to main program.BA RA WA VariableAffected Yes Yes Yes YesThe states of the accumulators remain unchanged, so main program can use theaccumulator states after executing the subroutine. SBR nOperation This is the starting instrucion of a subroutine. See page 12-38. SHL Q n dddOperation If the bit accumulator is 1, shift the elements of shift register n (0 - 3) one step tothe left. The number in the register accumulator is shifted into the vacated position(right end) of the shift register. The element shifted out of the shift register goes intothe register accumulator. d (0 - 255) is the length of the shift register - 1.BA RA WA VariableAffected No Yes No YesExample STR NI 000 ;The falling edge of input 0EQ M 000STR DP 000READ R C 003SHL Q 000 250 ;moves a 560-step conveyorSHL Q 001 250 ;one step to the left.SHL Q 002 060<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 3230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual SHR Q n dddSHR instruction uses word outputs (Q0 uses WO 512- 639, Q1 uses WO 640- 767 etc.) andtheseword outputs can be used for other purpouses only if SHR instruction is not used.Operation If the bit accumulator is 1, shift the byte-sized elements of shift register n (0 - 3) onestep to the right. The number in the register accumulator is shifted into the vacatedposition (left end) of the shift register. The element shifted out of the shift registergoes into the register accumulator. d (0 - 255) is the length of the shift register - 1.BA RA WA VariableAffected No Yes No YesExample STR I 000 ;The rising edge of input 0EQ M 000STR DP 000STR R M 030SHR Q 000 200 ;moves a 300-step conveyorSHR Q 001 100 ;one step to the right. STEP R TOperation If the bit accumulator is 1, move the current sequence register to the step indicatedby the contents of the register accumulator. If the bit accumulator is 0, do nothing.BA RA WA VariableAffected No No No NoExample STR C 001 ;The sequence registerSTR R M 003 ;moves to the step indicatedSTEP R T ;by register memory 3. STEP S dOperation If the bit accumulator is 1, the current sequence register moves to step d. If the bitaccumulator is 0, do nothing.BA RA WA VariableAffected No No No NoExample STR S 139 ;If at step 139,STEP S 000 ;move to step 0 STEP TOperation If the bit accumulator is 1, the current sequence register moves on to the next step.If the previous step is 255, the new step is 0.BA RA WA VariableAffected No No No NoExample STR R S 000 ;Select sequence register 0STR P 000 ;(valid until the next selection).STEP T ;Sequence register moves to;next step 10 times per second.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 3330/05/99 STI I/M/O/BM/GM nOperation Reads the state of binary input/output/memory to bit accumulator.Register accumulator is pointing to the bit variable to be read. Remark! Variablesaddress is octal, but it must be written as decimal to register accumulator.BA RA WA VariableAffected Yes No No NoExample STR R C 012 ;The state of input I 14o is the bit accumulatorsSTI I ;state (read address is 12 decimal). STI R M/O nOperation Loads the register accumulator with the variable whose address is the value ofthe variable given as the instruction parameter.BA RA WA VariableAffected No Yes No NoExample STR R C 010 ;= 00 001 010B = 10 decEQ R M 020 ;Read contents of RM 10STI R M 020 ;into the register accumulator. STI W M/O nOperation Load the word accumulator with the variable whose address is the value ofthe variable given as the instruction parameter. Accessible addresses areW M variables 0 to 2047, W O variables 0 to 1023BA RA WA VariableAffected No No Yes NoExample STR W C 010 ;= 0 000 000 000 001 010 B = 10EQ W M 020 ;Read contents of WM 10STI W M 020 ;into the word accumulator.STOPOperation Last instruction of the program; the first program line will be executed next.Terminates the range of the IF instruction.BA RA WA VariableAffected No No No NoExample STOP ;The program cycle ends here.STPOperationThe PLC's main program ends with this command and all subroutine programsmust be written after the STP command STR I/M/O/NI/NM/NO/BM/GM/NB/NG/P nOperation Reads the state of variable n into the bit accumulator. The variable is not affected.BA RA WA VariableAffected Yes No No NoExample STR I 000 ;Read state of input 0 into acc.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 3430/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual STR DP nOperation If auxiliary memory n is 1 and was 0 at the start of the program cycle,the bit accumulator is set to 1. If the auxiliary memory is 0, or was already 1 atthe start of the program cycle, the bit accumulator is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR I 000 ;Read state of input 0 into memoryEQ M 010STR DP 010 ;Rising edgeXOR O 005 ;inverts output 5.EQ O 005 STR DN nOperation If auxiliary memory n is 0 and was 1 at the start of the program cycle, the bitaccumulator is set to 1. If the auxiliary memory is 1, or was already 0 at the start ofthe program cycle, the bit accumulator is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR I 001 ;At falling edge of input 1EQ M 001 ;decrement counter 3 by 1.STR DN 001DCR C 003 STR S/(NS) dOperation If the current sequence register is/(not) at step d, the bit accumulator is set to 1;otherwise it is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR S 024 ;When sequence register is atEQ O 125 ;step 24, O 125 is on. STR R I/M/O/NI/NM/NO nOperation Reads the value of a register variable into the register accumulator.BA RA WA VariableAffected No Yes No NoExample STR R M 210 ;Read contents of register memory 210 intoregister accumulator. STR R C dOperation Reads the constant d (0 - 255) into the register accumulator.BA RA WA VariableAffected No Yes No NoExample STR R C 019 ;Store 19 (decimal) in register accumulator.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 3530/05/99 STR R S nOperation Reads the number of the current step of sequence register n (0 - 31) into the registeraccumulator. Register n is made the current sequence register, i.e. subsequentsequence register instructions will affect it.BA RA WA VariableAffected No Yes No NoExample STR R S 002 ;When sequence register 2 is atSTR S 029 ;step 29, output 5 is on.EQ O 005 STR C dOperation Reads the state of variable n into the bit accumulator. The accumulator is reset to 0,if d = 0; for other values of d, it is set to 1.BA RA WA VariableAffected Yes No No NoExample STR C 000 ;Initialize bit accumulator.STR R M 010PLU R M 011EQ R M 020 STR Q nOperation Read the element whose position is given by the register accumulator, ofshift register n (0 - 3), into the register accumulator.BA RA WA VariableAffected No Yes No NoExample STR R C 005 ;Move the value of element 5STR Q 000 ;of shift register 0 into the register accumulator. STR W I/M/O nOperation Read the value of variable n into the word accumulator.BA RA WA VariableAffected No No Yes NoExample STR W I 001 ;Read value of input 1 (0 - 4095)into word acc. STR W C dOperation Read the constant d (0 - 65535) into the word accumulator.BA RA WA VariableAffected No No Yes NoExample STR W C 00455 ;Initialize word accumulator to 455.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 3630/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual XOR I/M/O/NI/NM/NO/DP/DN/BM/GM/NB/NG/P nOperation Sets the bit accumulator equal to the exclusive-or function of its old value andthe variable.BA RA WA VariableAffected Yes No No NoExample STR P 001XOR O 000 ;Output 0 is invertedEQ O 000 ;once per second. XOR S dOperation If the current sequence register is at step d and the bit accumulator is 0, or ifthe sequence register is not at step d and the bit accumulator is 1,the bit accumulator is set to 1; otherwise it is reset to 0.BA RA WA VariableAffected Yes No No NoExample STR R S 000 ;If only one of sequence registersSTR S 010 ;0 and 1 is at step 10,STR R S 001 ;memory 10 is set to 10.XOR S 010EQ M 010 XOR R I/M/O/NI/NM/NO nOperation Sets the register accumulator equal to the exclusive-or function of its old valueand the variable.BA RA WA VariableAffected No Yes No NoExample STR R M 000 ;R M 0 = 01111011 BXOR R M 001 ;R M 1 = 10000011 BEQ R M 002 ;R M 2 = 11111000 B XOR R C dOperation Sets the register accumulator equal to the exclusive-or function of its old value andthe constant d.BA RA WA VariableAffected No Yes No NoExample STR R M 000 ;R M 0 = 01010101 BXOR R C 255 ; = 11111111 BEQ R M 001 ;R M 1 = 10101010 B<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page 12 - 3730/05/99 XOR W I/M/O nOperation Set the word accumulator equal to the exclusive-or function of its old value andvariable n.BA RA WA VariableAffected No No Yes NoExample STR W M 033 ;W M 33 = 1011 0110 0110 1100 BXOR W M 024 ;W M 24 = 0000 0010 1111 0100 BEQ W M 012 ;W M 12 = 1011 0100 1001 1000 B XOR W C dOperation Set the word accumulator equal to the exclusive-or function of its old value andthe constant d.BA RA WA VariableAffected No No Yes NoExample STR W M 045 ;W M 45 = 0001 1101 1111 0000 BXOR W C 09006 ; = 0010 0011 0010 1110 BEQ W M 021 ;W M 21 = 0011 1110 1101 1110 B<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 3830/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualSubroutinesThe PLC's main program ends with an STP instruction. It is possible to write subroutine programswhich start with the SBR n command (n is subroutine number), and ends with the RET command.The maximum number of subroutines is 32 (numbers 0 - 31). The STOP command must be appearafter the subroutines, this ends the PLC program. The PLC system program ignores all SBR and RETinstructions which appear before STP instruction. If the RET instruction is missing from a subroutinethe PLC executes the next subroutine(s) until the a RET command is found. If no RET commandisfound, program executes until the STOP command is reached, and the PLCsystem program does notreturn to main program. The PLC now performs I/O updates and the main program starts again fromline 1. Therefore the main program is executed only up to the first CSR instruction, the rest of themain program is not executed at all. If there is a CSR call for a subroutine that does not exist, the PLCinterpretes the SCR instruction as a NOP instruction and continues normally.STPOperationThe PLC's main program ends with this command and all subroutine programsmust be written after the STP command CSR nOperationAffectedThe PLC executes the subprogram n if the bit accumulator is trueBit accumulator Register accumulator Word accumulator VariableThe states of the accumulators remain unchanged, so subroutine can use theaccumulator states. SBR nOperationThis is the starting instrucion of a subroutineRETOperationAffectedExampleThe subroutine ends here, execution is then returned to main program.Bit accumulator Register accumulator Word accumulator VariableThe states of the accumulators remain unchanged, so main program can use theaccumulator states after executing the subroutine.Scaling subroutine for analog variables. The scaling parameters are transferredin main program with the ONI instruction and the result after the subroutine callis retrieved with the STI instruction from word accumulator or from WM 101STR C 001 ; set bit accumulator to 1CSR 001 ; call subroutine 1STP; main program end...SBR 01 ; start of subroutine 1EQ W M 102STR R M 100 ; scaling parameters start addressSTR C 001 ; set bit accumulator to 1STR W M 100 ; variable to be scaledFCN 010 ; call scaling functionEQ W M 101 ; save the result to WM 101RET...STOP<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 12 - 3930/05/9912.4 Terminal programming commandsADDRWRITEINSREADNEXTCLRDELPREVSTARTSTOPHINHOUTLISTFINDDISPInitiates input of a program address (= number of a program line). The address is enteredas four octal digits. When the address is complete, <strong>AL16AN</strong> outputs the instructionat the address given, or gives the 'ERROR 010' message to indicate that there is noAL instruction on the program line specified.Writes the instruction prepared on the screen into the RAM program memory at theaddress shown at the beginning of the line, overwriting any previously existing instructionat the same address. If the new and the old instruction differ in length (for example, if oneof them is a timer setting instruction), the programming program shifts the remainder ofthe program accordingly.Writes the instruction prepared on the screen into the RAM program memory at theaddress shown at the beginning of the line, shifting any existing instruction at the sameaddress and the remainder of the program onwards to make room for the new instruction.Displays the instruction at the program address displayed. Used as a preparation todeleting an instruction.Displays the next program address and the instruction on it.Cancels the effect of the preceding commands and outputs the program addressand instruction currently being processed. Can be used at any time.Deletes the instruction at the RAM program address displayed at the beginning ofthe line. Does not work unless immediately preceded by a READ command.Displays the preceding program address and the instruction at it. If there are programlines in memory with no AutoLog instructions, the programming program skips overthem and outputs the first true AutoLog instruction encountered.Stores the logic program in RAM into EEPROM memory. This may take a while.Execution of the program then starts.Halts execution of the program. However, transfer of inputs and outputs continues;the status display of variables is thus operative even while the program is halted.Reads a logic program in the Intel hexadecimal format from the programming deviceinto RAM; the programming program then stores the program into EEPROM memory.Stores the logic program in RAM into EEPROM and sends it to the programmingdevice in the Intel hexadecimal format.Outputs the logic program starting at the program line displayed, until the STOPinstruction. Output can be stopped by hitting the space bar.Searches the program for the instruction entered into the display, starting at theprogram line displayed. If the instruction is found, the program line and the instructionare displayed. If the instruction is not found, an 'ERROR 040' message is given.Displays the state of a variable<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 4030/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualThe programming program reacts to an incorrect key operation with a tone signal (for example,WRITE before the instruction is complete). Keying mistakes can be correctedwith the CLR (N) key.Normally the program runs all the time. If changes are to be made to the program, it isadvisable to halt it with the STOP key while making the changes. The program is startedwith the START key. The STOP and HIN commands halt execution of the program. TheWRITE, INS, DEL, LIST, FIND, and HOUT commands halt execution until the functionhas been carried out.Program changes made with the programming device (WRITE, INS, READ/DEL) arequick, because they only affect the RAM memory. The logic program in RAM is storedinto EEPROM memory when the START (!) key is pressed.The fast program loop must be changed only when execution of PLC program isstopped.12.5 Programming pointerThe programming program keeps track of the address of the program memory locationcurrently affected by programming operations (the programming pointer). The programmingpointer can be located by pressing the CLR key (the program address, i.e. the programline number, and the instruction will be displayed). If there is no AutoLog instructionat this address, the 'ERROR 010' message is given.The address can be changed by typing a new address or by stepping forwards or backwardsin the program. The address is also automatically updated when an instruction iswritten into memory or deleted.The ADDR key moves the cursor to the start of the desired program line. The programline number is entered as four octal digits (0 - 7), whereupon the programming programdisplays the instruction at the address given, or gives an error message to indicate thatthere is no instruction on the program line specified.The NEXT key and the PREV (Previous) key move the programming pointer in either direction,one program line at a time. However, when stepping backwards, the pointer ismoved back far enough so that a real instruction is found. If the pointer is at a two-byteinstruction, the correct pointer movement takes place automatically.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 12 - 4130/05/9912.6 Entering an instruction in memoryTo enter a new instruction in the program at the location indicated by the programmingpointer, first key in the instruction and then press either WRITE or INS. Example:Text displayedCommentsPress CLR (N).0002 EQ L 000 A new instruction is to be entered here.0002 EQ L 000 STR First key STR (A).0002 EQ L 000 STR I Then the variable name I (Q).0002 EQ L 000 STR I 000 Then the variable number, first 0.0002 EQ L 000 STR I 000 The second and third 0. The instruction is now completeand is entered in program memory with the WRITE key (X).0003 STR M 000 The instruction on the next program line is displayed.If the INS key had been used in the above example instead of the WRITE key, the displaywould have been as follows:0002 EQ L 000 STR I 000 Now press the INS key (C).0003 EQ L 000 The instruction that was previously on program line 2, hasbeen pushed onwards to line 3, and the new instruction hasbeen written on line 2.If an attempt was made to enter a non-existent variable number into an instruction, theprogramming program of the PLC immediately issues an 'ERROR 030' message and displaysthe program line.If the new and the old instruction differ in length in the case of the WRITE command, andalways when the INS command is used, the programming program moves the instructionson subsequent lines of the program forwards or backwards as required. The STOPinstruction is always the last instruction to be shifted.If an attempt was made to enter an instruction when the programming space is alreadyfull, an 'ERROR 050' message is issued. The error is cancelled as soon as a sufficientnumber of instructions are deleted from the program.12.7 Deleting an instruction from memoryTo delete instructions from the program, use the DEL command (M). First place the programmingpointer at the instruction to be deleted and then press the READ key (V). TheDEL command will now delete the instruction in question and move back all subsequentinstructions as far as the STOP instruction, to fill the gap left by the deleted instruction.Example:Text displayed Comments0010 AND I 000 Keys pressed: ADDR (Z),0,0,1,0.0010 AND I 000AND I 000READ key (V) pressed.0010 EQ L 000 DEL key (M) pressed. The instruction AND I 000 was deleted fromprogram memory and the remaining instructions were moved back one position.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 4230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual12.8 Locating an instruction in a programFIND command [ ( ] searches for a given instruction, starting at the programming pointer.If the instruction is not found before the STOP instruction is encountered, an 'ERROR040' message is issued. Place the programming pointer at the desired point, enter thedesired instruction in its entirety (in the case of timer and counter setting instructions, thesetting value must also be given, although the FIND command does not make use of it).When the instruction is complete, press the FIND key; the programming program will displaythe next point of occurrence of the instruction and the instruction itself. If the FINDkey is pressed before the instruction is complete, the PLC does not accept the command,and issues a short tone signal to indicate the error.12.9 Listing the programIf a program listing is desired, either on the display or on paper, move the programmingpointer to the desired starting point and press the LIST key [&]. The programming programwill output the program in mnemonic format up to the STOP instruction. Output canbe stopped by hitting the space bar [ ]. (The programming pointer will not be moved awayfrom the starting point by the LIST operation.)12.10 Storing the programA program written into the program memory of the AutoLog 16AN can be stored onto anexternal device for later requirements. The HOUT command [%] causes the program tobe stored from the RAM program memory to EEPROM memory, whereupon it is sent tothe serial line in Intel hexadecimal format.The HIN command [^] causes a logic program in Intel hexadecimal format to be read intothe PLC, where it is first stored in RAM; when the entire program has been received, theprogramming program stores the program into EEPROM memory. This may take a littlewhile.12.11 If there is no AutoLog program in memoryIf there is no logic program, the programming program reports this by issuing an 'ERROR010' message, and the indicator light on the CPU board flashes at a fast rate (5 Hz). Thefast flash means that there is no STOP instruction in the program, or that there is anunidentifiable instruction ahead of the STOP instruction. Rectify the program and start itwith the START command [!]. If the program is formally correct, it will start, and the indicatorlight changes to the normal flashing rate (0.5 Hz).If the STOP instruction in a program is overwritten while the program is running, the PLCno longer operates properly (unless there happened to be two successive STOP instructionsin program memory). This condition can be remedied by switching the PLC off andback on again. Since no STOP instruction can be found in memory, the programmingpointer will now stop at the first program line where no AutoLog 16 instruction is found.Enter a STOP instruction on this line.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 12 - 4330/05/99To clear the entire program space, write a STOP instruction on program line 0000. ThisSTOP instruction will overwrite the first instruction of the old program (the remaining programlines are still intact), and the new program can now be written over the old one.12.12 Monitoring the operation of a programWhen the DISP key [ ) ] is pressed, the cursor moves to the beginning of the next lineand awaits entry of a variable name and number. As soon as these are given, the stateof the variable is displayed, as well as a dash [-] if it is possible to alter the variable. TheDISP operation is provided to allow variables to be monitored and changed.The variablecan be redisplayed with the RETURN key. To alter the variable, key in the new value (0or 1 for binary variables, a three-digit decimal number 000 - 255 for register variables).12.12.1 Monitoring register and word variablesTo select a register variable, press TAB (CONTROL-I) followed by the variable name andits number with three digits. To select a word variable, press TAB (CONTROL-I) twice,followed by the variable name and its number with three digits.R -> W -> R = 12.12.2 Monitoring timers and countersIn the case of timers and counters, two numbers are displayed after the variable number:the current content of the timer/counter (first), and its setting. If the value of a timer/counter is changed, the change affects the setting, not the current value. If the setting iszero, the logic program, when executing a Load instruction LOAD T or LOAD C, entersthe value in the program as the current value. If the setting is non-zero, the setting is enteredas the current value of the timer/counter. Switch SW1 selects whether setting valuesare retained during a power failure. Example:Key pressed Command Display) DISP Cursor to start of new line.TAB R R Select a register variable.I T R T Select a timer.0 R T 0 Enter number0 R T 00 of timer.0 R T 000 = 100 225- Remaining time 100 * 10 ms.RETURN = 085 225- Now remaining 85 * 10 ms.1 = 085 225-1 Enter 150 as5 = 085 225-15 new0 = 085 225-150 setting.To check a sequence register, press the DISP key [ ) ] followed by R (TAB) and S [?] tosee the step at which the sequence register in question is and how long it has been atthat step. If a new step number (000 - 255) is now entered, the sequence register inquestion will move to that step and the time will be reset.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 12 - 4430/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualExample:Key pressed Command Display) DISP Cursor to start of new line.TAB R R Select register variable.? S R S Select sequence register.0 R S 0 Enter number0 R S 00 of sequence register.0 R S 000 = 013 002- 13 seconds have been spent at step 2.RETURN = 025 002- Now 25 seconds.0 = 025 002-0 Move to2 = 025 002-02 step0 = 025 002-020 20.) DISP Cursor to start of new line.TAB R R Select register variable.? S R S Select sequence register.0 R S 0 Enter number0 R S 00 of sequence register.0 R S 000 = 008 020- 8 seconds have been spent at step 20.The running program is free to change the variables, and the latest change is alwaysvalid.12.13 Fast program loopA fast program loop can be written into the <strong>Programmable</strong> <strong>Logic</strong> <strong>Controller</strong> for executionat timer interrupts, at intervals of 5 ms. The executable program of the loop starts as programline 0000 and ends at an END instruction.When the fast program loop is in use, the PLC reads inputs 0 - 7 and writes to outputs 0- 7 every time before executing the fast loop.The differentiation of auxiliary memories 0 - 7 is timed by the fast loop.The maximum permissible length of the fast loop is 62 instructions, but it is advisable tokeep it as short as possible in order to avoid slowing down the main program more thannecessary.No PRT instructions are allowed in the fast loop.CAUTION! The END instruction must not be written while program execution is inprogress. The program must always be halted when instructions preceding the END instructionare deleted, added, or changed.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 12 - 4530/05/9912.14 Special keys and corresponding ASCII charactersInstr. Käsky ASCII HexVar. Muuttuja ASCII HexSTRANDORXOREQSTOPLOADREADDCRIFCONTINVPRTNOPSTEPNEXTSTRJATAIETAIONSTOPASLUEVHJOSJTKINVPRTNOPSTEPSEURASDFGHJKL,./\ (Ö)[ (Ä);:4153444647484A4B4C2C2E2F5C5B3B3AINIONOMNMSOROSMRMBMNBSBRBGMNGSGRGDPDNPTCSQFTETLELMEMSLRLSMRMBMEBSBRBGMEGSGRGDPDNPANSJFQWU*ER>


Page 12 - 4630/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualFigure 12.1 Layout of special keys on AT keyboardTAB/RTAB TAB/W!/START1Q/I W/NI E/Me/RB4$/STOPR/NMr/RG%/HOUT5T/SMt/TX&/LIST6/ /INV7( /FIND8[ /NOPY/RM U/O I/Ti/NB)/DISP9] /PO/C=/DN0P/PREV?/S+/GM\ /PRT^/HINA/STR S/AND D/ORF/XORJ/LOADf /F G/EQ H/STOPK/READ L/DCRj /Qg/SB h/BMl/SG*/NO>/SO


Page 13 - 130/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual<strong>FF</strong>-<strong>Automation</strong> Oy13. TABLES13.1 ASCII-codescharacterASCII codeHexcodedecimalcodecharacterASCII codeHexcodedecimalcodecharacterASCII codeHexcodedecimalcodeNULSOHSTXETXEOTENQACKBELBSHTLFVT<strong>FF</strong>CRSOSIDLEDC1DC2DC3DC4NAKSYNETBCANEMRSUBESCFSGSRSUSSP!"#$%&‘()*000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A00010203040506070809101112131415161718192021222324252627282930313233343536373839404142+,-./0123456789:;?@ABCDEFGHIJKLMNOPQRSTU2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F50515253545543444546474849505152535455565758596061626364656667686970717273747576777879808182838485VWXYZ[ (Ä)\ (Ö)](Å)^_`abcdefghijklmnopqrstuvwxyz{ (ä)| (ö)} (å)~DEL565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F8687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127


Page 13 - 230/05/99<strong>FF</strong>-<strong>Automation</strong> Oy<strong>AL16AN</strong> <strong>Instruction</strong> Manual13.2 Decimal/Octal conversionsdec.codeoctalcodedec.codeoctalcodedec.codeoctalcodedec.codeoctalcodedec.codeoctalcodedec.codeoctalcode0001020304050607080910111213141516171819202122232425262728293031323334353637383940414243444500010203040506071011121314151617202122232425262730313233343536374041424344454647505152535455464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990915657606162636465666770717273747576771001011021031041051061071101111121131141151161171201211221231241251261271301311321339293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137134135136137140141142143144145146147150151152153154155156157160161162163164165166167170171172173174175176177200201202203204205206207210211138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183212213214215216217220221222223224225226227230231232233234235236237240241242243244245246247250251252253254255256257260261262263264265266267184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229270271272273274275276277300301302303304305306307310311312313314315316317320321322323324325326327330331332333334335336337340341342343344345230231232233234235236237238239240241242243244245246247248249250251252253254255346347350351352353354355356357360361362363364365366367370371372373374375376377


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 14- 130/05/9914. LIST OF <strong>AL16AN</strong> PRODUCTS14.1 Basic BoardCodeDesignationDescriptionDI - DO - AI -AO901001 <strong>AL16AN</strong> 8 - 8 - 6 - 1 *)14.2 Expansion boardsDI = Digital InputDO = Digital OutputAI = Analog InputAO = Analog output*) Analog input 0 can be used as ananalog output plus an I/U input901010 AL32EX 16 - 16 - 0 - 0901034 AL32EXA 0 - 0 - 8 - 4901018 AL32EXO 0 - 32 - 0 - 014.3 Analog input modules901058 0 to 20 mA Current input901059 4 to 20 mA Current input901078 0 to 5 V Voltage input901080 0 to 10 V Voltage inputNOTE When ordering analogboards, please specify the types ofinputs and outputs desiredResolution (°C)Temperature rangeAL16 AN AL32EXA901050 0.125 0.5 0 to + 127.5 °C Pt 100901052 0.125 0.5 0 to + 255.0 °C Pt 100901054 0.125 0.5 - 40 to + 87.5 °C Pt 100901074 0.25 1 - 55 to + 200.0 °C Pt 100901076 0.25 1 125 to + 380.0 °C Pt 100901090 0.125 0.5 - 20 to + 107.0 °C Kty 10, 11, 15901092 0.125 0.5 - 40 to + 87.5 °C Kty 10, 11, 15901094 0.1 0.4 0 to + 102.3 °C Kty 10, 11, 15901095 0.1 0.4 - 40 to + 62.3 °C Kty 10, 11, 15901096 0.2 0.8 - 40 to + 164.7 °C Kty 10, 11, 15901097 0.1 0.4 0 to + 102.3 °C Pt 100901098 0.1 0.4 40 to + 62.3 °C Pt 100901099 0.5 2 - 50 to + 461.5 °C Pt 10014.4 Analog outputs901060 0 to 5 V Voltage output901061 0 to 10 V Voltage output14.5 Converters for serial communication901157 AL485 RS-485 conversion module, optic isolated901225 CNV1 Signal converter board, RS232 RS422/485, full/half duplex903190 CNV-2 RS232 RS485 half duplex conversion module (RJ45)<strong>FF</strong>-<strong>Automation</strong> Oy


Page 14 - 230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual14.6 Accessory boards900860 AL1093F Clock and Calendar/Display/Keypad 2x16 Characters, 16 Function Keys901017 AL1093D Clock and Calendar/Display/Keypad (With Surface Mounting Plate)2x16 Characters, 16 Function Keys901017 AL1093DC Clock and Calendar/Display/Keypad (for Customers front Plate)2x16 Characters, 16 Function Keys901023 AL1094 Display/Keypad901019 AL1094R Display/Keypad900870 AL1094F Clock and Calendar/Display/Keypad (for Customers front Plate)900850 AL1095A Clock and Calendar/Display/Keypad, 16 keys900855 AL1095B Clock and Calendar/Display/Keypad, 4 keys902172 AL1096/S Graphic Display (240 x 128), 5 function keys902174 AL1096/T Graphic Display (240 x 128), touch screen (10 x 8)902178 AL1096PS STN Graphic Display/Touch Panel (320 x 240), 40x30 Switches902180 AL1096PE STN Graphic Display/Touch Panel (320 x 240), 40x30 Switches, Centr.14.7 Power supplies901383 AL9624/3.5 24 V DC/3.5 A power supply901380 AL9624/8 24 V DC/8 A power supply901462 AL6405 Power supply for CNV-114.8 Programming cables941172 ALC2 Programming cable PC - AutoLog, length 2 m941173 ALC5 Programming cable PC - AutoLog, length 5 m941510 AL9042 Cable AutoLog(D9P) - CNV1, length 2.5 m941177 Cable Modem(D9P) - AutoLog(D9P), length 2.5 m901179 Cable AutoLog(D9P) - Radiomodem(D15P), length 2 m903194 Cable CNV2 - AutoLog (RJ45), length 2.5 m14.9 Programming software941020 ALProWin 1.x ALProWin programming software for Windows941004 ALPro3.x programming program ALPro 3.x for Dos941010 ALPro update update from program AL/AX or ALG to ALProWin 1.x / ALPro3.x941011 ALPro update update from ALPro1(2).x to ALPro3.x14.10 Other Programs941060 MODBUS RTU Development Kit for PC906611 Modbus Analyser906603 Modbus Test Program for PC, Dos<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 15 - 130/05/9915. LIST OF INSTRUCTIONSSTR I/O/NI/NO nSTR M/BM/GM/NM/NB/NG/P nSTR DP/DN nSTR S dSTR R I/M/O/NI/NM/NO nSTR R C dSTR R S nSTR C nSTR Q nSTR W I/M/O nSTR W N dAND I/M/O/NI/NM/NO nAND BM/GM/NB/NG/DP/DN/P nAND S dAND R I/M/O/NI/NM/NO nAND R C dAND W I/M/O nAND W C dOR I/M/O/NI/NM/NO nOR BM/GM/NB/NG/DP/DN/P nOR S dOR R I/M/O/NI/NM/NO nOR R C dOR W I/M/O nOR W C dXOR I/M/O/NI/NM/NO nXOR BM/GM/NB/NG/DP/DN/P nXOR S dXOR R I/M/O/NI/NM/NO nXOR R C dXOR W I/M/O nXOR W C dEQ M/O/BM/GM nEQ R M/O nEQ SM/SO/SB/SG nEQ RM/RO/RB/RG nEQ R SM/SO nEQ R RM/RO nEQ W M/O nEQ W SM/SO nEQ W RM/RO n IF T IF I/O/NI/NO n IF M/BM/GM/NM/NB/NG n IF DP/DN/P n IF S d CONT DEC R M/O n DEC W M/O n INC R M/O n INC W M/O n BIN R T (BIN) BIN W T BCD R T (BCD) BCD W T PLU R I/M/O n PLU R C d PLU W I/M/O n PLU W C d PLD R I/M/O n PLD R C d PLD W M/O n PLD W C d MIN R I/M/O n MIN R C d MIN W I/M/O n MIN W C d MID R I/M/O n MID R C d MID W M/O n MID W C d MUL R I/M/O n MUL R C d MUL W I/M/O n MUL W C dINVDIV R I/M/O nDIV R C dDIV W I/M/O nDIV W C dDCD R I/M/O n<strong>FF</strong>-<strong>Automation</strong> Oy


Page 15 - 230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualLOAD T n dLOAD C n dLOAD R T/C nLOAD Q n dSTEP TSTEP S dSTEP R TREAD T/C nREAD S nREAD R T/C nREAD F nSTI I/M/O/BM/GM nSTI R M/O nSTI W M/O nEQI M/O/BM/GM nEQI R M/O nlEQI W M/O nCLO R M/O nBYT I/M/O/BM/GM nBIT M/O/BM/GM nDCR C nENDNEXT S d eSTOPEQU R I/M/O nEQU R C dEQU W I/M/O nEQU W C dGRT R I/M/O nGRT R C dGRT W I/M/O nGRT W C dLES R I/M/O nLES R C dLES W I/M/O nLES W C dSHR Q n dSHL Q n dRES Q nRES F nFIN F nFOU F nFCN nCSR nPRT CPRT T cccccPRT R TPRT R C dPRT R I/M/O nSBR nRETSTP<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 15 - 330/05/99COMMANDS OF AUTOLOGEnglish Finnish English FinnishAND JA STEP STEPBCD BCD STI STIBIN BIN STOP STOPBIT BIT STP STPBYT BYT STR STRCLO CLO XOR ETAICONTJTKCSR CSR VariablesDCDDCDDCR VH I TDEC DEC NI ETDIV JAK O LEND END NO ELEQ ON SO SLEQI ONI RO RLEQU EQU M MERROR VIRHE NM EMFCN FCN SM SMFIN FIN RM RMFOU FOU DP DPGRT GRT DN DNIF JOS BM BMINC INC NB EBINV INV SB SBLES LES RB RBLOAD AS GM GMMID MID NG EGMIN MIN SG SGMUL KER RG RGNEXT SEUR P POR TAI T APLD PLD C NPLU PLU S SPRT PRT F FREAD LUE Q JRESRESRET RET Variable typesSBRSBRSHL SHL R RSHR SHR W W<strong>FF</strong>-<strong>Automation</strong> Oy


Page 15 - 430/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualCOMMANDS OF AUTOLOGFinnish English Finnish EnglishAS LOAD STOP STOPBCD BCD STP STPBIN BIN STR STRBIT BIT TAI ORBYT BYT VH DCRCLO CLO VIRHE ERRORCSRCSRDCD DCD VariablesDECDECEND END T IEQU EQU ET NIETAI XOR L OFCN FCN EL NOFIN FIN SL SOFOU FOU RL ROGRT GRT M MINC INC EM NMINV INV SM SMJA AND RM RMJAK DIV DP DPJOS IF DN DNJTK CONT BM BMKER MUL EB NBLES LES SB SBLUE READ RB RBMID MID GM GMMIN MIN EG NGON EQ SG SGONI EQI RG RGPLD PLD P PPLU PLU A TPRT PRT N CRES RES S SRET RET F FSBR SBR J JSEURNEXTSHL SHL Variable typesSHRSHRSTEP STEP R RSTI STI W W<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 15 - 530/05/99O NO MNM GM BM255 255 255 255Will retain their status duringpower failure if desired192 192192 192Will be reset afterpower failureINI392415646324231615646312764 6463 63State not affected bypower failureT R T, TCstate actualvaluestate79161587430000 00R O, R NO R M, R NMR SO, R RO R SM, R RMW O255 2551023R IR NI7164255317010WI700R C, Cactualvalue150W M 128-2047W M 0-127W M20472550S31...87...0Q3210F76543210P210TR TW TIndirectly addressableword memories 000 - 2047 (=2k)and -outputs 000 - 1023 (=1k)(instructions STI and ONI)R M 0-255The behaviour of AL16 memorieson power failure.Addresses in decimal<strong>FF</strong>-<strong>Automation</strong> Oy


Page 15 - 630/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 16 - 130/05/9916. <strong>Instruction</strong>s for the adjustment of the analoginputs of <strong>AL16AN</strong> and AL32EXAAll analog inputs are adjusted in the factory to be in accordance with the measuringrange indicated on the input measurement modules. In case you need to change theinput measurement module to another you have to make an adjustement procedure inorder to ensure that the AL16 or AL32EXA is providing you with the right information.In this chapter you are guided through the complete procedure step by step for alldifferent types of analog inputs.Note! If you need to adjust the inputs of the expansion unit AL32EXA you have first towrite the AL32EXA board identification number in R M 228 and down load it to the AL16.The system program of AL16 transfers the analog inputs on the AL32EXA unit to theRegister Input Variables RI 08...RI 15.16.1 Adjustment Potentiometers on the <strong>AL16AN</strong> and AL32EXA boards:<strong>AL16AN</strong>AL32EXAInput O<strong>FF</strong>SET GAIN Test pin J14 Input O<strong>FF</strong>SET GAIN Test pin (J14)0 P201 P207 2 0 P201 P207 21 P202 P208 3 1 P202 P208 32 P203 P209 4 2 P203 P209 43 P204 P210 5 3 P204 P210 54 P205 P211 6 4 P205 P211 65 P206 P212 7 5 P206 P212 78 (GND) 8 (GND)16.2 <strong>AL16AN</strong>:The values of analog inputs on the <strong>AL16AN</strong> board are obtained in the form of word inputs(W I) as shown below (underlined bits).High byte Low byte0000xxxx xxxxxx00The analog input has a resolution of 10 bits. Its value is seen in steps of 4, as the numbers0, 4, 8, ..., 4092. If the value is desired in steps of 1 (0, 1, 2, ..., 1023), program asfollows:STRW I 001DIV W C 004EQ W M 001<strong>FF</strong>-<strong>Automation</strong> Oy


Page 16 - 230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualThe table below shows the word input and register input variables corresponding to theanalog inputs on the <strong>AL16AN</strong> board.Word inputRegister inputAnalog input 0 W I 0 R I 0, R I 064Analog input 1 W I 1 R I 1, R I 065Analog input 2 W I 2 R I 2, R I 066Analog input 3 W I 3 R I 3, R I 067Analog input 4 W I 4 R I 4, R I 068Analog input 5 W I 5 R I 5, R I 06916.3 AL32EXA:The values of analog inputs on the AL32EXA board are obtained in the form of registerinputs (R I). The analog input has a resolution of 8 bits.The table below shows the register input variables corresponding to the analog inputchannels on the AL32EXA board.Analog input 0 R I 08Analog input 1 R I 09Analog input 2 R I 10Analog input 3 R I 11Analog input 4 R I 12Analog input 5 R I 13Analog input 6 R I 14Analog input 7 R I 15Register input16.4 What is needed for the adjustmentYou need the ALPro or ALPro2 software, a PC, an accurate mA-meter, an accurateV-meter and a adjustable resistance reference (decade resistor).For making the readings of the analog inputs you have to use the PC and the ALProsoftware. For the adjustement of the analog inputs of the basic <strong>AL16AN</strong> only oneinstruction has to be downloaded to the AL16; the STOP instruction. For the adjustementof the analog inputs on the AL32EXA you have first to write the AL32EXA boardidentification number in R M 228 and down load it to the AL16. The system program ofAL16 transfers the analog inputs on the AL32EXA unit to the Register Input Variables RI08...RI 15.Through ALPro Debug-function you can see the values of all inputs as well as theregister inputs where you have the information of the analog inputs on the AL32EXAboard.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 16 - 330/05/9916.5 How to read the input values using the PC and ALPro (DOS version)1 Connect the AL16 to the PC and start the ALPro software.2 Write the following program:STR W I 000DIV W C 004EQ W M 000STR W C 001EQ W M 228STOPThis program was made only for the analog input 0. If you wantto include all the analog inputs at once you can add the similarinstructions for all the rest of the analog inputs.W M 228 contents the identification number of AL32EXA board.3 Compile the program by choosing Compile from the main menu.4 Transfer the program to the PLC by choosing Write prog to PLC from the submenu.5 Choose Debug from the main menu.6 Choose Start/Stop from the Debug main menu.7 Choose Start F7 from the submenu. Now you have started the execution of theprogram you have written before. Check on the PLC that the status LED is blinking.In the Debug window you can see your program on the left hand side. On theright hand side you can follow certain variables. You have to select which variablesyou want to watch.8 Choose Watch from the main menu9 Choose Add variable from the sub menu10 A box appears on the screen. Write W M 0 in the box and press 11 Press F9 in order to start the updating of the values you want to watch. On theright part of the screen you can see:; W M 0= 0002 (the numbers depend on the real input value); R I 8 = 120 (this is for the AL32EXA)In case you have written a program for watching all of the analog inputs at thesame time you have to add all the necessary watch lines for all the analog values.12 Now you can start the adjustment procedure<strong>FF</strong>-<strong>Automation</strong> Oy


Page 16 - 430/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual16.6 Current inputsYou need to have an adjustable current source and a mA meter with enough accuracy(0.1%). Connect the adjustable current source to the analog input number 0 (terminals+sign and -sign).Analog input 0J600I-SIGN-SIGN+747372Adjustablecurrent sourceNote!This refers to the AnalogInput number 0. For otherinputs check the numberof the potentiometer inthe table on page 16 - 1.I+71MmA1 Adjust the current source to the lowest value in the measuring range(0 mA or 4 mA) using the mA-meter.2 Adjust the O<strong>FF</strong>SET point by turning the P201 potentiometer. You cancheck the measured value as bits in the PC unit in the following way:0 mA equals the value 0 (adjust so that you can see the value 1 inthe PC and turn the potentiometer carefully so that the PC showsthe value 0)4 mA equals the value 205 (the value 51 for AL32EXA)(adjust the P201 so that you can see the value 205 (the value 51for AL32EXA) in the PC)3 Adjust the current source to the highest value (20 mA) using the mA-meter.4 Adjust the GAIN by turning the potentiometer P207 until you can seethe value 1023 (255 for AL32EXA) in the PC.5 Now go back to the O<strong>FF</strong>SET adjustment (see point 2 above) and repeatthe procedures described in point 2,3 and 4.Note! The adjustment of the GAIN effects the adjustment of the O<strong>FF</strong>SET. You have to repeat the adjustmentprocedure a couple of times until you have found the right final adjustement values.Proceede to the following Analog Input Channel and repeat the procedure described.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 16 - 530/05/9916.7 Voltage inputsYou need to have an adjustable voltage source and a V-meter with enough accuracy(0.1%). Connect the adjustable voltage source to the analog input number 0 (terminals+sign and -sign).Analog input 0J600I-SIGN-SIGN+I+74737271VAdjustablevoltage sourceNote!This refers to the AnalogInput number 0. For otherinputs check the numberof the potentiometer inthe table on page 16 - 1.1 Adjust the voltage source to the lowest value in the measuring range(0 V) using the V-meter.2 Adjust the O<strong>FF</strong>SET point by turning the P201 potentiometer. You cancheck the measured value as bits in the PC unit in the following way:0 mA equals the value 0 (adjust so that you can see the value 1 inthe PC and turn the potentiometer carefully so that the PC showsthe value 0)3 Adjust the voltage source to the highest value (5 V or 10 V) using the V-meter.4 Adjust the GAIN by turning the potentiometer P207 until you can seethe value 1023 (255 for AL32EXA) in the PC.5 Now go back to the O<strong>FF</strong>SET adjustment (see point 2 above) and repeatthe procedures described in point 2,3 and 4.Note! The adjustment of the GAIN effects the adjustment of the O<strong>FF</strong>SET. You have to repeat the adjustmentprocedure a couple of times until you have found the right final adjustement values.Proceede to the following Analog Input Channel and repeat the procedure described.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 16 - 630/05/99<strong>AL16AN</strong> <strong>Instruction</strong> Manual16.8 Temperature inputs with Pt100 sensorYou need an adjustable resistance reference 0.1....250 Ω with an accuracy of 0.1%.Connect the adjustable resistance in the following way:Analog input 0J600I-74SIGN-SIGN+I+737271Adjustable ResistanceReferenceThe following temperatures correspond to the resistance values given in the table(DIN 43 760) below:°C Ω Diff.-30 88.22 0.39-25 90.19 0.39-20 92.16 0.39-15 94.12 0.39-10 96.09 0.39-5 98.04 0.390 100 0.395 101.95 0.3910 103.90 0.3915 105.85 0.3920 107.79 0.3925 109.73 0.3830 111.67 0.3935 113.61 0.3940 115.54 0.3945 117.47 0.3950 119.40 0.3955 121.32 0.3960 123.24 0.3865 125.16 0.3970 127.07 0.3875 128.98 0.3880 130.89 0.3885 132.80 0.3890 134.70 0.3895 136.60 0.38100 138.50 0.38105 140.39 0.37110 142.29 0.39115 144.17 0.37120 146.06 0.38125 147.94 0.37°C Ω Diff.130 149.82 0.37135 151.70 0.37140 153.58 0.38145 155.45 0.38150 157.31 0.37155 159.18 0.37160 161.04 0.37165 162.90 0.37170 164.76 0.37175 166.61 0.37180 168.46 0.37185 170.31 0.37190 172.16 0.37195 174.00 0.37200 175.84 0.37205 177.68 0.37210 179.51 0.37215 181.34 0.37220 183.17 0.37225 184.99 0.36230 186.82 0.37235 188.63 0.36240 190.45 0.36245 192.26 0.36250 194.07 0.36255 195.88 0.36260 197.69 0.36265 199.49 0.36270 201.29 0.36275 203.08 0.36280 204.88 0.36285 206.67 0.36<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 16 - 730/05/99°C Ω Diff.290 208.45 0.35295 210.24 0.36300 212.02 0.36305 213.80 0.36310 215.57 0.35315 217.35 0.36320 219.12 0.36325 220.88 0.35330 222.65 0.36335 224.41 0.35340 226.17 0.36345 227.92 0.35350 229.67 0.35°C Ω Diff.355 231.42 0.35360 233.17 0.35365 234.91 0.35370 236.65 0.34375 238.39 0.35380 240.13 0.35385 241.86 0.35390 243.59 0.35395 245.31 0.34400 247.04 0.35405 248.76 0.35410 250.48 0.35The PT100 sensor is a non linear sensor. The characteristic temperature/resistancecurve for a PT100 sensor is shown in the figure.RO<strong>FF</strong>SET10%The curve is here exaggered.The non linearity of the sensoris reduced in the AL16.GAIN90% °CIn order to make the adjustment of the PT100 input as accurate as possible over themeasurement range different adjustment points have to be used. Instead of adjustningthe O<strong>FF</strong>SET at the lowest value we use a 10 % point as the adjustement point for thelow end of the measurement range. In the same way we use the 90% point as the adjustmentpoint for the high value. This increases the overall accuracy.<strong>FF</strong>-<strong>Automation</strong> Oy


Page 16 - 830/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualIn the following table you have the adjustment points calculated for the different standardmeasurement ranges available:PT100:Module Temp.range Resolution O<strong>FF</strong>SET Resist GAIN Resistnumber (°C) (°C) Point value Point value<strong>AL16AN</strong> AL32EXA 10 % (W) 90 % (W)(°C)(°C)901054 -40 .. +87.5 0.125 0.50 -27 89.40 +75 128.98901050 0 .. +127.5 0.125 0.50 +13 105.07 +115 144.17901074 -55 .. +200 0.25 1.0 -30 88.22 +175 166.61901052 0 .. +255 0.25 1.0 +26 110.12 +230 186.82901076 +125 .. +380 0.25 1.0 +151 157.69 +355 231.42901097 0 .. +102.3 0.10 0.40 +10 103.90 +92 135.46901098 -40 .. +62.3 0.10 0.40 -30 88.22 +52 120.16901099 -50 .. +461.5 0.50 2.0 +2 100.78 +410 250.48On the PC you should see the following values when the adjustment is correct:O<strong>FF</strong>SET GAIN10 % 90 %<strong>AL16AN</strong> 102 922AL32EXA 26 2301 Select from the decade resistor the value corresponding tothe O<strong>FF</strong>SET Point (10 % of the full range)2 Adjust the O<strong>FF</strong>SET point by turning the P201 potentiometer(Note! This refers to the Analog Input # 0. For other inputs checkthe number of the potentiometer in the table below). You can checkthe measured value in the PC by comparing with the table above.3 Adjust the decade resistor to the gain point (90 % of the full range).4 Adjust the GAIN by turning the potentiometer P207 until you can seethe value corresponding to the GAIN Point in the PC.5 Now go back to the O<strong>FF</strong>SET adjustment (see point 2 above) and repeatthe procedures described in point 2,3 and 4.Note! The adjustment of the GAIN effects the adjustment of the O<strong>FF</strong>SET. You have to repeat the adjustmentprocedure a couple of times until you have found the right final adjustement values.Proceede to the following Analog Input Channel and repeat the procedure described.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> ManualPage 16 - 930/05/9916.9 Temperature inputs with KTY10 sensor (Thermistor) (PTC)You need an adjustable resistance reference 0.1....4999 Ω with an accuracy of 0.1%.Connect the adjustable resistance in the following way:Analog input 0J600I-74SIGN-SIGN+I+737271Adjustable ResistanceReferenceThe following temperatures correspond to the resistance values given in the table below:°C Ω-50 1068-45 1112-40 1159-35 1208-30 1261-25 1316-20 1373-15 1434-10 1496-5 15620 16295 169910 177115 184520 192225 200030 208035 216240 224645 233250 2419°C Ω55 250860 259865 269070 278375 287780 297385 307090 316895 3266100 3366105 3467110 3568115 3670120 3772125 3876130 3979135 4083140 4188145 4293150 4397RThe KTY10 sensor is a nonlinear sensor. The characteristictemperature/resistancecurve for a KTY10 sensor isshown in the figure.The curve is here exaggered.The non linearity of the sensoris reduced in the AL16.O<strong>FF</strong>SET10%GAIN90%°C<strong>FF</strong>-<strong>Automation</strong> Oy


Page 16 - 1030/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualIn order to make the adjustment of the KTY10 input as accurate as possible over themeasurement range different adjustment points have to be used. Instead of adjustningthe O<strong>FF</strong>SET at the lowest value we use a 10 % point as the adjustement point for thelow end of the measurement range. In the same way we use the 90 % point as the adjustmentpoint for the high value. This increases the overall accuracy.In the following table you have the adjustment points calculated for the different standardmeasurement ranges available:KTY10:Module Temp.range Resolution O<strong>FF</strong>SET Resist GAIN Resistnumber (°C) (°C) Point value Point value<strong>AL16AN</strong> AL32EXA 10 % (W) 90 % (W)(°C)(°C)901090 -20 .. +107.5 0.125 0.5 -7.3 1496 +94 3266901092 -40 .. +87.5 0.125 0.5 -27 1316 +75 2877901094 0 .. +102.3 0.1 0.4 +10 1771 +92 3168901095 -40 .. +62.3 0.1 0.4 -30 1261 +52 2419901096 -40 .. +164.7 0.2 0.8 -20 1373 +144 4293On the PC you should see the following values when the adjustment is correct:O<strong>FF</strong>SET GAIN10 % 90 %<strong>AL16AN</strong> 102 922AL32EXA 26 2301 Select from the decade resistor the value corresponding tothe O<strong>FF</strong>SET Point (10 % of the full range)2 Adjust the O<strong>FF</strong>SET point by turning the P201 potentiometer(Note! This refers to the Analog Input # 0. For other inputs checkthe number of the potentiometer in the table below). You can checkthe measured value in the PC by comparing with the table above.3 Adjust the decade resistor to the gain point (90 % of the full range).4 Adjust the GAIN by turning the potentiometer P207 until you can seethe value corresponding to the GAIN Point in the PC.5 Now go back to the O<strong>FF</strong>SET adjustment (see point 2 above) and repeatthe procedures described in point 2,3 and 4.Note! The adjustment of the GAIN effects the adjustment of the O<strong>FF</strong>SET. You have to repeat the adjustmentprocedure a couple of times until you have found the right final adjustement values.Proceede to the following Analog Input Channel and repeat the procedure described.<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page A-130/05/99A. DIMENSIONAL DRAWINGS25Condensator, tallestcomponent on the board16160Ribbon cable connectorfor expansion boardJ101J9J8J12155SW1IC4IC2BATB1F16 5LD17IC1IC3RS485 moduleLD25103186200205224J16J607LD24J206J606LD32Figure A.1 Dimensions of AL20AN<strong>FF</strong>-<strong>Automation</strong> Oy


Page A-230/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualRibbon cableconnector, tallestcomponent on board1624160155Ribbon cableconnector forbasic board55135140Figure A.2 Dimensions of expansion board AL32EXRibbon cableconnector, tallestcomponent on board1624160155Ribbon cableconnector forbasic board55135140Figure A.3 Dimensions of expansion board AL32EXA<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page A-330/05/99Figure A.4 Dimensions of expansion board AL32EXOFigure A.5 Dimensions of display/keypad unit AL1094Figure A.6 Dimensions of display/keypad unit 1094R<strong>FF</strong>-<strong>Automation</strong> Oy


Page A-430/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualFigure A.7 Dimensions of display/keypad unit AL 1094A<strong>FF</strong>igure A.8 Dimensions of display/keypad unit AL1093D<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page A-530/05/99Display CutoutFigure A.9 Dimensions of display/keypad unit AL1093FDisplay CutoutFigure A.10 Dimensions of display/keypad unit AL1095A<strong>FF</strong>-<strong>Automation</strong> Oy


Page A-630/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualDisplay CutoutFigure A.11 Dimensions of display/keypad unit AL1095BCutout:180.0±0.2 x 132.4±0.2Figure A.12 Dimensions of graphic display - keypad/touchscreen unit AL1096S/T<strong>FF</strong>-<strong>Automation</strong> Oy


<strong>AL16AN</strong> <strong>Instruction</strong> Manual Page A-730/05/99Cutout:193.6±0.3 x 151.8±0.3Figure A.12 Dimensions of graphic display - touchscreen unit AL1096PS/PE<strong>FF</strong>-<strong>Automation</strong> Oy


Page A-830/05/99<strong>AL16AN</strong> <strong>Instruction</strong> ManualFigure A.14 Dimensions of AL9624/3.5 power supplyFigure A.15 Dimensions of AL9624/8 power supply<strong>FF</strong>-<strong>Automation</strong> Oy

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!