Manual – IPOSplus®
11
Contents
22 Assembler – Programming ............................................................................ 288
22.1 Basics ..................................................................................................... 288
22.1.1 Program header....................................................................... 288
22.1.2 Task 1 / Task 2 / Task 3 .......................................................... 288
22.1.3 Comments ............................................................................... 288
22.1.4 Program branches ................................................................... 288
22.1.5 Subroutine system ................................................................... 288
22.1.6 Program loops ......................................................................... 289
22.1.7 Positioning commands............................................................. 289
22.1.8 Binary/analog inputs/outputs ................................................... 289
22.1.9 Access to system values/parameters ...................................... 289
22.1.10 Variables.................................................................................. 290
22.1.11 Program line ............................................................................ 290
22.2 Binary inputs/outputs .............................................................................. 291
22.2.1 Binary inputs............................................................................ 291
22.2.2 Binary outputs.......................................................................... 293
22.3 Analog inputs/outputs ............................................................................. 296
22.3.1 Reading analog inputs/outputs ................................................ 296
22.3.2 Setting analog outputs ............................................................. 296
23 Assembler – Commands ................................................................................ 297
23.1 General information ................................................................................ 297
23.2 Overview of commands .......................................................................... 297
23.2.1 Arithmetic commands .............................................................. 297
23.2.2 Bit commands.......................................................................... 298
23.2.3 Communication commands ..................................................... 298
23.2.4 Positioning commands............................................................. 299
23.2.5 Program commands ................................................................ 299
23.2.6 Set commands......................................................................... 300
23.2.7 Special unit commands............................................................ 300
23.2.8 Comparison commands........................................................... 301
23.3 Arithmetic commands ............................................................................. 302
23.3.1 Fundamental operations ADD / SUB / MUL / DIV ................... 302
23.3.2 Auxiliary arithmetic functions NOT / MOD ............................... 303
23.3.3 Logical operations AND / OR / XOR........................................ 304
23.3.4 SHIFT commands SHL / SHR / ASHR .................................... 305
23.4 Bit commands ......................................................................................... 307
23.4.1 Bit commands BSET / BCLR / BMOV / BMOVN ..................... 307
23.5 Communication commands .................................................................... 309
23.5.1 MOVLNK.................................................................................. 309
23.5.2 MOVCOM ................................................................................ 314
23.5.3 MOVON ................................................................................... 315
23.5.4 SCOM...................................................................................... 316
23.5.5 SCOMON................................................................................. 321
23.5.6 SCOMST ................................................................................. 322