Modicon Ladder Logic Block Library User Guide Volume 2 · 2011-07-05 · 043505766.81 Modicon...
Transcript of Modicon Ladder Logic Block Library User Guide Volume 2 · 2011-07-05 · 043505766.81 Modicon...
0435
0576
6.81
ModiconLadder Logic Block Library User GuideVolume 2840 USE 101 00
4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ii
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
iii
Table of Contents
Safety Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xxvii
About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
Part I General Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Chapter 1 Ladder Logic Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3Segments and Networks in Ladder Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4How a PLC Solves Ladder Logic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Ladder Logic Elements and Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Chapter 2 Memory Allocation in a PLC . . . . . . . . . . . . . . . . . . . . . . . . . . .15User Memory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16State RAM Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18State RAM Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20The Configuration Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22The I/O Map Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Chapter 3 Ladder Logic Opcodes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27Translating Ladder Logic Elements in the System Memory Database . . . . . . . . 28Translating DX Instructions in the System Memory Database . . . . . . . . . . . . . . 30Opcode Defaults for Loadables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Chapter 4 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35Parameter Assignment of Instuctions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
iv
Chapter 5 Instruction Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Instruction Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38ASCII Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Counters and Timers Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Fast I/O Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Loadable DX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Matrix Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Move Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Skips/Specials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Special Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Coils, Contacts and Interconnects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Chapter 6 Equation Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Equation Network Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Mathematical Equations in Equation Networks . . . . . . . . . . . . . . . . . . . . . . . . . . 55Mathematical Operations in Equation Networks . . . . . . . . . . . . . . . . . . . . . . . . . 59Mathematical Functions in Equation Networks . . . . . . . . . . . . . . . . . . . . . . . . . . 64Data Conversions in an Equation Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66Roundoff Differences in PLCs without a Math Coprocessor . . . . . . . . . . . . . . . . 68Benchmark Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Chapter 7 Closed Loop Control / Analog Values . . . . . . . . . . . . . . . . . . . 71Closed Loop Control / Analog Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72PCFL Subfunctions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73A PID Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77PID2 Level Control Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Chapter 8 Formatting Messages for ASCII READ/WRIT Operations . . . 83Formatting Messages for ASCII READ/WRIT Operations . . . . . . . . . . . . . . . . . . 84Format Specifiers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Special Set-up Considerations for Control/Monitor Signals Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Chapter 9 Coils, Contacts and Interconnects. . . . . . . . . . . . . . . . . . . . . . 91Coils . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Contacts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Interconnects (Shorts) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Chapter 10 Interrupt Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Chapter 11 Subroutine Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
v
Chapter 12 Installation of DX Loadables . . . . . . . . . . . . . . . . . . . . . . . . . .101
Part II Instruction Descriptions (A to D) . . . . . . . . . . . . . . . . . 103
Chapter 13 1X3X - Input Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105Short Description: 1X3X - Input Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106Representation: 1X3X - Input Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Chapter 14 AD16: Ad 16 Bit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110Representation: AD16 - 16-bit Addition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Chapter 15 ADD: Addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114Representation: ADD - Single Precision Add . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Chapter 16 AND: Logical And . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118Representation: AND - Logical And . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Chapter 17 BCD: Binary to Binary Code . . . . . . . . . . . . . . . . . . . . . . . . . .123Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Representation: BCD - Binary Coded Decimal Conversion . . . . . . . . . . . . . . . 125
Chapter 18 BLKM: Block Move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128Representation: BLKM - Block Move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Chapter 19 BLKT: Block to Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Representation: BLKT - Block-to-Table Move. . . . . . . . . . . . . . . . . . . . . . . . . . 133Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Chapter 20 BMDI: Block Move with Interrupts Disabled . . . . . . . . . . . . .135Short Description: BMDI - Block Move Interrupts Disabled. . . . . . . . . . . . . . . . 136Representation: BMDI - Block Move Interrupts Disabled . . . . . . . . . . . . . . . . . 137
Chapter 21 BROT: Bit Rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140Representation: BROT - Bit Rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
vi
Chapter 22 CALL: Activate Immediate or Deferred DX Function . . . . . . 143Short Description: CALL - Activate Immediate or Deferred DX Function. . . . . . 144Representation: CALL - Activate Immediate DX Function . . . . . . . . . . . . . . . . . 145Representation: CALL - Activate Deferred DX Function . . . . . . . . . . . . . . . . . . 148
Chapter 23 CANT - Interpret Coils, Contacts, Timers, Counters, and the SUB Block. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151Short Description: CANT - Interpret Coils, Contacts, Timers, Counters, and the SUB Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152Representation: CANT - Interpret Coils, Contacts, Timers, Counters, and the SUB Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153Parameter Description: CANT - Interpret Coils, Contacts, Timers, Counters, and the SUB Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Chapter 24 CHS: Configure Hot Standby . . . . . . . . . . . . . . . . . . . . . . . . . 157Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158Representation: CHS - Configure Hot Standby . . . . . . . . . . . . . . . . . . . . . . . . . 159Detailed Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Chapter 25 CKSM: Check Sum. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164Representation: CKSM - Checksum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Chapter 26 CMPR: Compare Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168Representation: CMPR - Logical Compare . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Chapter 27 Coils . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171Short Description: Coils . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172General Usage Guidelines: Coils. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Chapter 28 COMM - ASCII Communications Function . . . . . . . . . . . . . . 175Short Description: COMM - ASCII Communications Block . . . . . . . . . . . . . . . . 176Representation: COMM - ASCII Communications Function . . . . . . . . . . . . . . . 177
Chapter 29 COMP: Complement a Matrix . . . . . . . . . . . . . . . . . . . . . . . . . 179Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180Representation: COMP - Logical Compliment . . . . . . . . . . . . . . . . . . . . . . . . . . 181Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Chapter 30 Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185Short Description: Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186Representation: Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
vii
Chapter 31 CONV - Convert Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189Short Description: CONV - Convert Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190Representation: CONV - Convert Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Chapter 32 CTIF - Counter, Timer, and Interrupt Function. . . . . . . . . . . .193Short Description: CTIF - Counter, Timer, and Interrupt Function . . . . . . . . . . 194Representation: CTIF - Counter, Timer, Interrupt Function. . . . . . . . . . . . . . . . 195Parameter Description: CTIF - Register Usage Table (Top Node) . . . . . . . . . . 196
Chapter 33 DCTR: Down Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .203Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204Representation: DCTR - Down Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Chapter 34 DIOH: Distributed I/O Health . . . . . . . . . . . . . . . . . . . . . . . . . .207Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208Representation: DIOH - Distributed I/O Health . . . . . . . . . . . . . . . . . . . . . . . . . 209Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Chapter 35 DISA - Disabled Discrete Monitor. . . . . . . . . . . . . . . . . . . . . .213Short Description: DISA - Disabled Discrete Monitor . . . . . . . . . . . . . . . . . . . . 214Representation: DISA - Disabled Discrete Monitor . . . . . . . . . . . . . . . . . . . . . . 215
Chapter 36 DIV: Divide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218Representation: DIV - Single Precision Division . . . . . . . . . . . . . . . . . . . . . . . . 219Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Chapter 37 DLOG: Data Logging for PCMCIA Read/Write Support. . . . .223Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224Representation: DLOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226Run Time Error Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Chapter 38 DMTH - Double Precision Math . . . . . . . . . . . . . . . . . . . . . . . .229Short Description: DMTH - Double Precision Math - Addition, Subtraction, Multiplication, and Division. . . . . . . . . . . . . . . . . . . . . . . 230Representation: DMTH - Double Precision Math - Addition, Subtraction, Multiplication, and Division. . . . . . . . . . . . . . . . . . . . . . . 231
Chapter 39 DRUM: DRUM Sequencer. . . . . . . . . . . . . . . . . . . . . . . . . . . . .237Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238Representation: DRUM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
viii
Chapter 40 DV16: Divide 16 Bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244Representation: DV16 - 16-bit Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Part III Instruction Descriptions (E) . . . . . . . . . . . . . . . . . . . . . .249
Chapter 41 EARS - Event/Alarm Recording System . . . . . . . . . . . . . . . . 251Short Description: EARS - Event/Alarm Recording System . . . . . . . . . . . . . . . 252Representation: EARS - Event/Alarm Recording System . . . . . . . . . . . . . . . . . 253Parameter Description: EARS - Event/Alarm Recording System . . . . . . . . . . . 255
Chapter 42 EMTH: Extended Math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260Representation: EMTH - Extended Math Functions . . . . . . . . . . . . . . . . . . . . . 261Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262Floating Point EMTH Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Chapter 43 EMTH-ADDDP: Double Precision Addition . . . . . . . . . . . . . . 265Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266Representation: EMTH - ADDDP - Double Precision Math - Addition . . . . . . . . 267Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Chapter 44 EMTH-ADDFP: Floating Point Addition . . . . . . . . . . . . . . . . . 271Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272Representation: EMTH - ADDFP - Floating Point Math - Addition. . . . . . . . . . . 273Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Chapter 45 EMTH-ADDIF: Integer + Floating Point Addition. . . . . . . . . . 275Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276Representation: EMTH - ADDIF - Integer + Floating Point Addition . . . . . . . . . 277Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Chapter 46 EMTH-ANLOG: Base 10 Antilogarithm . . . . . . . . . . . . . . . . . 279Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280Representation: EMTH - ANLOG - integer Base 10 Antilogarithm . . . . . . . . . . 281Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Chapter 47 EMTH-ARCOS: Floating Point Arc Cosine of an Angle (in Radians) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286Representation: EMTH - ARCOS - Floating Point Math - Arc Cosine of an Angle (in Radians) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ix
Chapter 48 EMTH-ARSIN: Floating Point Arcsine of an Angle (in Radians) . . . . . . . . . . . . . . . . . . . . . .291Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292Representation: EMTH - ARSIN - Arcsine of an Angle (in Radians). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Chapter 49 EMTH-ARTAN: Floating Point Arc Tangent of an Angle (in Radians) . . . . . . . . . . . . . . . . . . . . . .295Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296Representation: Floating Point Math - Arc Tangent of an Angle (in Radians) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Chapter 50 EMTH-CHSIN: Changing the Sign of a Floating Point Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302Representation: EMTH - CHSIN - Change the Sign of aFloating Point Number. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Chapter 51 EMTH-CMPFP: Floating Point Comparison . . . . . . . . . . . . . .307Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308Representation: EMTH - CMFPF - Floating Point Math Comparison . . . . . . . . 309Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Chapter 52 EMTH-CMPIF: Integer-Floating Point Comparison . . . . . . . .313Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314Representation: EMTH - CMPIF - Floating Point Math - Integer/Floating Point Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Chapter 53 EMTH-CNVDR: Floating Point Conversion of Degrees to Radians . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .319Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320Representation: EMTH - CNVDR - Conversion of Degrees to Radians. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Chapter 54 EMTH-CNVFI: Floating Point to Integer Conversion . . . . . . .325Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326Representation: EMTH - CNVFI - Floating Point to Integer Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329Runtime Error Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
x
Chapter 55 EMTH-CNVIF: Integer-to-Floating Point Conversion . . . . . . 331Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332Representation: EMTH - CNVIF - Integer to Floating Point Conversion . . . . . . 333Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335Runtime Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Chapter 56 EMTH-CNVRD: Floating Point Conversion of Radians to Degrees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338Representation: EMTH - CNVRD - Conversion of Radians to Degrees . . . . . . 339Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Chapter 57 EMTH-COS: Floating Point Cosine of an Angle (in Radians) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344Representation: EMTH - COS - Cosine of an Angle (in Radians) . . . . . . . . . . . 345Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Chapter 58 EMTH-DIVDP: Double Precision Division . . . . . . . . . . . . . . . 347Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348Representation: EMTH - DIVDP - Double Precision Math - Division . . . . . . . . . 349Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351Runtime Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
Chapter 59 EMTH-DIVFI: Floating Point Divided by Integer . . . . . . . . . . 353Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354Representation: EMTH - DIVFI - Floating Point Divided by Integer. . . . . . . . . . 355Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
Chapter 60 EMTH-DIVFP: Floating Point Division . . . . . . . . . . . . . . . . . . 357Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358Representation: EMTH - DIVFP - Floating Point Division . . . . . . . . . . . . . . . . . 359Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
Chapter 61 EMTH-DIVIF: Integer Divided by Floating Point . . . . . . . . . . 361Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362Representation: EMTH - DIVIF - Integer Divided by Floating Point. . . . . . . . . . 363Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
Chapter 62 EMTH-ERLOG: Floating Point Error Report Log. . . . . . . . . . 365Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366Representation: EMTH - ERLOG - Floating Point Math - Error Report Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
xi
Chapter 63 EMTH-EXP: Floating Point Exponential Function . . . . . . . . .371Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372Representation: EMTH - EXP - Floating Point Math - Exponential Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Chapter 64 EMTH-LNFP: Floating Point Natural Logarithm. . . . . . . . . . .377Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378Representation: EMTH - LNFP - Natural Logarithm . . . . . . . . . . . . . . . . . . . . . 379Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Chapter 65 EMTH-LOG: Base 10 Logarithm . . . . . . . . . . . . . . . . . . . . . . .383Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384Representation: EMTH - LOG - Integer Math - Base 10 Logarithm . . . . . . . . . 385Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Chapter 66 EMTH-LOGFP: Floating Point Common Logarithm. . . . . . . .389Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390Representation: EMTH - LOGFP - Common Logarithm . . . . . . . . . . . . . . . . . . 391Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Chapter 67 EMTH-MULDP: Double Precision Multiplication . . . . . . . . . .395Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396Representation: EMTH - MULDP - Double Precision Math - Multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Chapter 68 EMTH-MULFP: Floating Point Multiplication . . . . . . . . . . . . .401Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402Representation: EMTH - MULFP - Floating Point - Multiplication . . . . . . . . . . . 403Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Chapter 69 EMTH-MULIF: Integer x Floating Point Multiplication . . . . . .405Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406Representation: EMTH - MULIF - Integer Multiplied by Floating Point . . . . . . . 407Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
Chapter 70 EMTH-PI: Load the Floating Point Value of "Pi" . . . . . . . . . .411Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412Representation: EMTH - PI - Floating Point Math - Load the Floating Point Value of PI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
xii
Chapter 71 EMTH-POW: Raising a Floating Point Number to an Integer Power . . . . . . . . . . . . . . . . . . . . . . . . . . 417Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418Representation: EMTH - POW - Raising a Floating Point Number to an Integer Power. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
Chapter 72 EMTH-SINE: Floating Point Sine of an Angle (in Radians) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424Representation: EMTH - SINE - Floating Point Math - Sine of an Angle (in Radians) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
Chapter 73 EMTH-SQRFP: Floating Point Square Root. . . . . . . . . . . . . . 429Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430Representation: EMTH - SQRFP - Square Root . . . . . . . . . . . . . . . . . . . . . . . . 431Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
Chapter 74 EMTH-SQRT: Floating Point Square Root . . . . . . . . . . . . . . . 435Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436Representation: EMTH - SQRT - Square Root . . . . . . . . . . . . . . . . . . . . . . . . . 437Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
Chapter 75 EMTH-SQRTP: Process Square Root. . . . . . . . . . . . . . . . . . . 441Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442Representation: EMTH - SQRTP - Double Precision Math - Process Square Root. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
Chapter 76 EMTH-SUBDP: Double Precision Subtraction . . . . . . . . . . . 447Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448Representation: EMTH - SUBDP - Double Precision Math - Subtraction . . . . . 449Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
Chapter 77 EMTH-SUBFI: Floating Point - Integer Subtraction . . . . . . . 453Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454Representation: EMTH - SUBFI - Floating Point minus Integer. . . . . . . . . . . . . 455Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
Chapter 78 EMTH-SUBFP: Floating Point Subtraction . . . . . . . . . . . . . . 457Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458Representation: EMTH - SUBFP - Floating Point - Subtraction. . . . . . . . . . . . . 459Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
xiii
Chapter 79 EMTH-SUBIF: Integer - Floating Point Subtraction . . . . . . . .461Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462Representation: EMTH - SUBIF - Integer minus Floating Point . . . . . . . . . . . . 463Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
Chapter 80 EMTH-TAN: Floating Point Tangent of an Angle (in Radians) . . . . . . . . . . . . . . . . . . . . . .465Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466Representation: EMTH - TAN - Tangent of an Angle (in Radians) . . . . . . . . . . 467Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
Chapter 81 ESI: Support of the ESI Module. . . . . . . . . . . . . . . . . . . . . . . .469Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472READ ASCII Message (Subfunction 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475WRITE ASCII Message (Subfunction 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479GET DATA (Subfunction 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480PUT DATA (Subfunction 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482ABORT (Middle Input ON). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486Run Time Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
Chapter 82 EUCA: Engineering Unit Conversion and Alarms . . . . . . . . .489Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490Representation: EUCA - Engineering Unit and Alarm. . . . . . . . . . . . . . . . . . . . 491Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
Part IV Instruction Descriptions (F to N) . . . . . . . . . . . . . . . . . 501
Chapter 83 FIN: First In . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .503Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504Representation: FIN - First in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
Chapter 84 FOUT: First Out. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .507Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508Representation: FOUT - First Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
Chapter 85 FTOI: Floating Point to Integer . . . . . . . . . . . . . . . . . . . . . . . .513Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514Representation: FTOI - Floating Point to Integer Conversion . . . . . . . . . . . . . . 515
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
xiv
Chapter 86 GD92 - Gas Flow Function Block . . . . . . . . . . . . . . . . . . . . . . 517Short Description: GD92 - Gas Flow Function Block . . . . . . . . . . . . . . . . . . . . 518Representation: GD92 - Gas Flow Function Block . . . . . . . . . . . . . . . . . . . . . . 519Parameter Description - Inputs: GD92 - Gas Flow Function Block . . . . . . . . . . 521Parameter Description - Outputs: GD92 - Gas Flow Function Block . . . . . . . . . 528Parameter Description - Optional Outputs: GD92 - Gas Flow Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
Chapter 87 GFNX AGA#3 ‘85 and NX19 ‘68 Gas Flow Function Block. . 531Short Description: GFNX - Gas Flow Function Block . . . . . . . . . . . . . . . . . . . . 532Representation: GFNX - Gas Flow Function Block . . . . . . . . . . . . . . . . . . . . . . 533Parameter Description - Inputs: GFNX - Gas Flow Function Block . . . . . . . . . . 535Parameter Description - Outputs: GFNX - Gas Flow Function Block . . . . . . . . 542Parameter Description - Optional Outputs: GFNX - Gas Flow Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
Chapter 88 GG92 AGA #3 1992 Gross Method Gas Flow Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545Short Description: GG92 - Gas Flow Function Block. . . . . . . . . . . . . . . . . . . . . 546Representation: GG92 - Gas Flow Function Block . . . . . . . . . . . . . . . . . . . . . . 547Parameter Description - Inputs: GG92 - Gas Flow Function Block . . . . . . . . . . 549Parameter Description - Outputs: GG92 - Gas Flow Function Block. . . . . . . . . 555Parameter Description - Optional Outputs: GG92 - Gas Flow Function Block . 556
Chapter 89 GM92 AGA #3 and #8 1992 Detail Method Gas Flow Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557Short Description: GM92 - Gas Flow Function Block . . . . . . . . . . . . . . . . . . . . 558Representation: GM92 - Gas Flow Function Block . . . . . . . . . . . . . . . . . . . . . . 559Parameter Description - Inputs: GM92 - Gas Flow Function Block . . . . . . . . . . 561Parameter Description - Outputs: GM92 - Gas Flow Function Block. . . . . . . . . 568Parameter Description - Optional Outputs: GM92 - Gas Flow Function Block . 569
Chapter 90 G392 AGA #3 1992 Gas Flow Function Block . . . . . . . . . . . . 571Short Description: G392 - Gas Flow Function Block . . . . . . . . . . . . . . . . . . . . . 572Representation: G392 - Gas Flow Function Block. . . . . . . . . . . . . . . . . . . . . . . 573Parameter Description - Inputs: G392 - Gas Flow Function Block . . . . . . . . . . 575Parameter Description - Outputs: G392 - Gas Flow Function Block . . . . . . . . . 580Parameter Description - Optional Outputs: G392 - Gas Flow Function Block . . 581
Chapter 91 HLTH: History and Status Matrices . . . . . . . . . . . . . . . . . . . . 583Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584Representation: HLTH - System Health. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586Parameter Description Top Node (History Matrix) . . . . . . . . . . . . . . . . . . . . . . . 587Parameter Description Middle Node (Status Matrix) . . . . . . . . . . . . . . . . . . . . . 592Parameter Description Bottom Node (Length). . . . . . . . . . . . . . . . . . . . . . . . . . 596
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
xv
Chapter 92 HSBY - Hot Standby . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .597Short Description: HSBY - Hot Standby . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598Representation: HSBY - Hot Standby . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599Parameter Description Top Node: HSBY - Hot Standby. . . . . . . . . . . . . . . . . . 601Parameter Description Middle Node: HSBY - Hot Standby. . . . . . . . . . . . . . . . 602
Chapter 93 IBKR: Indirect Block Read . . . . . . . . . . . . . . . . . . . . . . . . . . . .603Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604Representation: IBKR - Indirect Block Read . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
Chapter 94 IBKW: Indirect Block Write . . . . . . . . . . . . . . . . . . . . . . . . . . .607Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608Representation: IBKW - Indirect Block Write. . . . . . . . . . . . . . . . . . . . . . . . . . . 609
Chapter 95 ICMP: Input Compare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .611Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612Representation: ICMP - Input Compare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614Cascaded DRUM/ICMP Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
Chapter 96 ID: Interrupt Disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .617Short Description: ID - Interrupt Disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618Representation: ID - Interrupt Disable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619Parameter Description: ID - Interrupt Disable . . . . . . . . . . . . . . . . . . . . . . . . . . 620
Chapter 97 IE: Interrupt Enable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .621Short Description: IE - Interrupt Enable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622Representation: IE - Interrupt Enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623Parameter Description: IE - Interrupt Enable . . . . . . . . . . . . . . . . . . . . . . . . . . 624
Chapter 98 IMIO: Immediate I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .625Short Description: IMIO - Immediate I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626Representation: IMIO - Immediate I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627Parameter Description: IMIO - Immediate I/O. . . . . . . . . . . . . . . . . . . . . . . . . . 628Run Time Error Handling: IMIO - Immediate I/O. . . . . . . . . . . . . . . . . . . . . . . . 630
Chapter 99 IMOD: Interrupt Module Instruction . . . . . . . . . . . . . . . . . . . .631Short Description: IMOD - Interrupt Module . . . . . . . . . . . . . . . . . . . . . . . . . . . 632Representation: IMOD - Interrupt Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633Parameter Description: IMOD - Interrupt Module . . . . . . . . . . . . . . . . . . . . . . . 635
Chapter 100 ITMR: Interrupt Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .639Short Description: ITMR - Interval Timer Interrupt . . . . . . . . . . . . . . . . . . . . . . 640Representation: ITMR - Interval Timer Interrupt . . . . . . . . . . . . . . . . . . . . . . . . 641Parameter Description: ITMR - Interval Timer Interrupt . . . . . . . . . . . . . . . . . . 643
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
xvi
Chapter 101 ITOF: Integer to Floating Point . . . . . . . . . . . . . . . . . . . . . . . . 645Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646Representation: ITOF - integer to Floating Point Conversion . . . . . . . . . . . . . . 647
Chapter 102 JSR: Jump to Subroutine . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650Representation: JSR - Jump to Subroutine . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651
Chapter 103 LAB: Label for a Subroutine . . . . . . . . . . . . . . . . . . . . . . . . . . 653Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654Representation: LAB - Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656
Chapter 104 LOAD: Load Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658Representation: LOAD - Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660
Chapter 105 MAP 3: MAP Transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662Representation: MAP 3 - Map Transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664
Chapter 106 MATH - Integer Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . 669Short Description: MATH - Integer Operations - Decimal Square Root, Process Square Root, Logarithm (base 10), and Antilogarithm (base 10) . . . . . . . . . . . . . . . . . . . . . . 670Representation: MATH - Integer Operations - Decimal Square Root, Process Square Root, Logarithm (base 10), and Antilogarithm (base 10) . . . . . . . . . . . . . . . . . . . . . . 671
Chapter 107 MBIT: Modify Bit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678Representation: MBIT - Logical Bit Modify. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680
Chapter 108 MBUS: MBUS Transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . 681Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682Representation: MBUS - Modbus II Transfer. . . . . . . . . . . . . . . . . . . . . . . . . . . 683Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684The MBUS Get Statistics Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
Chapter 109 MRTM: Multi-Register Transfer Module . . . . . . . . . . . . . . . . . 691Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692Representation: MRTM - Multi-Register Transfer Module . . . . . . . . . . . . . . . . . 693Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
xvii
Chapter 110 MSPX (Seriplex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .697Short Description: MSPX (Seriplex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698Representation: MSPX (Seriplex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699
Chapter 111 MSTR: Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .701Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703984LL MSTR Function Block. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707Write MSTR Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711READ MSTR Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713Get Local Statistics MSTR Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715Clear Local Statistics MSTR Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717Write Global Data MSTR Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719Read Global Data MSTR Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720Get Remote Statistics MSTR Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721Clear Remote Statistics MSTR Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723Peer Cop Health MSTR Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725Reset Option Module MSTR Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728Read CTE (Config Extension Table) MSTR Operation . . . . . . . . . . . . . . . . . . . 729Write CTE (Config Extension Table) MSTR Operation . . . . . . . . . . . . . . . . . . . 731Modbus Plus Network Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733TCP/IP Ethernet Statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738Run Time Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739Modbus Plus and SY/MAX Ethernet Error Codes. . . . . . . . . . . . . . . . . . . . . . . 740SY/MAX-specific Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742TCP/IP Ethernet Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744CTE Error Codes for SY/MAX and TCP/IP Ethernet. . . . . . . . . . . . . . . . . . . . . 747
Chapter 112 MU16: Multiply 16 Bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .747Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748Representation: MU16 - 16-Bit Multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . 749
Chapter 113 MUL: Multiply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .751Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 752Representation: MUL - Single Precision Multiplication . . . . . . . . . . . . . . . . . . . 753Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754
Chapter 114 NBIT: Bit Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .755Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756Representation: NBIT - Normal Bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757
Chapter 115 NCBT: Normally Closed Bit . . . . . . . . . . . . . . . . . . . . . . . . . . .759Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760Representation: NCBT - Bit Normally Closed . . . . . . . . . . . . . . . . . . . . . . . . . . 761
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
xviii
Chapter 116 NOBT: Normally Open Bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764Representation: NOBT - Bit Normally Open . . . . . . . . . . . . . . . . . . . . . . . . . . . 765
Chapter 117 NOL: Network Option Module for Lonworks . . . . . . . . . . . . . 767Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 768Representation: NOL - Network Option Module for Lonworks. . . . . . . . . . . . . . 769Detailed Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 770
Part V Instruction Descriptions (O to Q) . . . . . . . . . . . . . . . . . .773
Chapter 118 OR: Logical OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 775Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776Representation: OR - Logical Or . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 777Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779
Chapter 119 PCFL: Process Control Function Library . . . . . . . . . . . . . . . 781Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782Representation: PCFL - Process Control Function Library . . . . . . . . . . . . . . . . 783Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784
Chapter 120 PCFL-AIN: Analog Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788Representation: PCFL - AIN - Convert Inputs to Scaled Engineering Units. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790
Chapter 121 PCFL-ALARM: Central Alarm Handler . . . . . . . . . . . . . . . . . . 793Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794Representation: PCFL - ALRM - Central Alarm Handler for a P(v) Input. . . . . . 795Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796
Chapter 122 PCFL-AOUT: Analog Output . . . . . . . . . . . . . . . . . . . . . . . . . . 799Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800Representation: PCFL - AOUT - Convert Outputs to Values in the 0 through 4095 Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802
Chapter 123 PCFL-AVER: Average Weighted Inputs Calculate . . . . . . . . 803Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804Representation: PCFL - AVER - Average Weighted Inputs. . . . . . . . . . . . . . . . 805Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806
Chapter 124 PCFL-CALC: Calculated preset formula . . . . . . . . . . . . . . . . 809Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810Representation: PCFL - CALC - Calculate Present Formula. . . . . . . . . . . . . . . 811Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 812
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
xix
Chapter 125 PCFL-DELAY: Time Delay Queue . . . . . . . . . . . . . . . . . . . . . .815Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816Representation: PCFL - DELY - Time Delay Queue. . . . . . . . . . . . . . . . . . . . . 817Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818
Chapter 126 PCFL-EQN: Formatted Equation Calculator. . . . . . . . . . . . . .821Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822Representation: PCFL - EQN - Formatted Equation Calculator . . . . . . . . . . . . 823Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824
Chapter 127 PCFL-INTEG: Integrate Input at Specified Interval . . . . . . . .827Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 828Representation: PCFL - INTG - Integrate Input at Specified Interval . . . . . . . . 829Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830
Chapter 128 PCFL-KPID: Comprehensive ISA Non Interacting PID . . . . .831Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 832Representation: PCFL - KPID - Comprehensive ISA Non-Interacting Proportional-Integral-Derivative. . . . . . . . . . . . . . . . . . . . . . . . . . . . 833Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834
Chapter 129 PCFL-LIMIT: Limiter for the Pv . . . . . . . . . . . . . . . . . . . . . . . .837Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838Representation: PCFL - LIMIT - Limiter for the P(v) . . . . . . . . . . . . . . . . . . . . . 839Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840
Chapter 130 PCFL-LIMV: Velocity Limiter for Changes in the Pv . . . . . . .841Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842Representation: PCFL - LIMV - Velocity Limiter for Changes in the P(v) . . . . . 843Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844
Chapter 131 PCFL-LKUP: Look-up Table. . . . . . . . . . . . . . . . . . . . . . . . . . .845Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846Representation: PCFL - LKUP - Look-up Table . . . . . . . . . . . . . . . . . . . . . . . . 847Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848
Chapter 132 PCFL-LLAG: First-order Lead/Lag Filter . . . . . . . . . . . . . . . .851Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 852Representation: PCFL - LLAG - First-Order Lead/Lag Filter. . . . . . . . . . . . . . . 853Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854
Chapter 133 PCFL-MODE: Put Input in Auto or Manual Mode. . . . . . . . . .855Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856Representation: PCFL - MODE - Put Input in Auto or Manual Mode . . . . . . . . 857Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
xx
Chapter 134 PCFL-ONOFF: ON/OFF Values for Deadband . . . . . . . . . . . . 859Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 860Representation: PCFL - ONOFF - Specifies ON/OFF Values for Deadband. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862
Chapter 135 PCFL-PI: ISA Non Interacting PI . . . . . . . . . . . . . . . . . . . . . . . 865Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 866Representation: PCFL - PI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868
Chapter 136 PCFL-PID: PID Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . 871Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 872Representation: PCFL - PID - Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 874
Chapter 137 PCFL-RAMP: Ramp to Set Point at a Constant Rate . . . . . . 877Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 878Representation: PCFL - RAMP - Ramp to Set Point at Constant Rate . . . . . . . 879Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 880
Chapter 138 PCFL-RATE: Derivative Rate Calculation over a Specified Timeme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 883Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884Representation: PCFL - RATE - Derivative Rate Calculation Over a Specified Time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 886
Chapter 139 PCFL-RATIO: Four Station Ratio Controller . . . . . . . . . . . . . 887Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888Representation: PCFL - RATIO - Four-Station Ratio Controller . . . . . . . . . . . . 889Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890
Chapter 140 PCFL-RMPLN: Logarithmic Ramp to Set Point . . . . . . . . . . . 893Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 894Representation: PCFL - RMPLN - Logarithmic Ramp to Set Point . . . . . . . . . . 895Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896
Chapter 141 PCFL-SEL: Input Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . 897Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898Representation: PCFL - SEL - High/Low/Average Input Selection . . . . . . . . . . 899Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 900
Chapter 142 PCFL-TOTAL: Totalizer for Metering Flow . . . . . . . . . . . . . . 903Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 904Representation: PCFL - TOTAL - Totalizer for Metering Flow. . . . . . . . . . . . . . 905Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
xxi
Chapter 143 PEER: PEER Transaction. . . . . . . . . . . . . . . . . . . . . . . . . . . . .909Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 910Representation: PEER - Modbus II Identical Transfer . . . . . . . . . . . . . . . . . . . 911Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912
Chapter 144 PID2: Proportional Integral Derivative . . . . . . . . . . . . . . . . . .913Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 914Representation: PID2 - Proportional/Integral/Derivative . . . . . . . . . . . . . . . . . . 915Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 916Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919Run Time Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 924
Part VI Instruction Descriptions (R to Z) . . . . . . . . . . . . . . . . . 927
Chapter 145 R --> T: Register to Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . .929Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 930Representation: R T - Register to Table Move . . . . . . . . . . . . . . . . . . . . . . . 931Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 932
Chapter 146 RBIT: Reset Bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .933Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 934Representation: RBIT - Reset Bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 935
Chapter 147 READ: Read. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .937Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 938Representation: READ - Read ASCII Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . 939Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 940
Chapter 148 RET: Return from a Subroutine. . . . . . . . . . . . . . . . . . . . . . . .943Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 944Representation: RET - Return to Scheduled Logic . . . . . . . . . . . . . . . . . . . . . . 945
Chapter 149 RTTI - Register to Input Table . . . . . . . . . . . . . . . . . . . . . . . . .947Short Description: RTTI - Register to Input Table . . . . . . . . . . . . . . . . . . . . . . . 948Representation: RTTI - Register to Input Table . . . . . . . . . . . . . . . . . . . . . . . . 949
Chapter 150 RTTO - Register to Output Table. . . . . . . . . . . . . . . . . . . . . . .951Short Description: RTTO - Register to Output Table. . . . . . . . . . . . . . . . . . . . . 952Representation: RTTO - Register to Output Table . . . . . . . . . . . . . . . . . . . . . . 953
Chapter 151 RTU - Remote Terminal Unit . . . . . . . . . . . . . . . . . . . . . . . . . .955Short Description: RTU - Remote Terminal Unit . . . . . . . . . . . . . . . . . . . . . . . . 956Representation: RTU - Remote Terminal Unit . . . . . . . . . . . . . . . . . . . . . . . . . 957
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
xxii
Chapter 152 SAVE: Save Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 961Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 962Representation: SAVE - Save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 963Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 964
Chapter 153 SBIT: Set Bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 965Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 966Representation: SBIT - Set Bit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 967
Chapter 154 SCIF: Sequential Control Interfaces. . . . . . . . . . . . . . . . . . . . 969Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 970Representation: SCIF - Sequential Control Interface. . . . . . . . . . . . . . . . . . . . . 971Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 973
Chapter 155 SENS: Sense . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 975Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 976Representation: SENS - Logical Bit-Sense . . . . . . . . . . . . . . . . . . . . . . . . . . . . 977Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 978
Chapter 156 Shorts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 979Short Description: Shorts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 980Representation: Shorts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 981
Chapter 157 SKP - Skipping Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 983Short Description: SKP - Skipping Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . 984Representation: SKP - Skipping Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 985
Chapter 158 SRCH: Search. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 987Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 988Representation: SRCH - Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 989Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 991
Chapter 159 STAT: Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 993Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 994Representation: STAT - Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 995Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 996Description of the Status Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 997Controller Status Words 1 - 11 for Quantum and Momentum . . . . . . . . . . . . . 1001I/O Module Health Status Words 12 - 20 for Momentum. . . . . . . . . . . . . . . . . 1006I/O Module Health Status Words 12 - 171 for Quantum . . . . . . . . . . . . . . . . . 1008Communication Status Words 172 - 277 for Quantum . . . . . . . . . . . . . . . . . . 1010Controller Status Words 1 - 11 for TSX Compact and Atrium . . . . . . . . . . . . . 1016I/O Module Health Status Words 12 - 15 for TSX Compact. . . . . . . . . . . . . . . 1019Global Health and Communications Retry Status Words 182 ... 184 for TSX Compact. . . . . . . . . . . . . . . . . . . . . . . . . . . 1020
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
xxiii
Chapter 160 SU16: Subtract 16 Bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1021Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1022Representation: SU16 - 16-bit Subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . 1023
Chapter 161 SUB: Subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1025Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1026Representation: SUB - Subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1027
Chapter 162 SWAP - VME Bit Swap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1029Short Description: SWAP - VME Bit Swap . . . . . . . . . . . . . . . . . . . . . . . . . . . 1030Representation: SWAP - VME Bit Swap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1031
Chapter 163 TTR - Table to Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1033Short Description: TTR - Table to Register . . . . . . . . . . . . . . . . . . . . . . . . . . . 1034Representation: TTR - Table to Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1035
Chapter 164 T --> R Table to Register . . . . . . . . . . . . . . . . . . . . . . . . . . . .1037Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1038Representation: T R - Table to Register Move . . . . . . . . . . . . . . . . . . . . . . 1039Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1041
Chapter 165 T --> T: Table to Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1043Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1044Representation: T T - Table to Table Move . . . . . . . . . . . . . . . . . . . . . . . . 1045Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1047
Chapter 166 T.01 Timer: One Hundredth Second Timer. . . . . . . . . . . . . .1049Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1050Representation: T.01 - One Hundredth of a Second Timer. . . . . . . . . . . . . . . 1051
Chapter 167 T0.1 Timer: One Tenth Second Timer . . . . . . . . . . . . . . . . . .1053Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1054Representation: T0.1 - One Tenth of a Second Timer . . . . . . . . . . . . . . . . . . 1055
Chapter 168 T1.0 Timer: One Second Timer . . . . . . . . . . . . . . . . . . . . . . .1057Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1058Representation: T1.0 - One Second Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . 1059
Chapter 169 T1MS Timer: One Millisecond Timer. . . . . . . . . . . . . . . . . . .1061Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1062Representation: T1MS - One Millisecond Timer . . . . . . . . . . . . . . . . . . . . . . . 1063Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1064
Chapter 170 TBLK: Table to Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1067Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1068Representation: TBLK - Table-to-Block Move. . . . . . . . . . . . . . . . . . . . . . . . . 1069Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1071
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
xxiv
Chapter 171 TEST: Test of 2 Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1073Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1074Representation: TEST - Test of 2 Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1075
Chapter 172 UCTR: Up Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1077Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1078Representation: UCTR - Up Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1079
Chapter 173 VMER - VME Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1081Short Description: VMER - VME Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1082Representation: VMER - VME Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1083Parameter Description: VMER - VME Read . . . . . . . . . . . . . . . . . . . . . . . . . . 1084
Chapter 174 VMEW - VME Write. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1085Short Description: VMEW - VME Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1086Representation: VMEW - VME Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1087Parameter Description: VMEW - VME Write . . . . . . . . . . . . . . . . . . . . . . . . . . 1089
Chapter 175 WRIT: Write. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1091Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1092Representation: WRIT - Write ASCII Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1093Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1094
Chapter 176 XMIT - Transmit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1097General Description: XMIT - Transmit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1098XMIT Modbus Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1099
Chapter 177 XMIT Communication Block . . . . . . . . . . . . . . . . . . . . . . . . . 1105Short Description: XMIT Communication Block . . . . . . . . . . . . . . . . . . . . . . . . 1106Representation: XMIT Communication Block . . . . . . . . . . . . . . . . . . . . . . . . . 1107Parameter Description: Middle Node - Communication Control Table . . . . . . 1109Parameter Description: XMIT Communication Block. . . . . . . . . . . . . . . . . . . . 1114Parameter Description: XMIT Communications Block . . . . . . . . . . . . . . . . . . . 1116
Chapter 178 XMIT Port Status Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1117Short Description: XMIT Port Status Block . . . . . . . . . . . . . . . . . . . . . . . . . . . 1118Representation: XMIT Port Status Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1119Parameter Description: Middle Node - XMIT Conversion Block . . . . . . . . . . . 1121
Chapter 179 XMIT Conversion Block. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1125Short Description: XMIT Conversion Block . . . . . . . . . . . . . . . . . . . . . . . . . . . 1126Representation: XMIT Conversion Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1127Parameter Description: XMIT Conversion Block . . . . . . . . . . . . . . . . . . . . . . . 1129
Chapter 180 XMRD: Extended Memory Read . . . . . . . . . . . . . . . . . . . . . . 1133Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1134Representation: XMRD - Extended Memory Read . . . . . . . . . . . . . . . . . . . . . 1135Parameter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1136
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
xxv
Chapter 181 XMWT: Extended Memory Write . . . . . . . . . . . . . . . . . . . . . .1139Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1140Representation: XMWT - Extended Memory Write . . . . . . . . . . . . . . . . . . . . . 1141Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1142
Chapter 182 XOR: Exclusive OR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1145Short Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1146Representation: XOR - Boolean Exclusive Or. . . . . . . . . . . . . . . . . . . . . . . . . 1147Parameter Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1149
Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1151Optimizing RIO Performance with the Segment Scheduler . . . . . . . . . . . . . . 1151
Appendix A Appendix A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1153Optimizing RIO Peformance with the Segment Scheduler . . . . . . . . . . . . . . . 1153Scan Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1154How to Measure Scan Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1158Maximizing Throughput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1159Order of Solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1161Using Segment Scheduler to Improve Critical I/O Throughput . . . . . . . . . . . . 1162Using Segment Scheduler to Improve System Performance . . . . . . . . . . . . . 1164Using Segment Scheduler to Improve Communication Port Servicing . . . . . . 1165Sweep Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1166
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxi
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . lv
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
xxvi
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 xxvii
§Safety Information
NOTICE Read these instructions carefully, and look at the equipment to become familiar with the device before trying to install, operate, or maintain it. The following special messages may appear throughout this documentation or on the equipment to warn of potential hazards or to call attention to information that clarifies or simplifies a procedure.
PLEASE NOTE Electrical equipment should be installed, operated, serviced, and maintained only by qualified personnel. No responsibility is assumed by Schneider Electric for any consequences arising out of the use of this material.
© 2006 Schneider Electric. All Rights Reserved.
The addition of this symbol to a Danger or Warning safety label indicatesthat an electrical hazard exists, which will result in personal injury if theinstructions are not followed.
This is the safety alert symbol. It is used to alert you to potential personalinjury hazards. Obey all safety messages that follow this symbol to avoidpossible injury or death.
DANGER indicates an imminently hazardous situation, which, if not avoided, will result in death or serious injury.
DANGER
WARNING indicates a potentially hazardous situation, which, if not avoided, can result in death, serious injury, or equipment damage.
WARNING
CAUTION indicates a potentially hazardous situation, which, if not avoided, can result in injury or equipment damage.
CAUTION
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Safety Information
xxviii 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 xxix
About the Book
At a Glance
Document Scope This documentation will help you configure LL 984 instructions to any controller using ProWorx NxT, ProWorx 32 or Modbus Plus. Examples in this book are used with ProWorx 32. For LL 984 using Concept software, see Concept Block Library LL984 (840USE49600).
Validity Note The data and illustrations found in this book are not binding. We reserve the right to modify our products in line with our policy of continuous product development. The information in this document is subject to change without notice and should not be construed as a commitment by Schneider Electric.
Related Documents
Title of Documentation Reference Number
Concept Block Library LL 984 840 USE 496
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
About the Book
xxx 043505766 4/2006
Product Related Warnings
Schneider Electric assumes no responsibility for any errors that may appear in this document. If you have any suggestions for improvements or amendments or have found errors in this publication, please notify us.
No part of this document may be reproduced in any form or by any means, electronic or mechanical, including photocopying, without express written permission of Schneider Electric.
All pertinent state, regional, and local safety regulations must be observed when installing and using this product. For reasons of safety and to ensure compliance with documented system data, only the manufacturer should perform repairs to components.
When controllers are used for applications with technical safety requirements, please follow the relevant instructions.
Failure to use Schneider Electric software or approved software with our hardware products may result in injury, harm, or improper operating results.
Failure to observe this product related warning can result in injury or equipment damage.
User Comments We welcome your comments about this document. You can reach us by e-mail at [email protected]
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 249
IIIInstruction Descriptions (E)
At a Glance
Introduction In this part all instruction descriptions start with E.
What's in this Part?
This part contains the following chapters:
Chapter Chapter Name Page
41 EARS - Event/Alarm Recording System 251
42 EMTH: Extended Math 259
43 EMTH-ADDDP: Double Precision Addition 265
44 EMTH-ADDFP: Floating Point Addition 271
45 EMTH-ADDIF: Integer + Floating Point Addition 275
46 EMTH-ANLOG: Base 10 Antilogarithm 279
47 EMTH-ARCOS: Floating Point Arc Cosine of an Angle (in Radians) 285
48 EMTH-ARSIN: Floating Point Arcsine of an Angle (in Radians) 291
49 EMTH-ARTAN: Floating Point Arc Tangent of an Angle (in Radians)
295
50 EMTH-CHSIN: Changing the Sign of a Floating Point Number 301
51 EMTH-CMPFP: Floating Point Comparison 307
52 EMTH-CMPIF: Integer-Floating Point Comparison 313
53 EMTH-CNVDR: Floating Point Conversion of Degrees to Radians 319
54 EMTH-CNVFI: Floating Point to Integer Conversion 325
55 EMTH-CNVIF: Integer-to-Floating Point Conversion 331
56 EMTH-CNVRD: Floating Point Conversion of Radians to Degrees 337
57 EMTH-COS: Floating Point Cosine of an Angle (in Radians) 343
58 EMTH-DIVDP: Double Precision Division 347
59 EMTH-DIVFI: Floating Point Divided by Integer 353
60 EMTH-DIVFP: Floating Point Division 357
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Instruction Descriptions (E)
250 043505766 4/2006
61 EMTH-DIVIF: Integer Divided by Floating Point 361
62 EMTH-ERLOG: Floating Point Error Report Log 365
63 EMTH-EXP: Floating Point Exponential Function 371
64 EMTH-LNFP: Floating Point Natural Logarithm 377
65 EMTH-LOG: Base 10 Logarithm 383
66 EMTH-LOGFP: Floating Point Common Logarithm 389
67 EMTH-MULDP: Double Precision Multiplication 395
68 EMTH-MULFP: Floating Point Multiplication 401
69 EMTH-MULIF: Integer x Floating Point Multiplication 405
70 EMTH-PI: Load the Floating Point Value of "Pi" 411
71 EMTH-POW: Raising a Floating Point Number to an Integer Power 417
72 EMTH-SINE: Floating Point Sine of an Angle (in Radians) 423
73 EMTH-SQRFP: Floating Point Square Root 429
74 EMTH-SQRT: Floating Point Square Root 435
75 EMTH-SQRTP: Process Square Root 441
76 EMTH-SUBDP: Double Precision Subtraction 447
77 EMTH-SUBFI: Floating Point - Integer Subtraction 453
78 EMTH-SUBFP: Floating Point Subtraction 457
79 EMTH-SUBIF: Integer - Floating Point Subtraction 461
80 EMTH-TAN: Floating Point Tangent of an Angle (in Radians) 465
81 ESI: Support of the ESI Module 469
82 EUCA: Engineering Unit Conversion and Alarms 489
Chapter Chapter Name Page
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 251
41EARS - Event/Alarm Recording System
At A Glance
Introduction This chapter describes the instruction EARS.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description: EARS - Event/Alarm Recording System 252
Representation: EARS - Event/Alarm Recording System 253
Parameter Description: EARS - Event/Alarm Recording System 255
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EARS - Event/Alarm Recording System
252 043505766 4/2006
Short Description: EARS - Event/Alarm Recording System
Function Description
The EARS block is loaded to a PLC used in an alarm/event recording system. An EARS system requires that the PLC work in conjunction with a human-machine interface (HMI) host device that runs a special offline software package. The PLC monitors a specified group of events for changes in state and logs change data into a buffer. The data is then removed by the host over a high speed network such as Modbus Plus. The two devices comply with a defined handshake protocol that ensures that all data detected by the PLC is accurately represented in the host.
PLC Functions in an Event/Alarm Recording System
When a PLC is employed in an EARS environment, it is set up to maintain and monitor two tables of 4xxxx registers, one containing the current state of a set of user-defined events and one containing the history of the most recent state of these events. Event states are stored as bit representations in the 4xxxx registers; a bit value of 1 signifying an ON state and a bit value of 0 signifying an OFF state. Each table can contain up to 62 registers, allowing you to monitor the states of up to 992 events.
When the PLC detects a change between the current state bit and the history bit for an event, the EARS instruction prepares a two word message and places it in a buffer where they can be off-loaded to a host HMI.
This message contains:A time stamp representing the time span from midnight to 24:00 hours in tenths of a secondA transition flag indicating that the event is either a positive or negative transition with respect to the event stateA number indicating which event has occurred
Host to PLC Interaction
The host HMI device must be able to read and write PLC data registers via the Modbus protocol. A handshake protocol maintains integrity between the host and the circular buffer running in the PLC. This enables the host to receive events asynchronously from the buffer at a speed suitable to the host while the PLC detects event changes and load the buffer at its faster scan rate.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EARS - Event/Alarm Recording System
043505766 4/2006 253
Representation: EARS - Event/Alarm Recording System
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
CONTROL INPUT
RESET
QUEUE NOT EMPTY
CLEAR TO SEND
QUEUE FULL
state table pointer / histo-
ry table
buffer table
EARS
length
Queue Info and Queue(event/alarmTable length 5+NNN)
Length: 1 - 1000
History table(4xxxx-4xxxx + 63)
Parameters State RAM Reference
Data Type
Meaning
Top input 0x, 1x None ON = Handshake performed (if needed), validation check performed, and EARS operations proceedsOFF = Handshake performed (if needed) and outstanding transactions are completed
Bottom input
0x, 1x None Buffer Reset: Event table and top node pointers cleared to 0
state table pointer / history table(top node)
4x INT, UINT
The 4xxxx register entered in the top node is the first of 64 contiguous registers. The first two registers contain values that specify the location and size of the current state table. (For expanded and detailed information please see p. 255.)The remaining 61 registers are available to store history data. If all the remaining registers are not required for the history table, those registers may be used elsewhere in the program for other purposes, but they will still be found (by a Modbus search) in the top node of the EARS block.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EARS - Event/Alarm Recording System
254 043505766 4/2006
buffer table(middle node)
4x INT, UINT
The 4xxxx register entered in the middle node is the first in a series of contiguous registers uses as a buffer table. The first five registers are used as follows, and the rest contain the circular buffer. The circular buffer uses an even number of registers in the range 2 through 100. (For expanded and detailed information please see p. 256.)The time stamp is encoded in 20 bits as a binary weighted value that represents the time in an increment of 0.1 s, starting from midnight of the day on which the status change was detected:
1 hour = 3,600 seconds = 36,000 tenths of a second24 hours = 86,400 seconds = 864,000 tenths of a second
Note: The real time clock in the chassis mount controllers has a tenth-of-a-second resolution, but the other 984s have real time clock chips that resolve only to a second. An algorithm is used in EARS to provide a best estimate of tenth-of-a-second resolution; it is accurate in the relative time intervals between events, but it may vary slightly from the real time clock.
length(bottom node)
INT, UINT
The integer value entered in the bottom node is the length - i.e., actual number of registers allocated for the circular buffer. The length can range from 2 through 100. Each event requires two registers for data storage. Therefore, if you wish to trap up to 25 events at any given time in the buffer, assign a length of 50 in the bottom node.
Top output 0x None ON = Data in the bufferPasses power when data is in the queue
Middle output
0x None ON for one scan following communications acknowledgment from hostPasses power for one scan after getting a host response
Bottom output
0x None Buffer full: No events can be added until host off-loads some or until Buffer ResetPasses power when queue is full. No more events can be added
Parameters State RAM Reference
Data Type
Meaning
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EARS - Event/Alarm Recording System
043505766 4/2006 255
Parameter Description: EARS - Event/Alarm Recording System
Overview of This Section
This section provides detailed and expanded information in table form for the top and middle nodes, and the middle node provides further information, which is detailed in three additional tables.
Therefore, there are five tables in this section.Register Table (Top Node)Data Register Table (Middle Node)Status/Error Codes TableEvent-change Data TableBinary Weighted Value Table
Register Table (Top Node)
This is the Register Table for the top node of EARS.
Register Content
4x Indirect pointer to the current state table for example if the register contains a value of 5, then the state table begins at register 40005; the indirect pointer register must be hard-coded by the programmer
4x+1 Contains a value in the range 1 through 62 that specifies the number of registers in the current state table; this value must be hard-coded by the programmer
4x+2 First register of the history table, and the remaining registers allocated to the top node may be used in the table as required; the history table can provide monitoring for as many as 992 contiguous events (if 16 bits in all the 62 available registers are used)
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EARS - Event/Alarm Recording System
256 043505766 4/2006
Data Register Table (Middle Node)
This is the Data Register Table for the middle node of EARS.
Status/Error Codes Table
This is the Status/Error Codes Table for the 4x+4 register of the middle node. The information below provides detailed and expanded information for the 4x+4 register of the middle node. The code number displayed represents an existing condition.
Register Content
4x A value that defines the maximum number of registers the circular buffer may occupy
4x+1 The Q_take pointer - the pointer to the next register where the host will go to remove data
4x+2 The low byte contains the Q_put pointer - the pointer to the register in the circular buffer where the EARS block will begin to place the next state-change data. The high byte contains the last transaction number received.
4x+3 The Q+count is a value indicating the number of words currently in the circular buffer.
4x+4 The 4x+4 register gives Status/Error informationFor an explanation of the codes and the status/error messages that the code represents please see the Status/Error Codes Table below.
4x+5 The 4x+5 registerGives Event-change dataIs the first register in a circular bufferIs where Event-change data are stored
Each change in event status produces two contiguous registers, and those registers are explained in the Event-change Data Table below.
Code Condition
1 Invalid block length
2 Invalid clock request
3 Invalid clock configuration
4 Invalid state length
5 Invalid queue put
6 Invalid queue take
7 Invalid state
8 Invalid queue count
9 Invalid sequence number
10 Count removed
255 Bad clock chip
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EARS - Event/Alarm Recording System
043505766 4/2006 257
Event-change Data Table
When a change occurs in the 4x+5 register, this register then produces two contiguous registers. This section explains how these contiguous registers are used.
Event Data Register 1
The following table describes the Bit Usage.
Event Data Register 2
The following table describes the Bit Usage.
The time stamp is encoded in 20 bits as a binary weighted value that represents the time in an increment of 0.1 s (tenths of a second), starting from midnight of the day on which the status change was detected.
1 hour = 3600 seconds = 36000 tenths of a second24 hours = 86,400 seconds = 864,000 tenths of a second
For expanded and detailed information on binary weighted values for the time stamp see the Binary Weighted Values Table below.
Bit Usage
1 - 4 Four most significant bits of Event Time Stamp
5 Transition Event Type0 = Negative1 = Positive
6 Reserved
7 - 16 Event Number (1 ... 992)
Bit Usage
1 - 16 Sixteen least significant bits of Event Time Stamp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EARS - Event/Alarm Recording System
258 043505766 4/2006
Binary Weighted Values Table
Event Data Register 1 (Most significant nibble (4 bits))
Event Data Register 2
The following table shows binary weighted values for the time stamp, where n is the relative bit position in the 20-bit time scheme.
2n n 2n n 2n n
1 0 256 8 65536 16
2 1 512 9 131072 17
4 2 1024 10 262144 18
8 3 2048 11 524288 19
16 4 4096 12
32 5 8192 13
64 6 16384 14
128 7 32768 15
Note: The real time clock in chassis mount controllers has a tenth-of-a-second resolution, but the other 984s have real time clock chips that resolve only to a second. An algorithm is used in EARS to provide a best estimate of tenth-of-a-second resolution. The algorithmic estimate is accurate in relative time intervals between events, but the estimate may vary slightly from the real time clock.
19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 259
42EMTH: Extended Math
At a Glance
Introduction This chapter describes the instruction EMTH.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 260
Representation: EMTH - Extended Math Functions 261
Parameter Description 262
Floating Point EMTH Functions 264
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH: Extended Math
260 043505766 4/2006
Short Description
Function Description
This instruction accesses a library of double-precision math, square root and logarithm calculations and floating point (FP) arithmetic functions.
The EMTH instruction allows you to select from a library of 38 extended math functions. Each of the functions has an alphabetical indicator of variable subfunctions that can be selected from a pulldown menu in your panel software and appears in the bottom node. EMTH control inputs and outputs are function-dependent.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH: Extended Math
043505766 4/2006 261
Representation: EMTH - Extended Math Functions
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
EMTH
subfunction
middle node
top nodeTOP INPUT TOP OUTPUT
BOTTOM OUTPUTBOTTOM INPUT
MIDDLE OUTPUTMIDDLE INPUT
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None Depends on the selected EMTH function, see p. 262"
Middle input 0x, 1x None Depends on the selected EMTH function
Bottom input 0x, 1x None Depends on the selected EMTH function
top node 3x, 4x DINT, UDINT, REAL
Two consecutive registers, usually 4x holding registers but, in the integer math cases, either 4x or 3x registers
middle node 4x DINT, UDINT, REAL
Two, four, or six consecutive registers, depending on the function you are implementing.
subfunction(bottom node)
An alphabetical label, identifying the EMTH function, see p. 262"
Top output 0x None Depends on the selected EMTH function, see p. 262"
Middle output 0x None Depends on the selected EMTH function
Bottom output 0x None Depends on the selected EMTH function
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH: Extended Math
262 043505766 4/2006
Parameter Description
Inputs, Outputs and Bottom Node
The implementation of inputs to and outputs from the block depends on the EMTH subfunction you select. An alphabetical indicator of variable subfunctions appears in the bottom node identifing the EMTH function you have chosen from the library.
You will find the EMTH subfunctions in the following tables.Double Precision MathInteger MathFloating Point Math
Subfunctions for Double Precision Math
Double Precision Math
Subfunctions for Integer Math
Integer Math
EMTH Function Subfunction Active Inputs Active Outputs
Addition ADDDP Top Top and Middle
Subtraction SUBDP Top Top, Middle and Bottom
Multiplication MULDP Top Top and Middle
Division DIVDP Top and Middle Top, Middle and Bottom
EMTH Function Subfunction Active Inputs Active Outputs
Square root SQRT Top Top and Middle
Process square root SQRTP Top Top and Middle
Logarithm LOG Top Top and Middle
Antilogarithm ANLOG Top Top and Middle
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH: Extended Math
043505766 4/2006 263
Subfunctions for Floating Point Math
EMTH Function Subfunction Active Inputs Active Outputs
Integer-to-FP conversion CNVIF Top Top
Integer + FP ADDIF Top Top
Integer - FP SUBIF Top Top
Integer x FP MULIF Top Top
Integer / FP DIVIF Top Top
FP - Integer SUBFI Top Top
FP / Integer DIVFI Top Top
Integer-FP comparison CMPIF Top Top
FP-to-Integer conversion CNVFI Top Top and Middle
Addition ADDFP Top Top
Subtraction SUBFP Top Top
Multiplication MULFP Top Top
Division DIVFP Top Top
Comparison CMPFP Top Top, Middle and Bottom
Square root SQRFP Top Top
Change sign CHSIN Top Top
Load Value of p PI Top Top
Sine in radians SINE Top Top
Cosine in radians COS Top Top
Tangent in radians TAN Top Top
Arcsine in radians ARSIN Top Top
Arccosine in radians ARCOS Top Top
Arctangent in radians ARTAN Top Top
Radians to degrees CNVRD Top Top
Degrees to radians CNVDR Top Top
FP to an integer power POW Top Top
Exponential function EXP Top Top
Natural log LNFP Top Top
Common log LOGFP Top Top
Report errors ERLOG Top Top and Middle
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH: Extended Math
264 043505766 4/2006
Floating Point EMTH Functions
Use of Floating Point Functions
To make use of the floating point (FP) capability, the four-digit integer values used in standard math instructions must be converted to the IEEE floating point format. All calculations are then performed in FP format and the results must be converted back to integer format.
The IEEE Floating Point Standard
EMTH floating point functions require values in 32-bit IEEE floating point format. Each value has two registers assigned to it, the eight most significant bits representing the exponent and the other 23 bits (plus one assumed bit) representing the mantissa and the sign of the value.
It is virtually impossible to recognize a FP representation on the programming panel. Therefore, all numbers should be converted back to integer format before you attempt to read them.
Dealing with Negative Floating Point Numbers
Standard integer math calculations do not handle negative numbers explicitly. The only way to identify negative values is by noting that the SUB function block has turned the bottom output ON.
If such a negative number is being converted to floating point, perform the Integer-to-FP conversion (EMTH subfunction CNVIF), then use the Change Sign function (EMTH subfunction CHSIN) to make it negative prior to any other FP calculations.
Note: Floating point calculations have a mantissa precision of 24 bits, which guarantees the accuracy of the seven most significant digits. The accuracy of the eighth digit in an FP calculation can be inexact.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 265
43EMTH-ADDDP: Double Precision Addition
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-ADDDP.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 266
Representation: EMTH - ADDDP - Double Precision Math - Addition 267
Parameter Description 269
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ADDDP: Double Precision Addition
266 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Double Precision Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ADDDP: Double Precision Addition
043505766 4/2006 267
Representation: EMTH - ADDDP - Double Precision Math - Addition
Symbol Representation of the instruction
EMTH
ADDDP
operand 2 and sum
operand 1ADDS OPERANDS OPERATION SUCCESSFUL
OPERAND OUT OF RANGE OR IN-VALID
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ADDDP: Double Precision Addition
268 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = adds operands and posts sum in designated registers
operand 1(top node)
4x DINT, UDINT
Operand 1 (first of two contiguous registers)The first of two contiguous 4xxxx registers is entered in the top node. The second 4xxxx register is implied. Operand 1 is stored here. Each register holds a value in the range 0000 through 9999, for a combined double precision value in the range of 0 through 99,999,999. The high-order half of operand 1 is stored in the displayed register, and the low-order half is stored in the implied register.
operand 2 and sum(middle node)
4x DINT, UDINT
Operand 2 and sum (first of sixcontiguous registers)The first of six contiguous 4xxxx registers is entered in the middle node.The remaining five registers are implied:
The displayed register and the first implied register store the high-order and low-order halves of operand 2, respectively, for a combined double precision value in the range 0 through 99,999,999The value stored in the second implied register indicates whether an overflow condition exists (a value of 1 = overflow)The third and fourth implied registers store the high-order and low-order halves of the double precision sum, respectivelyThe fifth implied register is not used in the calculation but must exist in state RAM
ADDDP(bottom node)
Selection of the subfunction ADDDP
Top output 0x None ON = operation successful
Middle output 0x None ON = operand out of range or invalid
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ADDDP: Double Precision Addition
043505766 4/2006 269
Parameter Description
Operand 1 (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second 4x register is implied. Operand 1 is stored here.
Operand 2 and Sum (Middle Node)
The first of six contiguous 4x registers is entered in the middle node. The remaining five registers are implied:
Register Content
Displayed Register stores the low-order half of operand 1Range 0 000 ... 9 999, for a combined double precision value in the range 0 ... 99 999 999
First implied Register stores the high-order half of operand 1Range 0 000 ... 9 999, for a combined double precision value in the range 0 ... 99 999 999
Register Content
Displayed Register stores the low-order half of operand 2, respectively, for a combined double precision value in the range 0 ... 99 999 999
First implied Register stores the high-order half of operand 2, respectively, for a combined double precision value in the range 0 ... 99 999 999
Second implied The value stored in this register indicates whether an overflow condition exists (a value of 1 = overflow)
Third implied Register stores the low-order half of the double precision sum.
Fourth implied Register stores the high-order half of the double precision sum.
Fifth implied Register is not used in the calculation but must exist in state RAM
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ADDDP: Double Precision Addition
270 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 271
44EMTH-ADDFP: Floating Point Addition
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-ADDFP.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 272
Representation: EMTH - ADDFP - Floating Point Math - Addition 273
Parameter Description 274
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ADDFP: Floating Point Addition
272 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ADDFP: Floating Point Addition
043505766 4/2006 273
Representation: EMTH - ADDFP - Floating Point Math - Addition
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
EMTH
ADDFP
value 2 and sum
value 1INITIATES FP ADDI-
TIONOPERATION SUCCESSFUL
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = enables FP addition
value 1(top node)
4x REAL Floating point value 1 (first of two contiguous registers) The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. FP value 1 in the addition is stored here.
value 2 and sum(middle node)
4x REAL Floating point value 2 and the sum (first of four contiguous registers) The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. FP value 2 is stored in the displayed register and the first implied register. The sum of the addition is stored in FP format in the second and third implied registers.
ADDFP(bottom node)
Selection of the subfunction ADDFP
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ADDFP: Floating Point Addition
274 043505766 4/2006
Parameter Description
Floating Point Value 1 (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied.
Floating Point Value 2 and Sum (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied
Register Content
DisplayedFirst implied
Registers store the FP value 1.
Register Content
DisplayedFirst implied
Registers store the FP value 2.
Second impliedThird implied
Registers store the sum of the addition in FP format.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 275
45EMTH-ADDIF: Integer + Floating Point Addition
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-ADDIF.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 276
Representation: EMTH - ADDIF - Integer + Floating Point Addition 277
Parameter Description 278
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ADDIF: Integer + Floating Point Addition
276 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ADDIF: Integer + Floating Point Addition
043505766 4/2006 277
Representation: EMTH - ADDIF - Integer + Floating Point Addition
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
EMTH
ADDIF
FP and sum
integerINITIATES INTEGER
+ FP OPERATIONOPERATION SUCCESSFUL
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = initiates integer + FP operation
integer(top node)
4x DINT, UDINT
Integer value (first of two contiguous registers)The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. The double precision integer value to be added to the FP value is stored here.
FP and sum(middle node)
4x REAL FP value and sum (first of four contiguous registers) The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. The displayed register and the first implied register store the FP value to be added in the operation, and the sum is posted in the second and third implied registers. The sum is posted in FP format.
ADDIF(bottom node)
Selection of the subfunction ADDIF
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ADDIF: Integer + Floating Point Addition
278 043505766 4/2006
Parameter Description
Integer Value (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied.
FP Value and Sum (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied
Register Content
DisplayedFirst implied
The double precision integer value to be added to the FP value is stored here.
Register Content
DisplayedFirst implied
Registers store the FP value to be added in the operation.
Second impliedThird implied
The sum is posted here in FP format.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 279
46EMTH-ANLOG: Base 10 Antilogarithm
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-ANLOG.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 280
Representation: EMTH - ANLOG - integer Base 10 Antilogarithm 281
Parameter Description 283
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ANLOG: Base 10 Antilogarithm
280 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Integer Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ANLOG: Base 10 Antilogarithm
043505766 4/2006 281
Representation: EMTH - ANLOG - integer Base 10 Antilogarithm
Symbol Representation of the instruction
EMTH
ANLOG
result
sourceENABLES ANTILOG(X)
OPERATIONOPERATION SUCCESSFUL
ERROR orValue out of range
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ANLOG: Base 10 Antilogarithm
282 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference Data Type Meaning
Top input 0x, 1x None ON = enables antilog(x) operation
source(top node)
3x, 4x INT, UINT Source valueThe top node is a single 4xxxx holding register or 3xxxx input register. The source value (the value on which the antilog calculation will be performed) is stored here in the fixed decimal format 1.234 . It must be in the range of 0 through 7999, representing a source value up to a maximum of 7.999.
result(middle node)
4x DINT, UDINT
Result (first of two contiguous registersThe first of two contiguous 4xxxx registers is entered in the middle node. The second register is implied. The result of the antilog calculation is posted here in the fixed decimal format 12345678.The most significant bits are posted in the displayed register, and the least significant bits are posted in the implied register. The largest antilog value that can be calculated is 99770006 (9977 posted in the displayed register and 0006 posted in the implied register).
ANLOG(bottom node)
Selection of the subfunction ANLOG
Top output 0x None ON = operation successful
Middle output 0x None ON = an error or value out of range
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ANLOG: Base 10 Antilogarithm
043505766 4/2006 283
Parameter Description
Source Value (Top Node)
The top node is a single 4x holding register or 3x input register. The source value, i.e. the value on which the antilog calculation will be performed, is stored here in the fixed decimal format 1.234. It must be in the range 0 ... 7 999, representing a source value up to a maximum of 7.999.
Result (Middle Node)
The first of two contiguous 4x registers is entered in the middle node. The second register is implied. The result of the antilog calculation is posted here in the fixed decimal format 12345678:
The largest antilog value that can be calculated is 99770006 (9977 posted in the displayed register and 0006 posted in the implied register).
Register Content
Displayed Most significant bits
First implied Least significant bits
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ANLOG: Base 10 Antilogarithm
284 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 285
47EMTH-ARCOS: Floating Point Arc Cosine of an Angle (in Radians)
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-ARCOS.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 286
Representation: EMTH - ARCOS - Floating Point Math - Arc Cosine of an Angle (in Radians)
287
Parameter Description 289
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ARCOS: Floating Point Arc Cosine of an Angle (in Radians)
286 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ARCOS: Floating Point Arc Cosine of an Angle (in Radians)
043505766 4/2006 287
Representation: EMTH - ARCOS - Floating Point Math - Arc Cosine of an Angle (in Radians)
Symbol Representation of the instruction
EMTH
ARCOS
arc cosine of value
valueCALCULATES THE
ARCCOSINE OF THEFLOATING POINT VAL-
UE
OPERATION SUCCESSFUL
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ARCOS: Floating Point Arc Cosine of an Angle (in Radians)
288 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference Data Type Meaning
Top input 0x, 1x None ON = calculates arc cosine of the value
value(top node)
4x REAL FP value indicating the cosine of an angle (first of two contiguous registers)The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. An FP value indicating the cosine of an angle between 0 through Pi radians is stored here.This value must be in the range of -1.0 through +1.0; if not:
The arc cosine is not computedAn invalid result is returnedAn error is flagged in the EMTH ERLOG function
arc cosine of value(middle node)
4x REAL Arc cosine in radians of the value in the top node (first of four contiguous registers) The first of four contiguous 4xxxx registers is entered in the middle node.The remaining three registers are implied. The arc cosine in radians of the FP value in the top node is posted in the second and third implied registers. The displayed register and the first implied register are not used but their allocation in state RAM is required.Tip: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
ARCOS(bottom node)
Selection of the subfunction ARCOS
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ARCOS: Floating Point Arc Cosine of an Angle (in Radians)
043505766 4/2006 289
Parameter Description
Value (Top Node) The first of two contiguous 4x registers is entered in the top node. The second register is implied.
If the value is not in the range of -1.0 ... +1.0:The arc cosine is not computedAn invalid result is returnedAn error is flagged in the EMTH-ERLOG function
Arc Cosine of Value(Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied
Register Content
DisplayedFirst implied
An FP value indicating the cosine of an angle between 0 ... p radians is stored here. This value must be in the range of -1.0 ... +1.0;
Register Content
DisplayedFirst implied
Registers are not used but their allocation in state RAM is required.
Second impliedThird implied
The arc cosine in radians of the FP value in the top node is posted here.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ARCOS: Floating Point Arc Cosine of an Angle (in Radians)
290 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 291
48EMTH-ARSIN: Floating Point Arcsine of an Angle (in Radians)
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-ARSIN.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 292
Representation: EMTH - ARSIN - Arcsine of an Angle (in Radians) 293
Parameter Description 294
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ARSIN: Floating Point Arcsine of an Angle (in Radians)
292 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ARSIN: Floating Point Arcsine of an Angle (in Radians)
043505766 4/2006 293
Representation: EMTH - ARSIN - Arcsine of an Angle (in Radians)
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
EMTH
arc sine ofvalue
valueCALCULATES THE ARC-SINE OF THE FLOATING
POINT VALUE
OPERATION SUCCESSFUL
Parameters State RAM Reference Data Type Meaning
Top input 0x, 1x None ON = calculates the arcsine of the value
value(top node)
4x REAL FP value indicating the sine of an angle (first of two contiguous registers)The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. An FP value indicating the sine of an angle between -Pi/2 through +Pi/2 radians is stored here.This value, the sine of an angle, must be in the range of -1.0 through +1.0; if not:
The arcsine is not computedAn invalid result is returnedAn error is flagged in the EMTH ERLOG function
arcsine of value(middle node)
4x REAL Arcsine of the value in the top node (first of four contiguous registers)
ARSIN(bottom node)
Selection of the subfunction ARSIN
Top output 0x None ON = operation successful**Error is flagged in the EMTH ERLOG function.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ARSIN: Floating Point Arcsine of an Angle (in Radians)
294 043505766 4/2006
Parameter Description
Value (Top Node) The first of two contiguous 4x registers is entered in the top node. The second register is implied.
If the value is not in the range of -1.0 ... +1.0:The arcsine is not computedAn invalid result is returnedAn error is flagged in the EMTH-ERLOG function
Arcsine of Value (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied
Register Content
DisplayedFirst implied
An FP value indicating the sine of an angle between - /2 ... /2 radians is stored here. This value (the sine of an angle) must be in the range of -1.0 ... +1.0;
Register Content
DisplayedFirst implied
Registers are not used but their allocation in state RAM is required.
Second impliedThird implied
The arcsine of the value in the top node is posted here in FP format.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 295
49EMTH-ARTAN: Floating Point Arc Tangent of an Angle (in Radians)
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-ARTAN.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 296
Representation: Floating Point Math - Arc Tangent of an Angle (in Radians) 297
Parameter Description 299
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ARTAN: Floating Point Arc Tangent of an Angle (in Radians)
296 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ARTAN: Floating Point Arc Tangent of an Angle (in Radians)
043505766 4/2006 297
Representation: Floating Point Math - Arc Tangent of an Angle (in Radians)
Symbol Representation of the instruction
EMTH
ARTAN
arc tangent ofvalue
valueCALCULATES THE ARC
TANGENT OF THEFLOATING POINT VALUE
OPERATION SUCCESSFUL
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ARTAN: Floating Point Arc Tangent of an Angle (in Radians)
298 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = calculates the arc tangent of the value
value(top node)
4x REAL FP value indicating the tangent of an angle (first of two contiguous registers) The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. An FP value indicating the tangent of an angle between -Pi/2 through +Pi/2 radians is stored here. Any valid FP value is allowed.
arc tangent of value(middle node)
4x REAL Arc tangent of the value in the top node (first of four contiguous registers)The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied.The arc tangent in radians of the FP value in the top node is posted in the second and third implied registers. The displayed register and the first implied register are not used but their allocation in state RAM is required.Tip: To preserve registers, you can make the 4xxxx reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
ARTAN(bottom node)
Selection of the subfunction ARTAN
Top output 0x None ON = operation successful**Error is flagged in the EMTH ERLOG function.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ARTAN: Floating Point Arc Tangent of an Angle (in Radians)
043505766 4/2006 299
Parameter Description
Value (Top Node) The first of two contiguous 4x registers is entered in the top node. The second register is implied.
Arc Tangent of Value (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied
Register Content
DisplayedFirst implied
An FP value indicating the tangent of an angle between - /2 ... /2 radians is stored here. Any valid FP value is allowed.;
Register Content
DisplayedFirst implied
Registers are not used but their allocation in state RAM is required.
Second impliedThird implied
The arc tangent in radians of the FP value in the top node is posted here.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ARTAN: Floating Point Arc Tangent of an Angle (in Radians)
300 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 301
50EMTH-CHSIN: Changing the Sign of a Floating Point Number
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-CHSIN.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 302
Representation: EMTH - CHSIN - Change the Sign of a Floating Point Number 303
Parameter Description 305
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CHSIN: Changing the Sign of a Floating Point Number
302 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CHSIN: Changing the Sign of a Floating Point Number
043505766 4/2006 303
Representation: EMTH - CHSIN - Change the Sign of a Floating Point Number
Symbol Representation of the instruction
EMTH
CHSIN
-(value)
valueCHANGES THE SIGN
OF A FLOATINGPOINT NUMBER
OPERATION SUCCESSFUL
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CHSIN: Changing the Sign of a Floating Point Number
304 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = changes the sign of FP value
value(top node)
4x REAL Floating point value (first of two contiguous registers) The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. The FP value whose sign will be changed is stored here.
-(value)(middle node)
4x REAL Floating point value with changed sign (first of four contiguous registers)The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied.The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied.The top node FP value in the top node is posted in the second and third implied registers. The displayed register and the first implied register in the middle node are not used in the operation but their allocation in state RAM is required.Tip: To preserve registers, you can make the 4xxxx reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
CHSIN(bottom node)
Selection of the subfunction CHSIN
Top output 0x None ON = operation successful**Error is flagged in the EMTH ERLOG function.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CHSIN: Changing the Sign of a Floating Point Number
043505766 4/2006 305
Parameter Description
Floating Point Value (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied.
Floating Point Value with changed sign (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied
Register Content
DisplayedFirst implied
The FP value whose sign will be changed is stored here.
Register Content
DisplayedFirst implied
Registers are not used but their allocation in state RAM is required.
Second impliedThird implied
The top node FP value with changed sign is posted here.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CHSIN: Changing the Sign of a Floating Point Number
306 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 307
51EMTH-CMPFP: Floating Point Comparison
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-CMPFP.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 308
Representation: EMTH - CMFPF - Floating Point Math Comparison 309
Parameter Description 311
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CMPFP: Floating Point Comparison
308 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CMPFP: Floating Point Comparison
043505766 4/2006 309
Representation: EMTH - CMFPF - Floating Point Math Comparison
Symbol Representation of the instruction
EMTH
CMPFP
value 2
value 1INITIATES COMPARI-
SONOPERATION SUCCESSFUL
VALUE 1 <= VALUE 2
VALUE 1 >= VALUE 2
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CMPFP: Floating Point Comparison
310 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = initiates comparison
value 1(top node)
4x DINT, UDINT
First floating point value (first of two contiguous registers)The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. The first FP value (value 1) to be compared is stored here.
value 2(middle node)
4x REAL Second floating point value (first of four contiguous registers) The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. The second FP value (value 2) to be compared is entered in the displayed register and the first implied register; the second and third implied registers are not used in the comparison but their allocation in state RAM is required.
CMPFP(bottom node)
Selection of the subfunction CMPFP
Top output 0x None ON = operation successful
Middle output 0x None Please see p. 311. That table indicates the relationship created when CMFPF compares two floating point values.
Bottom output 0x None Please see p. 311. That table indicates the relationship created when CMFPF compares two floating point values.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CMPFP: Floating Point Comparison
043505766 4/2006 311
Parameter Description
Value 1 (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied:
Value 2 (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied:
Middle and Bottom Output
When EMTH function CMPFP compares its two FP values, the combined states of the middle and the bottom output indicate their relationship:
Register Content
DisplayedFirst implied
The first FP value (value 1) to be compared is stored here.
Register Content
DisplayedFirst implied
The second FP value (value 2) to be compared is stored here.
Second impliedThird implied
Registers are not used but their allocation in state RAM is required.
Middle Output Bottom Output Relationship
ON OFF value 1 > value 2
OFF ON value 1 < value 2
ON ON value 1 = value 2
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CMPFP: Floating Point Comparison
312 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 313
52EMTH-CMPIF: Integer-Floating Point Comparison
At a Glance
Introduction This chapter describes the EMTH EMTH subfunction EMTH-CMPIF.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 314
Representation: EMTH - CMPIF - Floating Point Math - Integer/Floating Point Comparison
315
Parameter Description 317
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CMPIF: Integer-Floating Point Comparison
314 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CMPIF: Integer-Floating Point Comparison
043505766 4/2006 315
Representation: EMTH - CMPIF - Floating Point Math - Integer/Floating Point Comparison
Symbol Representation of the instruction
EMTH
CMPIF
FP
integerINITIATE COMPARISON OPERATION SUCCESSFUL
INTEGER <= FP
INTEGER >= FP
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CMPIF: Integer-Floating Point Comparison
316 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = initiates comparison
integer(top node)
4x DINT, UDINT Integer value (first of two contiguous registers) The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. The double precision integer value to be compared is stored here.
FP(middle node)
4x REAL Floating point value (first of four contiguous registers)The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. The FP value to be compared is entered in the displayed register and the first implied register; the second and third implied registers are not used in the comparison but their allocation in state RAM is required.
CMPIF(bottom node)
Selection of the subfunction CMPIF
Top output 0x None ON = operation successful
Middle output 0x None Please see p. 317. That table indicates the relationship created when CMPIF compares two floating point values.
Bottom output 0x None Please see p. 317. That table indicates the relationship created when CMPIF compares two floating point values.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CMPIF: Integer-Floating Point Comparison
043505766 4/2006 317
Parameter Description
Integer Value (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied:
Floating Point Value (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied:
Middle and Bottom Output
When EMTH function CMPIF compares its integer and FP values, the combined states of the middle and the bottom output indicate their relationship:
Register Content
DisplayedFirst implied
The double precision integer value to be compared is stored here.
Register Content
DisplayedFirst implied
The FP value to be compared is stored here.
Second impliedThird implied
Registers are not used but their allocation in state RAM is required.
Middle Output Bottom Output Relationship
ON OFF integer > FP
OFF ON integer < FP
ON ON integer = FP
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CMPIF: Integer-Floating Point Comparison
318 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 319
53EMTH-CNVDR: Floating Point Conversion of Degrees to Radians
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-CNVDR.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 320
Representation: EMTH - CNVDR - Conversion of Degrees to Radians 321
Parameter Description 323
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVDR: Floating Point Conversion of Degrees to Radians
320 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVDR: Floating Point Conversion of Degrees to Radians
043505766 4/2006 321
Representation: EMTH - CNVDR - Conversion of Degrees to Radians
Symbol Representation of the instruction
EMTH
CNVDR
result
valueINITIATE CONVERSION OPERATION SUCCESSFUL
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVDR: Floating Point Conversion of Degrees to Radians
322 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = initiates conversion of value 1 to value 2 (result)
value(top node)
4x REAL Value in FP format of an angle in degrees (first of two contiguous registers)The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. The value in FP format of an angle in degrees is stored here.
result(middle node)
4x REAL Converted result (in radians) in FP format (first of four contiguous registers)The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied.The converted result in FP format of the top-node value (in radians) is posted in the second and third implied registers. The displayed register and the first implied register are not used but their allocation in state RAM is required.Tip: To preserve registers, you can make the 4xxxx reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
CNVDR(bottom node)
Selection of the subfunction CNVDR
Top output 0x None ON = operation successful**Error is flagged in the EMTH ERLOG function.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVDR: Floating Point Conversion of Degrees to Radians
043505766 4/2006 323
Parameter Description
Value (Top Node) The first of two contiguous 4x registers is entered in the top node. The second register is implied:
Result in Radians (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied:
Register Content
DisplayedFirst implied
The value in FP format of an angle in degrees is stored here.
Register Content
DisplayedFirst implied
Registers are not used but their allocation in state RAM is required.
Second impliedThird implied
The converted result in FP format of the top-node value (in radians) is posted here.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVDR: Floating Point Conversion of Degrees to Radians
324 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 325
54EMTH-CNVFI: Floating Point to Integer Conversion
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-CNVFI.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 326
Representation: EMTH - CNVFI - Floating Point to Integer Conversion 327
Parameter Description 329
Runtime Error Handling 330
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVFI: Floating Point to Integer Conversion
326 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVFI: Floating Point to Integer Conversion
043505766 4/2006 327
Representation: EMTH - CNVFI - Floating Point to Integer Conversion
Symbol Representation of the instruction
EMTH
CNVFI
integer
FPINITIATES
FP TO INTEGERCONVERSION
OPERATION SUCCESSFUL
OFF = POSTIVE INTEGER VALUEON = NEGATVE INTEGER VALUE
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVFI: Floating Point to Integer Conversion
328 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = initiates FP to integer conversion
FP(top node)
4x REAL Floating point value to be converted (first of two contiguous registers)The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. The double precision integer value to be converted to 32-bit FP format is stored here.Note: If an invalid integer value ( > 9999) is entered in either of the two top-node registers, the FP conversion will be performed but an error will be reported and logged in the EMTH ERLOG function (see page 138). The result of the conversion may not be correct.
integer(middle node)
4x DINT, UDINT
Integer value (first of four contiguous registers)The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. The FP result of the conversion is posted in the second and third implied registers. The displayed register and the first implied register are not used in the function but their allocation in state RAM is required.Tip: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
CNVFI(bottom node)
Selection of the subfunction CNVFI
Top output 0x None ON = operation successful**Error is flagged in the EMTH ERLOG function.
Bottom output 0x None OFF = positive integer valueON = negative integer value
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVFI: Floating Point to Integer Conversion
043505766 4/2006 329
Parameter Description
Integer Value (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied:
Register Content
DisplayedFirst implied
Registers are not used but their allocation in state RAM is required.
Second impliedThird implied
The double precision integer result of the conversion is stored here. This value should be the largest integer value possible that is the FP value.For example, the FP value 3.5 is converted to the integer value 3, while the FP value -3.5 is converted to the integer value -4.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVFI: Floating Point to Integer Conversion
330 043505766 4/2006
Runtime Error Handling
Runtime Errors If the resultant integer is too large for double precision integer format (> 99 999 999), the conversion still occurs but an error is logged in the EMTH_ERLOG function.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 331
55EMTH-CNVIF: Integer-to-Floating Point Conversion
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-CNVIF.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 332
Representation: EMTH - CNVIF - Integer to Floating Point Conversion 333
Parameter Description 335
Runtime Error Handling 336
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVIF: Integer-to-Floating Point Conversion
332 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVIF: Integer-to-Floating Point Conversion
043505766 4/2006 333
Representation: EMTH - CNVIF - Integer to Floating Point Conversion
Symbol Representation of the instruction
EMTH
CNVIF
result
integerINTIATES INTEGER TO
FP CONVERSIONOPERATION SUCCESSFUL
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVIF: Integer-to-Floating Point Conversion
334 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = initiates FP to integer conversion
integer(top node)
4x DINT, UDINT
Integer value (first of two contiguous registers)The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. The FP value to be converted is stored here.
result(middle node)
4x REAL Result (first of four contiguous registers)The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. The double precision integer result of the conversion is stored in the second and third implied registers. This value should be the largest integer value possible that is <= the FP value. For example, the FP value 3.5 is converted to the integer value 3, while the FP value -3.5 is converted to the integer value -4.Note: If the resultant integer is too large for 984 double precision integer format (> 99,999,999), the conversion still occurs but an error is logged in the EMTH ERLOG function (see page 138).The displayed register and the first implied register in the middle node are not used in the conversion but their allocation in state RAM is required.Tip: To preserve registers, you can make the 4xxxx reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
CNVIF(bottom node)
Selection of the subfunction CNVIF
Top output 0x None ON = operation successful**Error is flagged in the EMTH ERLOG function.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVIF: Integer-to-Floating Point Conversion
043505766 4/2006 335
Parameter Description
Integer Value (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied:
Result (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied.
Register Content
DisplayedFirst implied
The double precision integer value to be converted to 32-bit FP format is stored here.
Register Content
DisplayedFirst implied
Registers are not used but their allocation in state RAM is required.
Second impliedThird implied
The FP result of the conversion is posted here.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVIF: Integer-to-Floating Point Conversion
336 043505766 4/2006
Runtime Error Handling
Runtime Errors If an invalid integer value ( > 9 999) is entered in either of the two top-node registers, the FP conversion will be performed but an error will be reported and logged in the EMTH_ERLOG function. The result of the conversion may not be correct.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 337
56EMTH-CNVRD: Floating Point Conversion of Radians to Degrees
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-CNVRD.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 338
Representation: EMTH - CNVRD - Conversion of Radians to Degrees 339
Parameter Description 341
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVRD: Floating Point Conversion of Radians to Degrees
338 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVRD: Floating Point Conversion of Radians to Degrees
043505766 4/2006 339
Representation: EMTH - CNVRD - Conversion of Radians to Degrees
Symbol Representation of the instruction
EMTH
CNVRD
result
valueINITIATES CONVER-
SIONOPERATION SUCCESSFUL
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVRD: Floating Point Conversion of Radians to Degrees
340 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = initiates conversion of value 1 to value 2
value(top node)
4x REAL Value in FP format of an angle in radians (first of two contiguous registers)The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. The value in FP format of an angle in radians is stored here.
result(middle node)
4x REAL Converted result (in degrees) in FP format (first of four contiguous registers)The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. The converted result in FP format of the top-node value (in degrees) is posted in the second and third implied registers. The displayed register and the first implied register are not used but their allocation in state RAM is required.Tip: To preserve registers, you can make the 4xxxx reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
CNVRD(bottom node)
Selection of the subfunction CNVRD
Top output 0x None ON = operation successful**Error is flagged in the EMTH ERLOG function.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVRD: Floating Point Conversion of Radians to Degrees
043505766 4/2006 341
Parameter Description
Value (Top Node) The first of two contiguous 4x registers is entered in the top node. The second register is implied:
Result in Degrees(Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied.
Register Content
DisplayedFirst implied
The value in FP format of an angle in radians is stored here.
Register Content
DisplayedFirst implied
Registers are not used but their allocation in state RAM is required.
Second impliedThird implied
The converted result in FP format of the top-node value (in degrees) is posted here.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-CNVRD: Floating Point Conversion of Radians to Degrees
342 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 343
57EMTH-COS: Floating Point Cosine of an Angle (in Radians)
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-COS.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 344
Representation: EMTH - COS - Cosine of an Angle (in Radians) 345
Parameter Description 346
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-COS: Floating Point Cosine of an Angle (in Radians)
344 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-COS: Floating Point Cosine of an Angle (in Radians)
043505766 4/2006 345
Representation: EMTH - COS - Cosine of an Angle (in Radians)
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
EMTH
COS
cosine of val-ue
valueCALCULATES THE CO-
SINE OF THE FLOATINGPOINT VALUE
OPERATION SUCCESSFUL
Parameters State RAM Reference
Data Type
Meaning
Top input 0x, 1x None ON = calculates the cosine of the value
value(top node)
4x REAL FP value indicating the value of an angle in radians (first of two contiguous registers)The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. An FP value indicating the value of an angle in radians is stored here. The magnitude of this value must be < 65536.0; if not:
The cosine is not computedAn invalid result is returnedAn error is flagged in the EMTH ERLOG function
cosine of value(middle node)
4x REAL Cosine of the value in the top node (first of four contiguous registers)
COS(bottom node)
Selection of the subfunction COS
Top output 0x None ON = operation successful**Error is flagged in the EMTH ERLOG function.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-COS: Floating Point Cosine of an Angle (in Radians)
346 043505766 4/2006
Parameter Description
Value (Top Node) The first of two contiguous 4x registers is entered in the top node. The second register is implied.
If the magnitude of this value is 65 536.0:The cosine is not computedAn invalid result is returnedAn error is flagged in the EMTH-ERLOG function
Cosine of Value (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied
Register Content
DisplayedFirst implied
An FP value indicating the value of an angle in radians is stored here. The magnitude of this value must be < 65 536.0.
Register Content
DisplayedFirst implied
Registers are not used but their allocation in state RAM is required.
Second impliedThird implied
The cosine of the value in the top node is posted here in FP format.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 347
58EMTH-DIVDP: Double Precision Division
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-DIVDP.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 348
Representation: EMTH - DIVDP - Double Precision Math - Division 349
Parameter Description 351
Runtime Error Handling 352
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-DIVDP: Double Precision Division
348 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Double Precision Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-DIVDP: Double Precision Division
043505766 4/2006 349
Representation: EMTH - DIVDP - Double Precision Math - Division
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
EMTH
DIVDP
operand 2quotient
remainder
operand 1TOP NODE DIVIDED BY
MIDDLE NODEOPERATION SUCCESSFUL
OPERAND 2 IS 0
OPERAND OUT OF RANGE OR IN-VLID
ON = DECIMAL REMAIN-DER
OFF = FRACTIONAL RE-MAINDER
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = operand 1 divided by operand 2 and result posted in designated registers.
Middle input 0x, 1x None ON = decimal remainderOFF = fractional remainder
operand 1top node
4x DINT, UDINT
Operand 1 (first of two contiguous registers) The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. The top node is stored here. Each register holds a value in the range of 0000 through 9999, for a combined double precision value in the range of 0 through 99,999,999. The high-order half of operand 1 is stored in the displayed register, and the low-order half is stored in the implied register.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-DIVDP: Double Precision Division
350 043505766 4/2006
operand 2quotientremaindermiddle node
4x DINT, UDINT
Operand 2, quotient and remainder (first of six contiguous registers)The first of six contiguous 4xxxx registers is entered in the middle node. The remaining five registers are implied:
The displayed register and the first implied register store the high-order and low-order halves of operand 2, respectively, for a combined double precision value in the range of 0 through 99,999,999
Note: Since division by 0 is illegal, a 0 value causes an error. An error trapping routine sets the remaining middle-node registers to 0000 and turns the bottom output ON.
The second and third implied registers store an eight-digit quotientThe fourth and fifth implied registers store the remainder. If the remainder is expressed as a fraction, it is eight digits long and both registers are used; if the remainder is expressed as a decimal, it is four digits long and only the fourth implied register is used
DIVDP(bottom node)
Selection of the subfunction DIVDP"
Top output 0x None ON = operation successful
Middle output 0x None ON = an operand out of range or invalid
Bottom output
0x None ON = operand 2 = 0
Parameters State RAM Reference
Data Type Meaning
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-DIVDP: Double Precision Division
043505766 4/2006 351
Parameter Description
Operand 1 (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied.
Each register holds a value in the range 0000 ... 9 999, for a combined double precision value in the range 0 ... 99 999 999.
Operand 2, Quotient and Remainder (Middle Node)
The first of six contiguous 4x registers is entered in the middle node. The remaining five registers are implied
Register Content
Displayed Low-order half of operand 1 is stored here.
First implied High-order half of Operand 1 is stored here.
Register Content
Displayed Register stores the low-order half of operand 2, respectively, for a combined double precision value in the range 0 ... 99 999 999
First implied Register stores the high-order half of operand 2, respectively, for a combined double precision value in the range 0 ... 99 999 999.
Second impliedThird implied
Registers store an eight-digit quotient.
Fourth impliedFifth implied
Registers store the remainder. f it is expressed as a decimal, it is four digits long and only the fourth implied register is used.If it is expressed as a fraction, it is eight digits long and both registers are used
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-DIVDP: Double Precision Division
352 043505766 4/2006
Runtime Error Handling
Runtime Errors Since division by 0 is illegal, a 0 value causes an error, an error trapping routine sets the remaining middle-node registers to 0000 and turns the bottom output ON.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 353
59EMTH-DIVFI: Floating Point Divided by Integer
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-DIVFI.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 354
Representation: EMTH - DIVFI - Floating Point Divided by Integer 355
Parameter Description 356
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-DIVFI: Floating Point Divided by Integer
354 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-DIVFI: Floating Point Divided by Integer
043505766 4/2006 355
Representation: EMTH - DIVFI - Floating Point Divided by Integer
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
EMTH
DIVFI
integer and quotient
FPINITIATES FP / INTE-
GER OPERATIONOPERATION SUCCESSFUL
Parameters State RAM Reference
Data Type
Meaning
Top input 0x, 1x None ON = initiates FP / integer operation
FP(top node)
4x REAL Floating point value (first of two contiguous registers) The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. The FP value to be divided by the integer value is stored here.
integer and quotient(middle node)
4x DINT, UDINT
Integer value and quotient (first of four contiguous registers) The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. The double precision integer value that divides the FP value is posted in the displayed register and the first implied register, and the quotient is posted in the second and third implied registers. The quotient is posted in FP format.
DIVFI(bottom node)
Selection of the subfunction DIVFI
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-DIVFI: Floating Point Divided by Integer
356 043505766 4/2006
Parameter Description
Floating Point Value (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied:
Integer Value and Quotient (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied.
Register Content
DisplayedFirst implied
The FP value to be divided by the integer value is stored here.
Register Content
DisplayedFirst implied
The double precision integer value that divides the FP value is posted here.
Second impliedThird implied
The quotient is posted here in FP format.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 357
60EMTH-DIVFP: Floating Point Division
At a Glance
Introduction This chapter describes the instrcution EMTH-DIVFP.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 358
Representation: EMTH - DIVFP - Floating Point Division 359
Parameter Description 360
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-DIVFP: Floating Point Division
358 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-DIVFP: Floating Point Division
043505766 4/2006 359
Representation: EMTH - DIVFP - Floating Point Division
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
EMTH
DIVFP
value 2 and quotient
value 1ENABLES FP DIVISION OPERATION SUCCESSFUL
Parameters State RAM Reference
Data Type
Meaning
Top input 0x, 1x None ON = initiates value 1 / value 2 operation
value 1(top node)
4x REAL Floating point value 1 (first of two contiguous registers) The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. FP value 1, which will be divided by the value 2, is stored here.
value 2 and quotient(middle node)
4x REAL Floating point value 2 and the quotient (first of four contiguous registers)The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. FP value 2, the value by which value 1 is divided, is stored in the displayed register and the first implied register. The quotient is posted in FP format in the second and third implied registers.
DIVFP(bottom node)
Selection of the subfunction DIVFP
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-DIVFP: Floating Point Division
360 043505766 4/2006
Parameter Description
Floating Point Value 1 (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied:
Floating Point Value 2 and Quotient (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied:
Register Content
DisplayedFirst implied
FP value 1, which will be divided by the value 2, is stored here.
Register Content
DisplayedFirst implied
FP value 2, the value by which value 1 is divided, is stored here
Second impliedThird implied
The quotient is posted here in FP format.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 361
61EMTH-DIVIF: Integer Divided by Floating Point
At a Glance
Introduction This chapter describes the instrcution EMTH-DIVIF.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 362
Representation: EMTH - DIVIF - Integer Divided by Floating Point 363
Parameter Description 364
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-DIVIF: Integer Divided by Floating Point
362 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-DIVIF: Integer Divided by Floating Point
043505766 4/2006 363
Representation: EMTH - DIVIF - Integer Divided by Floating Point
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
EMTH
DIVIF
FP and quotient
integerINTITATES INTEGER
/ FP OPERATIONOPERATION SUCCESS-FUL
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = initiates integer / FP operation
integer(top node)
4x DINT, UDINT
Integer value (first of two contiguous registers) The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. The double precision integer value to be divided by the FP value is stored here.
FP and quotient(middle node)
4x REAL FP value and quotient (first of four contiguous registers) The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. The displayed register and the first implied register store the FP value to be divided in the operation, and the quotient is posted in the second and third implied registers. The quotient is posted in FP format.
DIVIF(bottom node)
Selection of the subfunction DIVIF
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-DIVIF: Integer Divided by Floating Point
364 043505766 4/2006
Parameter Description
Integer Value (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied:
Floating Point Value and Quotient (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied.
Register Content
DisplayedFirst implied
The double precision integer value to be divided by the FP value is stored here.
Register Content
DisplayedFirst implied
The FP value to be divided in the operation is posted here.
Second impliedThird implied
The quotient is posted here in FP format.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 365
62EMTH-ERLOG: Floating Point Error Report Log
At a Glance
Introduction This chapter describes the instrcution EMTH-ERLOG.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 366
Representation: EMTH - ERLOG - Floating Point Math - Error Report Log 367
Parameter Description 369
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ERLOG: Floating Point Error Report Log
366 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ERLOG: Floating Point Error Report Log
043505766 4/2006 367
Representation: EMTH - ERLOG - Floating Point Math - Error Report Log
Symbol Representation of the instruction
EMTH
error data
not usedRETRIEVES A LOG OFERROR TYPES SINCE
LAST INVOCATION
RETRIEVAL SUCCESSFUL
ON = NONZERO VLAUES INERROR LOG REGESTEROFF = ALL ZEROS IN ERROR LOG REGISTER
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ERLOG: Floating Point Error Report Log
368 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = retrieves a log of error types since last invocation
not used(top node)
4x INT, UINT, DINT, UDINT, REAL
Not used in the operation (first of two contiguous registers) The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. These two registers are not used in the operation but their allocation in state RAM is required.
error data(middle node)
4x INT, UINT, DINT, UDINT, REAL
Error log register (first of four contiguous registers) The first of four contiguous 4xxxx registers is entered in the middle node.The remaining three registers are implied. The second implied register is used as the error log register. (For expanded and detailed information about the error log please see p. 369 in the section Parameter Description.The third implied register has all its bits cleared to zero. The displayed register and the first implied register are not used but their allocation in state RAM is required.Tip: To preserve registers, you can make the 4xxxx reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since these registers must be allocated but none are used.
ERLOG(bottom node)
Selection of the subfunction ERLOG
Top output 0x None ON = retrieval successful
Middle output 0x None ON = nonzero values in error log registerOFF = all zeros in error log register
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ERLOG: Floating Point Error Report Log
043505766 4/2006 369
Parameter Description
Not used (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied:
Error Data (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied.
Error Log Register
Usage of error log register:
If the bit is set to 1, then the specific error condition exists for that bit.
Register Content
DisplayedFirst implied
These two registers are not used in the operation but their allocation in state RAM is required.
Register Content
Displayed Error log register, see table.
First implied This register has all its bits cleared to zero.
Second impliedThird implied
These two registers are not used but their allocation in state RAM is required.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since these registers must be allocated but none are used.
Bit Function
1 - 8 Function code of last error logged
9 - 11 Not used
12 Integer/FP conversion error
13 Exponential function power too large
14 Invalid FP value or operation
15 FP overflow
16 FP underflow
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-ERLOG: Floating Point Error Report Log
370 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 371
63EMTH-EXP: Floating Point Exponential Function
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-EXP.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 372
Representation: EMTH - EXP - Floating Point Math - Exponential Function 373
Parameter Description 375
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-EXP: Floating Point Exponential Function
372 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-EXP: Floating Point Exponential Function
043505766 4/2006 373
Representation: EMTH - EXP - Floating Point Math - Exponential Function
Symbol Representation of the instruction
EMTH
EXP
result
valueCALCULATES EXPONEN-
TIAL OF THE VALUEOPERATION SUCCESSFUL
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-EXP: Floating Point Exponential Function
374 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = calculates exponential function of the value
value (top node)
4x REAL Value in FP format (first of two contiguous registers) The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. A value in FP format in the range -87.34 through +88.72 is stored here.If the value is out of range, the result will either be 0 or the maximum value. No error will be flagged.
result(middle node)
4x REAL Exponential of the value in the top node (first of four contiguous registers) The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. The exponential of the value in the top node is posted in FP format in the second and third implied registers. The displayed register and the first implied register are not used but their allocation in state RAM is required.Tip: To preserve registers, you can make the 4xxxx reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
EXP (bottom node)
Selection of the subfunction EXP
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-EXP: Floating Point Exponential Function
043505766 4/2006 375
Parameter Description
Value (Top Node) The first of two contiguous 4x registers is entered in the top node. The second register is implied:
Result (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied:
Register Content
DisplayedFirst implied
A value in FP format in the range -87.34 ... +88.72 is stored here.If the value is out of range, the result will either be 0 or the maximum value. No error will be flagged.
Register Content
DisplayedFirst implied
These registers are not used but their allocation in state RAM is required
Second impliedThird implied
The exponential of the value in the top node is posted here in FP format.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-EXP: Floating Point Exponential Function
376 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 377
64EMTH-LNFP: Floating Point Natural Logarithm
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-LNFP.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 378
Representation: EMTH - LNFP - Natural Logarithm 379
Parameter Description 381
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-LNFP: Floating Point Natural Logarithm
378 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-LNFP: Floating Point Natural Logarithm
043505766 4/2006 379
Representation: EMTH - LNFP - Natural Logarithm
Symbol Representation of the instruction
EMTH
LNFP
result
valueCALCULATES THE
NATURAL LOG OF THEVALUE
OPERATION SUCCESSFUL
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-LNFP: Floating Point Natural Logarithm
380 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = calculates the natural log of the value
value(top node)
4x REAL Value > 0 in FP format (first of two contiguous registers) The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. A value > 0 is stored here in FP format. If the value <= 0, an invalid result will be returned in the middle node and an error will be logged in the EMTH ERLOG function.
result(middle node)
4x REAL Natural logarithm of the value in the top node (first of four contiguous registers)The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. The natural logarithm of the value in the top node is posted in FP format in the second and third implied registers. The displayed register and the first implied register are not used but their allocation in state RAM is required.Tip: To preserve registers, you can make the 4xxxx reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
LNFP(bottom node)
Selection of the subfunction LNFP
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-LNFP: Floating Point Natural Logarithm
043505766 4/2006 381
Parameter Description
Value (Top Node) The first of two contiguous 4x registers is entered in the top node. The second register is implied:
Result (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied:
Register Content
DisplayedFirst implied
A value > 0 is stored here in FP format.If the value 0, an invalid result will be returned in the middle node and an error will be logged in the EMTH-ERLOG function.
Register Content
DisplayedFirst implied
These registers are not used but their allocation in state RAM is required
Second impliedThird implied
The natural logarithm of the value in the top node is posted here in FP format.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-LNFP: Floating Point Natural Logarithm
382 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 383
65EMTH-LOG: Base 10 Logarithm
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-LOG.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 384
Representation: EMTH - LOG - Integer Math - Base 10 Logarithm 385
Parameter Description 387
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-LOG: Base 10 Logarithm
384 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Integer Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-LOG: Base 10 Logarithm
043505766 4/2006 385
Representation: EMTH - LOG - Integer Math - Base 10 Logarithm
Symbol Representation of the instruction
EMTH
LOG
result
sourceENABLES LOG(X)
OPERATIONOPERATION SUCCESSFUL
ERROR OR VALUE OUT OF RANGE
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-LOG: Base 10 Logarithm
386 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = enables log(x) operation
source(top node)
3x, 4x DINT, UDINT Source value (first of two contiguous registers). The first of two contiguous 3xxxx or 4xxxx registers is entered in the top node. The second register is implied. The source value upon which the log calculation will be performed is stored in these registers.If you specify a 4xxxx register, the source value may be in the range of 0 through 99,999,99. The low-order half of the value is stored in the implied register, and the high-order half is stored in the displayed register.If you specify a 3xxxx register, the source value may be in the range of 0 through 9,999. The log calculation is done on only the value in the displayed register; the implied register is required but not used.
result(middle node)
4x INT, UINT Result: The middle node contains a single 4xxxx holding register where the result of the base 10 log calculation is posted. The result is expressed in the fixed decimal format 1.234 , and is truncated after the third decimal position. The largest result that can be calculated is 7.999, which would be posted in the middle register as 7999.
LOG(bottom node)
Selection of the subfunction LOG
Top output 0x None ON = operation successful
Middle output 0x None ON = an error or value out of range
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-LOG: Base 10 Logarithm
043505766 4/2006 387
Parameter Description
Source Value (Top Node)
The first of two contiguous 3x or 4x registers is entered in the top node. The second register is implied. The source value upon which the log calculation will be performed is stored in these registers.
If you specify a 4x register, the source value may be in the range 0 ... 99 999 99:
If you specify a 3x register, the source value may be in the range 0 ... 9 999:
Result (Middle Node)
The middle node contains a single 4x holding register where the result of the base 10 log calculation is posted. The result is expressed in the fixed decimal format 1.234, and is truncated after the third decimal position.
The largest result that can be calculated is 7.999, which would be posted in the middle register as 7999.
Register Content
Displayed The high-order half of the value is stored here.
First implied The low-order half of the value is stored here.
Register Content
Displayed The source value upon which the log calculation will be performed is stored here
First implied This register is required but not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-LOG: Base 10 Logarithm
388 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 389
66EMTH-LOGFP: Floating Point Common Logarithm
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-LOGFP.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 390
Representation: EMTH - LOGFP - Common Logarithm 391
Parameter Description 393
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-LOGFP: Floating Point Common Logarithm
390 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-LOGFP: Floating Point Common Logarithm
043505766 4/2006 391
Representation: EMTH - LOGFP - Common Logarithm
Symbol Representation of the instruction
EMTH
LOGFP
result
valueCALCULATES THE COM-
MON LOG OF THE VALUEOPERATION SUCCESSFUL
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-LOGFP: Floating Point Common Logarithm
392 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = calculates the common log of the value
value(top node)
4x REAL Value > 0 in FP format (first of two contiguous registers). The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. A value > 0 is stored here in FP format. If the value <= 0, an invalid result will be returned in the middle node and an error will be logged in the EMTH ERLOG function.
result(middle node)
4x REAL Common logarithm of the value in the top node (first of four contiguous registers)The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied.The common logarithm of the value in the top node is posted in FP format in the second and third implied registers. The displayed register and the first implied register are not used but their allocation in state RAM is required.Tip: To preserve registers, you can make the 4xxxx reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
LOGFP(bottom node)
Selection of the subfunction LOGFP
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-LOGFP: Floating Point Common Logarithm
043505766 4/2006 393
Parameter Description
Value (Top Node) The first of two contiguous 4x registers is entered in the top node. The second register is implied:
Result (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied:
Register Content
DisplayedFirst implied
A value > 0 is stored here in FP format.If the value 0, an invalid result will be returned in the middle node and an error will be logged in the EMTH-ERLOG function.
Register Content
DisplayedFirst implied
These registers are not used but their allocation in state RAM is required
Second impliedThird implied
The common logarithm of the value in the top node is posted here in FP format.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-LOGFP: Floating Point Common Logarithm
394 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 395
67EMTH-MULDP: Double Precision Multiplication
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-MULDP.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 396
Representation: EMTH - MULDP - Double Precision Math - Multiplication 397
Parameter Description 399
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-MULDP: Double Precision Multiplication
396 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Double Precision Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-MULDP: Double Precision Multiplication
043505766 4/2006 397
Representation: EMTH - MULDP - Double Precision Math - Multiplication
Symbol Representation of the instruction
EMTH
MULDP
operand 2/product
operand 1TOP NODE MULTI-PLIED BY MIDDLE
NODE
OPERATION SUCCESSFUL
OPERAND OUT OF RANGE OR INVALID
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-MULDP: Double Precision Multiplication
398 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = Operand 1 x Operand 2Product posted in designated registers
operand 1(top node)
4x DINT, UDINT
Operand 1 (first of two contiguous registers)The first of two contiguous 4x registers is entered in the top node. The second 4x register is implied. Operand 1 is stored here. The second 4x register is implied. Each register holds a value in the range of 0000 through 9999, for a combined double precision value in the range of 0 through 99,999,999. The high-order half of operand 1 is stored in the displayed register, and the low-order half is stored in the implied register.
operand 2 / product(middle node)
4x DINT, UDINT
Operand 2 and product (first of six contiguous registers)The first of six contiguous 4xxxx registers is entered in the middle node. The remaining five registers are implied:
The displayed register and the first implied register store the high-order and low-order halves of operand 2, respectively, for a combined double precision value in the range 0 through 99,999,999The last four implied registers store the double precision product in the range 0 through 9,999,999,999,999,999
MULDP(bottom node)
Selection of the subfunction MULDP
Top output 0x None ON = operation successful
Middle output 0x None ON = operand out of range
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-MULDP: Double Precision Multiplication
043505766 4/2006 399
Parameter Description
Operand 1 (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second 4x register is implied. Operand 1 is stored here.
Operand 2 and Product (Middle Node)
The first of six contiguous 4x registers is entered in the middle node. The remaining five registers are implied:
Register Content
Displayed Register stores the low-order half of operand 1Range 0 000 ... 9 999, for a combined double precision value in the range 0 ... 99 999 999
First implied Register stores the high-order half of operand 1Range 0 000 ... 9 999, for a combined double precision value in the range 0 ... 99 999 999
Register Content
Displayed Register stores the low-order half of operand 2, respectively, for a combined double precision value in the range 0 ... 99 999 999
First implied Register stores the high-order half of operand 2, respectively, for a combined double precision value in the range 0 ... 99 999 999
Second impliedThird impliedFourth impliedFifth implied
These registers store the double precision product in the range 0 ... 9 999 999 999 999 999
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-MULDP: Double Precision Multiplication
400 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 401
68EMTH-MULFP: Floating Point Multiplication
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-MULFP.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 402
Representation: EMTH - MULFP - Floating Point - Multiplication 403
Parameter Description 404
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-MULFP: Floating Point Multiplication
402 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-MULFP: Floating Point Multiplication
043505766 4/2006 403
Representation: EMTH - MULFP - Floating Point - Multiplication
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
EMTH
MULFP
value 2 and product
value 1ENABLES FP
MULTIPLICATIONOPERATION SUCCESSFUL
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = initiates FP multiplication
value 1(top node)
4x REAL Floating point value 1 (first of two contiguous registers) The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. FP value 1 in the multiplication operation is stored here.
value 2 and product(middle node)
4x REAL Floating point value 2 and the product (first of four contiguous registers) The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. FP value 2 in the multiplication operation is stored in the displayed register and the first implied register. The product of the multiplication is stored in FP format in the second and third implied registers.
MULFP(bottom node)
Selection of the subfunction MULFP
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-MULFP: Floating Point Multiplication
404 043505766 4/2006
Parameter Description
Floating Point Value 1 (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied:
Floating Point Value 2 and Product (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied:
Register Content
DisplayedFirst implied
FP value 1 in the multiplication operation is stored here.
Register Content
DisplayedFirst implied
FP value 2 in the multiplication operation is stored here.
Second impliedThird implied
The product of the multiplication is stored here in FP format.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 405
69EMTH-MULIF: Integer x Floating Point Multiplication
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-MULIF.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 406
Representation: EMTH - MULIF - Integer Multiplied by Floating Point 407
Parameter Description 409
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-MULIF: Integer x Floating Point Multiplication
406 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-MULIF: Integer x Floating Point Multiplication
043505766 4/2006 407
Representation: EMTH - MULIF - Integer Multiplied by Floating Point
Symbol Representation of the instruction
EMTH
MULIF
FPand
integerINITIATES INTEGER X
FP OPERATIONOPERATION SUCCESSFUL
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-MULIF: Integer x Floating Point Multiplication
408 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = initiates integer x FP operation
integer(top node)
4x DINT, UDINT
Integer value (first of two contiguous registers) The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. The double precision integer value to be multiplied by the FP value is stored here.
FP and product(middle node)
4x REAL FP value and product (first of four contiguous registers) The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. The displayed register and the first implied register store the FP value to be multiplied in the operation, and the product is posted in the second and third implied registers. The product is posted in FP format.The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. The displayed register and the first implied register store the FP value to be multiplied in the operation, and the product is posted in the second and third implied registers. The product is posted in FP format.
MULIF(bottom node)
Selection of the subfunction MULIF
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-MULIF: Integer x Floating Point Multiplication
043505766 4/2006 409
Parameter Description
Integer Value (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied:
FP Value and Product (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied:
Register Content
DisplayedFirst implied
The double precision integer value to be multiplied by the FP value is stored here.
Register Content
DisplayedFirst implied
The FP value to be multiplied in the operation is stored here.
Second impliedThird implied
The product of the multiplication is stored here in FP format.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-MULIF: Integer x Floating Point Multiplication
410 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 411
70EMTH-PI: Load the Floating Point Value of "Pi"
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-PI (Load the Floating Point Value of ).
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 412
Representation: EMTH - PI - Floating Point Math - Load the Floating Point Value of PI
413
Parameter Description 415
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-PI: Load the Floating Point Value of "Pi"
412 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-PI: Load the Floating Point Value of "Pi"
043505766 4/2006 413
Representation: EMTH - PI - Floating Point Math - Load the Floating Point Value of PI
Symbol Representation of the instruction
EMTH
PI
FP Valueof
not usedLOADS FLOATING POINTVALUE OF PI TO MIDDLE
NODE REGISTERS
OPERATION SUCCESSFUL
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-PI: Load the Floating Point Value of "Pi"
414 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = loads FP value of to middle node register
not used(top node)
4x REAL First of two contiguous registersThe first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. These registers are not used but their allocation in state RAM is required.
FP value of (middle node)
4x REAL FP value of (first of four contiguous registers)The first of four contiguous 4xxxx registers is entered in the middle node.The remaining three registers are implied.The FP value of p is posted in the second and third implied registers. The displayed register and the first implied register are not used but their allocation in state RAM is required.Tip: To preserve registers, you can make the 4xxxx reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
PI(bottom node)
Selection of the subfunction PI
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-PI: Load the Floating Point Value of "Pi"
043505766 4/2006 415
Parameter Description
Not used (Top Node)
The first of two contiguous 4x registers is entered in the middle node. The second register is implied:
Floating Point Value of (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied:
Register Content
DisplayedFirst implied
These registers are not used but their allocation in state RAM is required.
Register Content
DisplayedFirst implied
These registers are not used but their allocation in state RAM is required.
Second impliedThird implied
The FP value of is posted here.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-PI: Load the Floating Point Value of "Pi"
416 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 417
71EMTH-POW: Raising a Floating Point Number to an Integer Power
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-POW.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 418
Representation: EMTH - POW - Raising a Floating Point Number to an Integer Power
419
Parameter Description 421
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-POW: Raising a Floating Point Number to an Integer Power
418 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-POW: Raising a Floating Point Number to an Integer Power
043505766 4/2006 419
Representation: EMTH - POW - Raising a Floating Point Number to an Integer Power
Symbol Representation of the instruction
EMTH
POW
integerand
result
FP valueCALCULATES FP VAL-
UE RAISED TO THEPOWER OF INT VALUE
OPERATION SUCCESSFUL
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-POW: Raising a Floating Point Number to an Integer Power
420 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = calculates FP value raised to the power of integer value
FP value(top node)
4x REAL FP value (first of two contiguous registers)The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. The FP value to be raised to the integer power is stored here.
integer and result(middle node)
4x INT, UINT Integer value and result (first of four contiguous registers). The first of four contiguous 4xxxx registers is entered in the middle node.The remaining three registers are implied.The bit values in the displayed register must all be cleared to zero. An integer value representing the power to which the top-node value will be raised is stored in the first implied register. The result of the FP value being raised to the power of the integer value is stored in the second and third implied registers.
POW(bottom node)
Selection of the subfunction POW
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-POW: Raising a Floating Point Number to an Integer Power
043505766 4/2006 421
Parameter Description
FP Value (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied:
Integerand Result (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied:
Register Content
DisplayedFirst implied
The FP value to be raised to the integer power is stored here.
Register Content
Displayed The bit values in this register must all be cleared to zero.
First implied An integer value representing the power to which the top-node value will be raised is stored here.
Second impliedThird implied
The result of the FP value being raised to the power of the integer value is stored here.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-POW: Raising a Floating Point Number to an Integer Power
422 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 423
72EMTH-SINE: Floating Point Sine of an Angle (in Radians)
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-SINE.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 424
Representation: EMTH - SINE - Floating Point Math - Sine of an Angle (in Radians)
425
Parameter Description 427
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SINE: Floating Point Sine of an Angle (in Radians)
424 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SINE: Floating Point Sine of an Angle (in Radians)
043505766 4/2006 425
Representation: EMTH - SINE - Floating Point Math - Sine of an Angle (in Radians)
Symbol Representation of the instruction
EMTH
SINE
sine ofvalue
valueCALCULATES THE
SINE OF THE VALUEOPERATION SUCCESSFUL
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SINE: Floating Point Sine of an Angle (in Radians)
426 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = calculates the sine of the value
value(top node)
4x REAL FP value indicating the value of an angle in radians (first of two contiguous registers)The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. An FP value indicating the value of an angle in radians is stored here.The magnitude of this value must be < 65536.0; if not:
The sine is not computedAn invalid result is returnedAn error is flagged in the EMTH ERLOG function
sine of value(middle node)
4x REAL Sine of the value in the top node (first of four contiguous registers) The first of four contiguous 4xxxx registers is entered in the middle node.The remaining three registers are implied. The sine of the value in the top node is posted in the second and third implied registers in FP format. The displayed register and the first implied register are not used but their allocation in state RAM is required.Tip: To preserve registers, you can make the 4xxxx reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
SINE(bottom node)
Selection of the subfunction SINE
Top output 0x None ON = operation successful**Error is flagged in the EMTH ERLOG function.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SINE: Floating Point Sine of an Angle (in Radians)
043505766 4/2006 427
Parameter Description
Value (Top Node) The first of two contiguous 4x registers is entered in the top node. The second register is implied.
If the magnitude is 65 536.0:The sine is not computedAn invalid result is returnedAn error is flagged in the EMTH-ERLOG function
Sine of Value (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied
Register Content
DisplayedFirst implied
An FP value indicating the value of an angle in radians is stored here. The magnitude of this value must be < 65 536.0.
Register Content
DisplayedFirst implied
Registers are not used but their allocation in state RAM is required.
Second impliedThird implied
The sine of the value in the top node is posted here in FP format.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SINE: Floating Point Sine of an Angle (in Radians)
428 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 429
73EMTH-SQRFP: Floating Point Square Root
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-SQRFP.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 430
Representation: EMTH - SQRFP - Square Root 431
Parameter Description 433
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SQRFP: Floating Point Square Root
430 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SQRFP: Floating Point Square Root
043505766 4/2006 431
Representation: EMTH - SQRFP - Square Root
Symbol Representation of the instruction
EMTH
SQRFP
result
valueINITIATES SQUARE
ROOTON FLOATING POINT
VALUE
OPERATION SUCCESSFUL
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SQRFP: Floating Point Square Root
432 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = initiates square root on FP value
value(top node)
4x REAL Floating point value (first of two contiguous registers). The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. The FP value on which the square root operation is performed is stored here.
result(middle node)
4x REAL Result in FP format (first of four contiguous registers). The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. The result of the square root operation is posted in FP format in the second and third implied registers. The displayed register and the first implied register in the middle node are not used in the operation but their allocation in state RAM is required.Tip: To preserve registers, you can make the 4xxxx reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
SQRFP(bottom node)
Selection of the subfunction SQRFP
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SQRFP: Floating Point Square Root
043505766 4/2006 433
Parameter Description
Floating Point Value (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied.
Result (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied
Register Content
DisplayedFirst implied
The FP value on which the square root operation is performed is stored here.
Register Content
DisplayedFirst implied
Registers are not used but their allocation in state RAM is required.
Second impliedThird implied
The result of the square root operation is posted here in FP format.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SQRFP: Floating Point Square Root
434 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 435
74EMTH-SQRT: Floating Point Square Root
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-SQRT.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 436
Representation: EMTH - SQRT - Square Root 437
Parameter Description 439
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SQRT: Floating Point Square Root
436 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Integer Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SQRT: Floating Point Square Root
043505766 4/2006 437
Representation: EMTH - SQRT - Square Root
Symbol Representation of the instruction
INITIATES A STAN-DARD SQRTOPERATION
OPERATION SUCCESSFUL
TOP NODE VALUE OUT OFRANGE
source
result
EMTH
SQRT
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SQRT: Floating Point Square Root
438 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = initiates a standard square root operation
source(top node)
3x, 4x DINT, UDINT
Source value (first of two contiguous registers) The first of two contiguous 3xxxx or 4xxxx registers is entered in the top node. The second register is implied. The source value (the value for which the square root will be derived) is stored here. If you specify a 4xxxx register, the source value may be in the range of 0 through 99,999,99. The low-order half of the value is stored in the implied register, and the high-order half is stored in the displayed register. If you specify a 3xxxx register, the source value may be in the range of 0 through 9,999. The square root calculation is done on only the value in the displayed register; the implied register is required but not used.
result(middle node)
4x DINT, UDINT
Result (first of two contiguous registers)Enter the first of two contiguous 4xxxx registers in the middle node. The second register is implied. The result of the standard square root operation is stored here.The result is stored in the fixed-decimal format: 1234.5600. where the displayed register stores the four-digit value to the left of the first decimal point and the implied register stores the four-digit value to the right of the first decimal point. Numbers after the second decimal point are truncated; no round-off calculations are performed.
SQRT(bottom node)
Selection of the subfunction SQRT
Top output 0x None ON = operation successful
Middle output 0x None ON =source value out of range
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SQRT: Floating Point Square Root
043505766 4/2006 439
Parameter Description
Source Value (Top Node)
The first of two contiguous 3x or 4x registers is entered in the top node. The second register is implied. The source value, i.e. the value for which the square root will be derived, is stored here.
If you specify a 4x register, the source value may be in the range 0 ... 99 999 99:
If you specify a 3x register, the source value may be in the range 0 ... 9 999:
Result (Middle Node)
Enter the first of two contiguous 4x registers in the middle node. The second register is implied. The result of the standard square root operation is stored here in the fixed-decimal format: 1234.5600.:.
Register Content
Displayed The high-order half of the value is stored here.
First implied The low-order half of the value is stored here.
Register Content
Displayed The square root calculation is done on only the value in the displayed register
First implied This register is required but not used.
Register Content
Displayed This register stores the four-digit value to the left of the first decimal point.
First implied This register stores the four-digit value to the right of the first decimal point.
Note: Numbers after the second decimal point are truncated; no round-off calculations are performed.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SQRT: Floating Point Square Root
440 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 441
75EMTH-SQRTP: Process Square Root
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-SQRTP.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 442
Representation: EMTH - SQRTP - Double Precision Math - Process Square Root
443
Parameter Description 445
Example 446
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SQRTP: Process Square Root
442 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Integer Math."
The process square root function tailors the standard square root function for closed loop analog control applications. It takes the result of the standard square root result, multiplies it by 63.9922 (the square root of 4 095) and stores that linearized result in the middle-node registers.
The process square root is often used to linearize signals from differential pressure flow transmitters so that they may be used as inputs in closed loop control operations.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SQRTP: Process Square Root
043505766 4/2006 443
Representation: EMTH - SQRTP - Double Precision Math - Process Square Root
Symbol Representation of the instruction
INITIATES A PROCESSSQUARE ROOT
OPERATION
OPERATION SUCCESSFUL
TOP NODE VALUE OUT OFRANGE
source
linearizedresult
EMTH
SQRTP
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SQRTP: Process Square Root
444 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = initiates process square root operation
source(top node)
3x, 4x DINT, UDINT Source value (first of two contiguous registers) The first of two contiguous 3xxxx or 4xxxx registers is entered in the top node. The second register is implied. The source value (the value for which the square root will be derived) is stored in these two registers. In order to generate values that have meaning, the source value must not exceed 4095. In a 4xxxx register group the source value will therefore be stored in the implied register, and in a 3xxxx register group the source value will be stored in the displayed register.
linearized result(middle node)
4x DINT, UDINT Linearized result (first of two contiguous registers) The first of two contiguous 4xxxx registers is entered in the middle node. The second register is implied. The linearized result of the process square root operation is stored here. The result is stored in the fixed-decimal format: 1234.5600. where the displayed register stores the four-digit value to the left of the first decimal point and the implied register stores the four-digit value to the right of the first decimal point. Numbers after the second decimal point are truncated; no round-off calculations are performed.
SQRTP(bottom node)
Selection of the subfunction SQRPT
Top output 0x None ON = operation successful
Middle output 0x None ON =source value out of range
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SQRTP: Process Square Root
043505766 4/2006 445
Parameter Description
Source Value (Top Node)
The first of two contiguous 3x or 4x registers is entered in the top node. The second register is implied. The source value, i.e. the value for which the square root will be derived, is stored here. In order to generate values that have meaning, the source value must not exceed 4 095.
If you specify a 4x register:
If you specify a 3x register:
Linearized Result (Middle Node)
The first of two contiguous 4x registers is entered in the middle node. The second register is implied. The linearized result of the process square root operation is stored here n the fixed-decimal format 1234.5600..
Register Content
Displayed Not used
First implied The source value will be stored here
Register Content
Displayed The source value will be stored here
First implied Not used.
Register Content
Displayed This register stores the four-digit value to the left of the first decimal point.
First implied This register stores the four-digit value to the right of the first decimal point.
Note: Numbers after the second decimal point are truncated; no round-off calculations are performed.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SQRTP: Process Square Root
446 043505766 4/2006
Example
Process Square Root Function
This example gives a quick overview of how the process square root is calculated.
Instruction
Suppose a source value of 2000 is stored in register 300030 of EMTH function SQRTP.
First, a standard square root operation is performed:
Then this result is multiplied by 63.9922, yielding a linearized result of 2861.63:
The linearized result is placed in the two registers in the middle node:
Register Part of the result
400030 2861 (four-digit value to the left of the first decimal point)
400031 6300 (four-digit value to the right of the first decimal point)
300030
400030
EMTH
SQRTP
2000 0044.72=
0044.72 63.9922 2861.63=
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 447
76EMTH-SUBDP: Double Precision Subtraction
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-SUBDP.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 448
Representation: EMTH - SUBDP - Double Precision Math - Subtraction 449
Parameter Description 451
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SUBDP: Double Precision Subtraction
448 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Double Precision Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SUBDP: Double Precision Subtraction
043505766 4/2006 449
Representation: EMTH - SUBDP - Double Precision Math - Subtraction
Symbol Representation of the instruction
TOP NODE > MIDDLENODE
TOP NODE = MIDDLENODE
TOP NODE < MIDDLENODE
SUBTRACTS MIDDLENODE FROM TOP
NODEoperand 1
operand 2/difference
EMTH
SUBDP
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SUBDP: Double Precision Subtraction
450 043505766 4/2006
Parameter Description
Description of the instruction’s parameters
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = subtracts operand 2 from operand 1 and posts difference in designated registers
operand 1(top node)
4x DINT, UDINT
Operand 1 (first of two contiguous registers)The first of two contiguous 4xxxx registers is entered in the top node. The second 4xxxx register is implied. Operand 1 is stored here. Each register holds a value in the range 0000 through 9999, for a combined double precision value in the range of 0 through 99,999,999. The low-order half of operand 1 is stored in the displayed register, and the high-order half is stored in the implied register.
operand 2/ difference(middle node)
4x DINT, UDINT
Operand 2 and difference (first of six contiguous registers)The first of six contiguous 4xxxx registers is entered in the middle node. The remaining five registers are implied:
The displayed register and the first implied register store the high-order and low-order halves of operand 2, respectively, for a combined double precision value in the range 0 through 99,999,999The second and third implied registers store the high-order and low-order halves, respectively, of the absolute difference in double precision formatThe value stored in the fourth implied register indicates whether or not the operands are in the valid range (1 = out of range and 0 = in range)The fifth implied register is not used in this calculation but must exist in state RAM
SUBDP(bottom node)
Selection of the subfunction SUBDP
Top output 0x None ON = operand 1 > operand 2
Middle output 0x None ON = operand 1 = operand 2
Bottom output 0x None ON = operand 1 < operand 2
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SUBDP: Double Precision Subtraction
043505766 4/2006 451
Parameter Description
Operand 1 (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second 4x register is implied. Operand 1 is stored here.
Operand 2 and Product (Middle Node)
The first of six contiguous 4x registers is entered in the middle node. The remaining five registers are implied:
Register Content
Displayed Register stores the low-order half of operand 1 Range 0 000 ... 9 999, for a combined double precision value in the range 0 ... 99 999 999
First implied Register stores the high-order half of operand 1 Range 0 000 ... 9 999, for a combined double precision value in the range 0 ... 99 999 999
Register Content
Displayed Register stores the low-order half of operand 2 for a combined double precision value in the range 0 ... 99 999 999
First implied Register stores the high-order half of operand 2 for a combined double precision value in the range 0 ... 99 999 999
Second implied This register stores the low-order half of the absolute difference in double precision format
Third implied This register stores the high-order half of the absolute difference in double precision format
Fourth implied 0 = operands in range1 = operands out of range
Fifth implied This register is not used in the calculation but must exist in state RAM.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SUBDP: Double Precision Subtraction
452 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 453
77EMTH-SUBFI: Floating Point - Integer Subtraction
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-SUBFI.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 454
Representation: EMTH - SUBFI - Floating Point minus Integer 455
Parameter Description 456
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SUBFI: Floating Point - Integer Subtraction
454 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SUBFI: Floating Point - Integer Subtraction
043505766 4/2006 455
Representation: EMTH - SUBFI - Floating Point minus Integer
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
FP
integer anddifference
EMTH
SUBFI
INITIATES FP INTEGEROPERATION
OPERATION SUCCESSFUL
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = initiates FP - integer operation
FP(top node)
4x REAL Floating point value (first of two contiguous registers) The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. The FP value from which the integer value is subtracted is stored here.
integer and difference(middle node)
4x DINT, UDINT
Integer value and difference (first of four contiguous registers) The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. The displayed register and the first implied register store the double precision integer value to be subtracted from the FP value, and the difference is posted in the second and third implied registers. The difference is posted in FP format.
SUBFI(bottom node)
Selection of the subfunction SUBFI
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SUBFI: Floating Point - Integer Subtraction
456 043505766 4/2006
Parameter Description
Floating Point Value (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied.
Sine of Value (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied
Register Content
DisplayedFirst implied
The FP value from which the integer value is subtracted is stored here.
Register Content
DisplayedFirst implied
Registers store the double precision integer value to be subtracted from the FP value.
Second impliedThird implied
The difference is posted here in FP format.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 457
78EMTH-SUBFP: Floating Point Subtraction
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-SUBFP.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 458
Representation: EMTH - SUBFP - Floating Point - Subtraction 459
Parameter Description 460
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SUBFP: Floating Point Subtraction
458 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SUBFP: Floating Point Subtraction
043505766 4/2006 459
Representation: EMTH - SUBFP - Floating Point - Subtraction
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
value 2and
EMTH
SUBFP
value 1OPERATION SUCCESSFUL
ENABLES FPSUBTRACTION
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = initiates FP value 1 - value 2 subtraction
value 1(top node)
4x REAL Floating point value 1 (first of two contiguous registers). The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. FP value 1 (the value from which value 2 will be subtracted) is stored here.
value 2 and difference(middle node)
4x REAL Floating point value 2 and the difference (first of four contiguous registers). The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. FP value 2 (the value to be subtracted from value 1) is stored in the displayed register and the first implied register. The difference of the subtraction is stored in FP format in the second and third implied registers.
SUBFP(bottom node)
Selection of the subfunction SUBFP
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SUBFP: Floating Point Subtraction
460 043505766 4/2006
Parameter Description
Floating Point Value 1 (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied.
Floating Point Value 2 (Top Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied
Register Content
DisplayedFirst implied
FP value 1 (the value from which value 2 will be subtracted) is stored here.
Register Content
DisplayedFirst implied
FP value 2 (the value to be subtracted from value 1) is stored in these registers
Second impliedThird implied
The difference of the subtraction is stored here in FP format.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 461
79EMTH-SUBIF: Integer - Floating Point Subtraction
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-SUBIF.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 462
Representation: EMTH - SUBIF - Integer minus Floating Point 463
Parameter Description 464
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SUBIF: Integer - Floating Point Subtraction
462 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SUBIF: Integer - Floating Point Subtraction
043505766 4/2006 463
Representation: EMTH - SUBIF - Integer minus Floating Point
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
integer
FP anddifference
EMTH
SUBIF
INITIATES INTERG-ER - FP OPERA-
TION
OPERATION SUCCESSFUL
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = initiates integer - FP operation
integer(top node)
4x DINT, UDINT
Integer value (first of two contiguous registers)The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. The double precision integer value from which the FP value is subtracted is stored here.
FP and difference (middle node)
4x REAL FP value and difference (first of four contiguous registers) The first of four contiguous 4xxxx registers is entered in the middle node. The remaining three registers are implied. The displayed register and the first implied register store the FP value to be subtracted from the integer value, and the difference is posted in the second and third implied registers. The difference is posted in FP format.
SUBIF(bottom node)
Selection of the subfunction SUBIF
Top output 0x None ON = operation successful
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-SUBIF: Integer - Floating Point Subtraction
464 043505766 4/2006
Parameter Description
Integer Value (Top Node)
The first of two contiguous 4x registers is entered in the top node. The second register is implied.
FP Value and Difference (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied
Register Content
DisplayedFirst implied
The double precision integer value from which the FP value is subtracted is stored here.
Register Content
DisplayedFirst implied
Registers store the FP value to be subtracted from the integer value.
Second impliedThird implied
The difference is posted here in FP format.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 465
80EMTH-TAN: Floating Point Tangent of an Angle (in Radians)
At a Glance
Introduction This chapter describes the EMTH subfunction EMTH-TAN.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 466
Representation: EMTH - TAN - Tangent of an Angle (in Radians) 467
Parameter Description 468
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-TAN: Floating Point Tangent of an Angle (in Radians)
466 043505766 4/2006
Short Description
Function Description
This instruction is a subfunction of the EMTH instruction. It belongs to the category "Floating Point Math."
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-TAN: Floating Point Tangent of an Angle (in Radians)
043505766 4/2006 467
Representation: EMTH - TAN - Tangent of an Angle (in Radians)
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
value
tangent ofvalue
EMTH
TAN
OPERATION SUCCESSFUL
CALCULATES THETANGENT OF THEFLOATING POINT
VALUE
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = calculates the tangent of the value
value(top node)
4x REAL FP value indicating the value of an angle in radians (first of two contiguous registers)The first of two contiguous 4xxxx registers is entered in the top node. The second register is implied. A value in FP format indicating the value of an angle in radians is stored here.The magnitude of this value must be < 65536.0; if not:
The tangent is not computedAn invalid result is returnedAn error is flagged in the EMTH ERLOG function
tangent of value(middle node)
4x REAL Tangent of the value in the top node (first of four contiguous registers)
TAN(bottom node)
Selection of the subfunction TAN
Top output 0x None ON = operation successful**Error is flagged in the EMTH ERLOG function.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EMTH-TAN: Floating Point Tangent of an Angle (in Radians)
468 043505766 4/2006
Parameter Description
Value (Top Node) The first of two contiguous 4x registers is entered in the top node. The second register is implied.
If the magnitude is 65 536.0:The tangent is not computedAn invalid result is returnedAn error is flagged in the EMTH-ERLOG function
Tangent of Value (Middle Node)
The first of four contiguous 4x registers is entered in the middle node. The remaining three registers are implied
Register Content
DisplayedFirst implied
An FP value indicating the value of an angle in radians is stored here. The magnitude of this value must be < 65 536.0.
Register Content
DisplayedFirst implied
Registers are not used but their allocation in state RAM is required.
Second impliedThird implied
The tangent of the value in the top node is posted here in FP format.
Note: To preserve registers, you can make the 4x reference numbers assigned to the displayed register and the first implied register in the middle node equal to the register references in the top node, since the first two middle-node registers are not used.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 469
81ESI: Support of the ESI Module
At a Glance
Introduction This chapter describes the instruction ESI.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 470
Representation 471
Parameter Description 472
READ ASCII Message (Subfunction 1) 475
WRITE ASCII Message (Subfunction 2) 479
GET DATA (Subfunction 3) 480
PUT DATA (Subfunction 4) 482
ABORT (Middle Input ON) 486
Run Time Errors 487
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
470 043505766 4/2006
Short Description
Function Description
The instruction for the ESI module 140 ESI 062 10 are optional loadable instructions that can be used in a Quantum controller system to support operations using a ESI module. The controller can use the ESI instruction to invoke the module. The power of the loadable is its ability to cause a sequence of commands over one or more logic scans.
With the ESI instruction, the controller can invoke the ESI module to:Read an ASCII message from a serial port on the ESI module, then perform a sequence of GET DATA transfers from the module to the controller.Write an ASCII message to a serial port on the ESI module after having performed a sequence of PUT DATA transfers to the variable data registers inthe module.Perform a sequence of GET DATA transfers (up to 16 384 registers of data from the ESI module to the controller); one Get Data transfer will move up to 10 data registers each time the instruction is solved.Perform a sequence of PUT DATA (up to 16 384 registers of data to the ESI module from the controller). One PUT DATA transfer moves up to 10 registers of data each time the instruction is solved.Abort the ESI loadable command sequence running.
Note: This instruction is only available if you have unpacked and installed the DX Loadables. For further information, see p. 101."
Note: After placing the ESI instruction in your ladder diagram you must enter the top, middle and bottom parameters. Proceed by double clicking on the instruction. This action produces a form for the entry of the 3 paramteers. This parametric must be completed to enable the DX zoom function in the Edit menu pulldown.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
043505766 4/2006 471
Representation
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
subfunction #(1 ... 4)
subfunctionparameters
ESI
length
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON = enables the subfunction
Middle input 0x, 1x None Abort current message
subfunction(top node
4x INT, UINT, WORD
Number of possible subfunction, range 1 ... 4
subfunction parameters(middle node)
4x INT, UINT, WORD
First of eighteen contiguous 4x holding registers which contain the subfunction parameters
lengthbottom node
INT, UINT Number of subfunction parameter registers, i.e. the length of the table in the middle node
Top output 0x None Echoes state of the top input
Middle output 0x None ON = operation done
Bottom output 0x None ON = error detected
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
472 043505766 4/2006
Parameter Description
Top Input When the input to the top node is powered ON, it enables the ESI instruction and starts executing the command indicated by the subfunction code in the top node.
Middle Input When the input to the middle node is powered ON, an Abort command is issued. If a message is running when the ABORT command is received, the instruction will complete; if a data transfer is in process when the ABORT command is received, the transfer will stop and the instruction will complete.
Subfunction # (Top Node)
The top node may contain either a 4x register or an integer. The integer or the value in the register must be in the range 1 ... 4.
It represents one of four possible subfunction command sequences to be executed by the instruction:
Subfunction Parameters (Middle Node)
The first of eighteen contiguous 4x registers is entered in the middle node. The ramaining seventeen registers are implied.
The following subfunction parameters are available:
Subfunction Command Sequence
1 One command (READ p. 475) followed by multiple GET DATA commands
2 Multiple PUT DATA commands followed by one command (See p. 479)
3 Zero or more commands (GET DATA p. 480)
4 Zero or more commands (PUT DATA p. 482)
Note: A fifth command, (ABORT ASCII Message (See p. 486)), can be initiated by enabling the middle input to the ESI instruction.
Register Parameter Contents
Displayed ESI status register Returned error codes
First implied Address of the first 4x register in the command structure
Register address minus the leading 4 and any leading zeros, as specified in the I/O Map (e.g., 1 represents register 400001)
Second implied
Address of the first 3x register in the command structure
Register address minus the leading 3 and any leading zeros, as specified in the I/O Map (e.g., 7 represents register 300007)
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
043505766 4/2006 473
Length (Bottom Node)
The bottom node contains the length of the table in the middle node, i.e., the number of subfunction parameter registers. For READ/ WRITE operations, the length must be 10 registers. For PUT/GET operations, the required length is eight registers; 10 may be specified and the last two registers will be unused.
Third implied Address of the first 4x register in the controller's data register area
Register address minus the leading 4 and any leading zeros (e.g., 100 representing register 400100)
Fourth implied Address of the first 3x register in the controller's data register area
Register address minus the leading 3 and any leading zeros (e.g., 1000 representing register 301000)
Fifth implied Starting register for data register area in module
Number in the range 0 ... 3FFF hex
Sixth implied Data transfer count Number in the range 0 ... 4000 hex
Seventh implied
ESI timeout value, in 100 ms increments
Number in the range 0 ... FFFF hex, where 0 means no timeout
Eighth implied ASCII message number Number in the range 1 ... 255 dec
Ninth implied ASCII port number 1 or 2
Note: The registers below are internally used by the ESI loadable. Do not write registers while the ESI loadable is running. For best use, initialize these registers to 0 (zero) when the loadable is inserted into logic.
10th implied ESI loadable previous scan power in state
11th implied Data left to transfer
12th implied Current ASCII module command running
13th implied ESI loadable sequence number
14th implied ESI loadable flags
15th implied ESI loadable timeout value (MSW)
16th implied ESI loadable timeout value (LSW)
17th implied Parameter Table Checksum generated by ESI loadable
Note: Once power has been applied to the top input, the ESI loadable starts running. Until the ESI loadable compiles (successfully or in error), the subfunction parameters should not be modified. If the ESI loadable detects a change, the loadable will compile in error (Parameter Table).
Register Parameter Contents
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
474 043505766 4/2006
Ouptuts
Middle Output The middle output goes ON for one scan when the subfunction operation specified in the top node is completed, timed out, or aborted
Bottom Output The bottom output goes ON for one scan if an error has been detected. Error checking is the first thing that is performed on the instruction when it is enabled, it it is completed before the subfunction is executed. For more details, see p. 487.
Note: NSUP must be loaded before ESI in order for the loadable to work properly. If ESI is loaded before NSUP or ESI is loaded alone, all three outputs will be turned ON.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
043505766 4/2006 475
READ ASCII Message (Subfunction 1)
READ ASCII Message
A READ ASCII command causes the ESI module to read incoming data from one of its serial ports and store the data in internal variable data registers. The serial port number is specified in the tenth (ninth implied) register of the subfunction parameters table. The ASCII message number to be read is specified in the ninth (eighth implied) register of the subfunction parameters table. The received data is stored in the 16K variable data space in user-programmed formats.
When the top node of the ESI instruction is 1, the controller invokes the module and causes it to execute one READ ASCII command followed by a sequence of GET DATA commands (transferring up to 16,384 registers of data) from the module to the controller.
Command Structure
Command Structure
Response Structure
Command Structure
Word Content (hex) Meaning
0 01PD P = port number (1 or 2); D = data count
1 xxxx Starting register number, in the range 0 ... 3FFF
2 00xx Message number, where xx is in the range 1 ... FF (1 ... 255 dec)
3 ... 11 Not used
Word Content (hex) Meaning
0 01PD Echoes command word 0
1 xxxx Echoes starting register number from Command Word 1
2 00xx Echoes message number from Command Word 2
3 xxxx Data word 1
4 xxxx Data word 2
... ... ...
11 xxxx Module status or data word 9
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
476 043505766 4/2006
A Comparative READ ASCII Message/Put Data Example
Below is an example of how an ESI loadable instruction can simplify your logic programming task in an ASCII read application. Assume that the 12-point bidirectional ESI module has been I/O mapped to 400001 ... 400012 output registers and 300001 ... 300012 input registers. We want to read ASCII message #10 from port 1, then transfer four words of data to registers 400501 ... 400504 in the controller.
Parameterizing of the ESI instruction:
The subfunction parameter table begins at register 401000 . Enter the following parameters in the table:
With these parameters entered to the table, the ESI instruction will handle the read and data transfers automatically in one scan.
Register Parameter Value Description
401000 nnnn ESI status register
401001 1 I/O mapped output starting register (400001)
401002 1 I/O mapped input starting register (300001)
401003 501 Starting register for the data transfer (400501)
401004 0 No 3x starting register for the data transfer
401005 100 Module start register
401006 4 Number of registers to transfer
401007 600 timeout = 60 s
401008 10 ASCII message number
401009 1 ASCII port number
401010-17 N/A Internal loadable variables
#0001
401000
ESI
#0018
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
043505766 4/2006 477
Read and Data Transfers without ESI Instruction
The same task could be accomplished in ladder logic without the ESI loadable, but it would require the following three networks to set up the command and transfer parameters, then copy the data. Registers 400101 ... 400112 are used as workspace for the output values. Registers 400201 ... 400212 are initial READ ASCII Message command values. Registers 400501 ... 400504 are the data space for the received data from the module.
First Network
Contents of registers
The first network starts up the READ ASCII Message command by turning ON coil 000011 forever. It moves the READ ASCII Message command into the workspace, then moves the workspace to the output registers for the module.
Second Network
Register Value (hex) Description
400201 0114 READ ASCII Message command, Port 1, Four registers
400202 0064 Module’s starting register
400203 nnnn Not valid: data word 1
... ... ...
400212 nnnn Not valid: data word 10
000011 000011
000011
BLKM
400101
#0012
400201
BLKM
400001
#0012
400101
000011
BLKM
400098
#0001
300001
AND
400098
#0001
400088
TEST
400101
#0001
400098
TEST
400102
#0001
300002
BLKM
400099
#0001
300001
AND
400099
#0001
400089 TEST
#32768
#0001
400099
000020
000012
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
478 043505766 4/2006
Contents of registers
As long as coil 000011 is ON, READ ASCII Message response Word 0 in the input register is tested to make sure it is the same as command Word 0 in the workspace. This is done by ANDing response Word 0 in the input register with 7FFF hex to get rid of the Status Word Valid bit (bit 15) in Response Word 0.
The module start register in the input register is also tested against the module start register in the workspace to make sure that are the same.
If both these tests show matches, test the Status Word Valid bit in response Word 0. To do this, AND response Word 0 in the input register with 8000 hex to get rid of the echoed command word 0 information. If the ANDed result equals the Status Word Valid bit, coil 000020 is turned ON indicating an error and/or status in the Module Status Word. If the ANDed result is not the status word valid bit, coil 000012 is turned ON indicating that the message is done and that you can start another command in the module.
Third Network
If coil 000020 is ON, this third network will test the Module Status Word for busy status. If the module is busy, do nothing. If the Module Status Word is greater than 1 (busy), a detected error has been logged in the high byte and coil 000099 will be turned ON. At this point, you need to determine what the error is using some error-handling logic that you have developed.
Register Value (hex) Description
400098 nnnn Workspace for response word
400099 nnnn Workspace for response word
400088 7FFF Response word mask
400089 8000 Status word valid bit mask
000020
TEST
#0001
#0001
300012
000099
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
043505766 4/2006 479
WRITE ASCII Message (Subfunction 2)
WRITE ASCII Message
In a WRITE ASCII Message command, the ESI module writes an ASCII message to one of its serial ports. The serial port number is specified in the tenth (ninth implied) register of the subfunction parameters table. The ASCII message number to be written is specified in the ninth (eighth implied) register of the subfunction parameters table.
When the top node of the ESI instruction is 2, the controller invokes the module and causes it to execute one Write ASCII command. Before starting the WRITE command, subfunction 2 executes a sequence of PUT DATA transfers (transferring up to 16 384 registers of data) from the controller to the module.
Command Structure
Command Structure
Response Structure
Response Structure
Word Content (hex) Meaning
0 02PD P = port number (1 or 2); D = data count
1 xxxx Starting register number, in the range 0 ... 3FFF
2 00xx Message number, where xx is in the range 1 ... FF (1 ... 255 dec)
3 xxxx Data word 1
4 xxxx Data word 2
... ... ...
11 xxxx Data word 9
Word Content (hex) Meaning
0 02PD Echoes command word 0
1 xxxx Echoes starting register number from command word 1
2 00xx Echoes message number from command word 2
3 0000 Returns a zero
... ... ...
10 0000 Returns a zero
11 xxxx Module status
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
480 043505766 4/2006
GET DATA (Subfunction 3)
GET DATA A GET DATA command transfers up to 10 registers of data from the ESI module to the controller each time the ESI instruction is solved in ladder logic. The total number of words to be read is specified in Word 0 of the GET DATA command structure (the data count). The data is returned in increments of 10 in Words 2 ... 11 in the GET DATA response structure.
If a sequence of GET DATA commands is being executed in conjunction with a READ ASCII Message command (via subfunction 1), up to nine registers are transferred when the instruction is solved the first time. Additional data are returned in groups of ten registers on subsequent solves of the instruction until all the data has been transferred
If there is an error condition to be reported (other than a command syntax error), it is reported in Word 11 in the GET DATA response structure. If the command has requested 10 registers and the error needs to be reported, only nine registers of data will be returned in Words 2 ... 10, and Word 11 will be used for error status.
Command Structure
Command Structure
Note: If the data count and starting register number that you specify are valid but some of the registers to be read are beyond the valid register range, only data from the registers in the valid range will be read. The data count returned in Word 0 of the response structure will reflect the number of valid data registers returned, and an error code (1280 hex) will be returned in the Module Status Word (Word 11 in the response table).
Word Content (hex) Meaning
0 030D D = data count
1 xxxx Starting register number, in the range 0 ... 3FFF
2 ... 11 Not used
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
043505766 4/2006 481
Response Structure
Response Structure
Word Content (hex) Meaning
0 030D Echoes command word 0
1 xxxx Echoes starting register number from command word 1
2 xxxx Data word 1
3 xxxx Data word 2
... ... ...
11 xxxx Module status or data word 10
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
482 043505766 4/2006
PUT DATA (Subfunction 4)
PUT DATA A PUT DATA command writes up to 10 registers of data to the ESI module from the controller each time the ESI instruction is solved in ladder logic. The total number of words to be written is specified in Word 0 of the PUT DATA command structure (the data count).
The data is returned in increments of 10 in words 2 ... 11 in the PUT DATA command structure. The command is executed sequentially until command word 0 changes to another command other than PUT DATA (040D hex).
Command Structure
Command Structure
Response Structure
Response Structure
Note: If the data count and starting register number that you specify are valid but some of the registers to be written are beyond the valid register range, only data from the registers in the valid range will be written. The data count returned in Word 0 of the response structure will reflect the number of valid data registers returned, and an error code (1280 hex) will be returned in the Module Status Word (Word 11 in the response table).
Word Content (hex) Meaning
0 040D D = data count
1 xxxx Starting register number, in the range 0 ... 3FFF
2 xxxx Data word 1
3 xxxx Data word 2
... ... ...
11 xxxx Data word 10
Word Content (hex) Meaning
0 040D Echoes command word 0
1 xxxx Echoes starting register number from command word 1
2 0000 Returns a zero
... ... ...
10 0000 Returns a zero
11 xxxx Module status
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
043505766 4/2006 483
A Comparative PUT DATA Example
Below is an example of how an ESI loadable instruction can simplify your logic programming task in a PUT DATA application. Assume that the 12-point bidirectional ESI 062 module has been I/O mapped to 400001 ... 400012 output registers and 300001 ... 300012 input registers. We want to put 30 controller data registers, starting at register 400501, to the ESI module starting at location 100.
Parameterizing of the ESI instruction:
The subfunction parameter table begins at register 401000 . Enter the following parameters in the table:
With these parameters entered to the table, the ESI instruction will handle the data transfers automatically over three ESI logic solves.
Register Parameter Value Description
401000 nnnn ESI status register
401001 1 I/O mapped output starting register (400001)
401002 1 I/O mapped input starting register (300001)
401003 501 Starting register for the data transfer (400501)
401004 0 No 3x starting register for the data transfer
401005 100 Module start register
401006 30 Number of registers to transfer
401007 0 timeout = never
401008 N/A ASCII message number
401009 N/A ASCII port number
401009 N/A Internal loadable variables
#0004
401000
ESI
#0018
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
484 043505766 4/2006
Handling of Data Transfer without ESI Instruction
The same task could be accomplished in ladder logic without the ESI loadable, but it would require the following four networks to set up the command and transfer parameters, then copy data multiple times until the operation is complete. Registers 400101 ... 400112 are used as workspace for the output values. Registers 400201 ... 400212 are initial PUT DATA command values. Registers 400501 ... 400530 are the data registers to be sent to the module.
First Network - Command Register Network
Contents of registers
The first network starts up the transfer of the first 10 registers by turning ON coil 000011 forever. It moves the initial PUT DATA command into the workspace, moves the first 10 registers (400501 ... 400510) into the workspace, and then moves the workspace to the output registers for the module.
Second Network - Command Register Network
Register Value (hex) Description
400201 040A PUT DATA command, 10 registers
400202 0064 Module’s starting register
400203 nnnn Not valid: data word 1
... ... ...
400212 nnnn Not valid: data word 10
000011 000011
000011
BLKM
400101
#0012
400201
BLKM
400103
#0010
400501
BLKM
400001
#0012
400101
000020 000020
000011
TEST
400101
#0001
300001
TEST
400102
#0001
300002
TEST
#0120
#0001
400102
000020
000012
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
043505766 4/2006 485
As long as coil 000011 is ON and coil 000020 is OFF, PUT DATA response word 0 in the input register is tested to make sure it is the same as the command word in the workspace. The module start register in the input register is also tested to make sure it is the same as the module start register in the workspace.
If both these tests show matches, the current module start register is tested against what would be the module start register of the last PUT DATA command for this transfer. If the test shows that the current module start register is greater than or equal to the last PUT DATA command, coil 000020 goes ON indicating that the transfer is done. If the test shows that the current module start register is less than the last PUT DATA command, coil 000012 indicating that the next 10 registers should be transferred.
Third Network - Command Register Network
As long as coil 000012 is ON, there is more data to be transferred. The module start register needs to be tested from the last command solve to determine which set of 10 registers to transfer next. For example, if the last command started with module register 400110, then the module start register for this command is 400120.
Fourth Network - Command Register Network
As long as coil 000012 is ON, add 10 to the module start register value in the workspace and move the workspace to the output registers for the module to start the next transfer of 10 registers.
000012
TEST
#0100
#0001
400102
BLKM
400103
#0010
400511
TEST
#0110
#0001
400102
BLKM
400103
#0010
400521
000012
AD16
400102
400102
#0010
BLKM
400001
#0012
400101
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
486 043505766 4/2006
ABORT (Middle Input ON)
ABORT When the middle input to the ESI instruction is powered ON, the instruction aborts a running ASCII READ or WRITE message. The serial port buffers of the module are not affected by the ABORT, only the message that is currently running.
Command Structure
Command Structure
Response Structure
Response Structure
Word Content (hex)
0 0900
1 ... 11 not used
Word Content (hex) Meaning
0 0900 Echoes command word 0
1 0000 Returns a zero
... ... ...
10 0000 Returns a zero
11 xxxx Module status
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
043505766 4/2006 487
Run Time Errors
Run Time Errors The command sequence executed by the ESI module (specified by the subfunction value in the top node of the ESI instruction) needs to go through a series of error checking routines before the actual command execution begins. If an error is detected, a message is posted in the register displayed in the middle node.
The following table lists possible error message codes and their meanings:
Once the parameter error checking has completed without finding an error, the ESI module begins to execute the command sequence.
Error Code (dec) Meaning
0001 Unknown subfunction specified in the top node
0010 ESI instruction has timed out (exceeded the time specified in the eighth register of the subfunction parameter table)
0101 Error in the READ ASCII Message sequence
0102 Error in the WRITE ASCII Message sequence
0103 Error in the GET DATA sequence
0104 Error in the PUT DATA sequence
1000 Length (Bottom Node) is too small
1001 Nonzero value in both the 4x and 3x data offset parameters
1002 Zero value in both the 4x and 3x data offset parameters
1003 4x or 3x data offset parameter out of range
1004 4x or 3x data offset plus transfer count out of range
1005 3x data offset parameter set for GET DATA
1006 Parameter Table Checksum error
1101 Output registers from the offset parameter out of range
1102 Input registers from the offset parameter out of range
2001 Error reported from the ESI module
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
ESI: Support of the ESI Module
488 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 489
82EUCA: Engineering Unit Conversion and Alarms
At a Glance
Introduction This chapter describes the instrcution EUCA.
What's in this Chapter?
This chapter contains the following topics:
Topic Page
Short Description 490
Representation: EUCA - Engineering Unit and Alarm 491
Parameter Description 492
Examples 494
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EUCA: Engineering Unit Conversion and Alarms
490 043505766 4/2006
Short Description
Function Description
The use of ladder logic to convert binary-expressed analog data into decimal units can be memory-intensive and scan-time intensive operation. The Engineering Unit Conversion and Alarms (EUCA) loadable is designed to eliminate the need for extra user logic normally required for these conversions. EUCA scales 12 bits of binary data (representing analog signals or other variables) into engineering units that are readily usable for display, data logging, or alarm generation.
Using Y = mX + b linear conversion, binary values between 0 ... 4095 are converted to a scaled process variable (SPV). The SPV is expressed in engineering units in the range 0 ... 9 999.
One EUCA instruction can perform up to four separate engineering unit conversions.
It also provides four levels of alarm checking on each of the four conversions:
Note: This instruction is only available if you have unpacked and installed the DX Loadables. For further information, see p. 101."
Level Meaning
HA High absolute
HW High warning
LW Low warning
LA Low absolute
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EUCA: Engineering Unit Conversion and Alarms
043505766 4/2006 491
Representation: EUCA - Engineering Unit and Alarm
Symbol Representation of the instruction
Parameter Description
Description of the instruction’s parameters
CONTROL INPUT
ALARM IN
ERROR IN
ACTIVE
ALARM
ERROR
alarm status
parametertable
EUCA
nibble #(1 ... 4)
Parameters State RAM Reference
Data Type Meaning
Top input 0x, 1x None ON initiates the conversion
Middle input 0x, 1x None Alarm input
Bottom input 0x, 1x None Error input
alarm status(top node)
4x INT, UINT Alarm status for as many as four EUCA conversions (For more information please see p. 492.)
parameter table(middle node)
4x INT, UINT, First of nine contiguous holding registers in the EUCA parameter table(For more information please see p. 493.)
nibble # (1...4)(bottom node)
INT, UINT Integer value, indicates which one of the four nibbles in the alarm status register to use
Top output 0x None Echoes the state of the top input
Middle output 0x None ON if the middle input is ON or if the result of the EUCA conversion crosses a warning level
Bottom output 0x None ON if the bottom input is ON or if a parameter is out of range
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EUCA: Engineering Unit Conversion and Alarms
492 043505766 4/2006
Parameter Description
Alarm Status (Top Node)
The 4x register entered in the top node displays the alarm status for as many as four EUCA conversions, which can be performed by the instruction. The register is segmented into four four-bit nibbles. Each four-bit nibble represents the four possible alarm conditions for an individual EUCA conversion.
The most significant nibble represents the first conversion, and the least significant nibble represents the fourth conversion:
Alarm Setting Condition of alarm setting
Only one alarm condition can exist in any EUCA conversion at any given time. If the SPV exceeds the high warning level the HW bit will be set. If the HA is exceeded, the HW bit is cleared and the HA bit is set. The alarm bit will not change after returning to a less severe condition until the deadband (DB) area has also been exited.
HA1 HA2HW1 LW1 LA1 HW2 LW2 LA2 HA3 HA4HW3 LW3 LA3 HW4 LW4 LA4
Nibble 1(first conversion)
Nibble 2(second conversion)
Nibble 3(third conversion)
Nibble 4(fourth conversion)
Alarm type Condition
HA An HA alarm is set when the SPV exceeds the user-defined high alarm value expressed in engineering units
HW An HW alarm is set when SPV exceeds a user-defined high warning value expressed in engineering units
LW An LW alarm is set when SPV is less than a user-defined low warning value expressed in engineering units
LA An LA alarm is set when SPV is less than a user-defined low alarm value expressed in engineering units
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EUCA: Engineering Unit Conversion and Alarms
043505766 4/2006 493
Parameter Table (Middle Node)
The 4x register entered in the middle node is the first of nine contiguous holding registers in the EUCA parameter table:
Register Content Range
Displayed Binary value input by the user 0 ... 4 095
First implied SPV calculated by the EUCA block
Second implied High engineering unit (HEU), maximum SPV required and set by the user (top of the scale)
LEU < HEU 99 999
Third implied Low engineering unit (LEU), minimum SPV required and set by the user (bottom end of the scale)
0 LEU < HEU
Fourth implied DB area in SPV units, below HA levels and above LA levels that must be crossed before the alarm status bit will reset
0 DB < (HEU - LEU)
Fifth implied HA alarm value in SPV units HW < HA HEU
Sixth implied HW alarm value in SPV units LW < HW < HA
Seventh implied LW alarm value in SPV units LA < LW < HW
Eighth implied LA alarm value in SPV units LEU LA < LW
Note: An error is generated if any value is out of the range defined above
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EUCA: Engineering Unit Conversion and Alarms
494 043505766 4/2006
Examples
Overview The following examples are shown.Principles of EUCA Operation (example 1)Use in a Drive System (example 2)Four EUCA conversions together (example 3)
Example 1 This example demonstrates the principles of EUCA operation. The binary value is manually input in the displayed register in the middle node, and the result is visually available in the SPV register (the first implied register in the middle node).
The illustration below shows an input range equivalent of a 0 ... 100 V measure, corresponding to the whole binary 12-bit range:
A range of 0 ... 100 V establishes 50 V for nominal operation. EUCA provides a margin on the nominal side of both warning and alarm levels (deadband). If an alarm threshold is exceeded, the alarm bit becomes active and stays active until the signal becomes greater (or less) than the DB setting -5 V in this example.
MSB
unused
11111111 1111
LSB
= 4095 or FFF hex
00000000 0000 = 0 or 000 hex
(Displayed register inthe middle node)
100V
90
80
70
60
50
40
30
20
10
0 V
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EUCA: Engineering Unit Conversion and Alarms
043505766 4/2006 495
Programming the EUCA block is accomplished by selecting the EUCA loadable and writing in the data as illustrated in the figure below:
Reference Data
The nine middle-node registers are set using the reference data editor. DB is 5 V followed by 10 V increments of high and low warning. The actual high and low alarm is set at 20 V above and below nominal.
On a graph, the example looks like this:
Register Meaning Content
400440 STATUS 0000000000000000
400450 INPUT 1871 DEC
400451 SPV 46 DEC
400452 HIGH_unit 100 DEC
400453 LOW_unit 0 DEC
400454 Dead_band 5 DEC
400455 HIGH_ALARM 70 DEC
400456 HIGH_WARN 60 DEC
400457 LOW_ALARM 40 DEC
400458 LOW_WARN 30 DEC
400440
400450
EUCA
# 0001
= Dead Band
100V
90
80
70
60
50
40
30
20
10
0 V
46 *
High Alarm
High Warning
Normal
Low Warning
Low Alarm
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EUCA: Engineering Unit Conversion and Alarms
496 043505766 4/2006
You can now verify the instruction in a running PLC by entering values in register 400450 that fall into the defined ranges. The verification is done by observing the bit change in register 400440 where:
Example 2 If the input of 0 ... 4095 indicates the speed of a drive system of 0 ... 5000 rpm, you could set up a EUCA instruction as follows.
The binary value in 400210 results in an SPV of 4835 decimal, which exceeds the high absolute alarm level, sets the HA bit in 400209, and powers the EUCA alarm node.
Instruction
Note: The example value shows a decimal 46, which is in the normal range. No alarm is set, i.e., register 400440 = 0.
1 = Low alarm1 = Low warning1 = High warning1 = High alarm
Parameter Speed
Maximum Speed 5 000 rpm
Minimum Speed 0 rpm
DB 100 rpm
HA Alarm 4 800 rpm
HW Alarm 4 450 rpm
LW Alarm 2 000 rpm
LA Alarm 1 200 rpm
400209
400210
EUCA
# 0001
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EUCA: Engineering Unit Conversion and Alarms
043505766 4/2006 497
Reference Data
The N.O. contact is used to suppress alarm checks when the drive system is shutdown, or during initial start up allowing the system to get above the Low alarm RPM level.
Varying the binary value in register 400210 would cause the bits in nibble 1 of register 400209 to correspond with the changes illustrated above. The DB becomes effective when the alarm or warning has been set, then the signal falls into the DB zone.
Register Meaning Content
400209 STATUS 1000000000000000
400210 INPUT 3960 DEC
400211 SPV 4835 DEC
400212 MAX_SPEED 5000 DEC
400213 MIN_SPEED 0 DEC
400214 Dead_band 100 DEC
400215 HIGH_ALARM 4800 DEC
400216 HIGH_WARN 4450 DEC
400217 LOW_ALARM 2000 DEC
400218 LOW_WARN 1200 DEC
5000 rqm4950490048504800475047004650460045504500445044004350430042504200
0
High Absolute400209 = 8000 hex
Warning - DB400209 = 4000 hexHigh Warning
400209 = 4000 hex*
Return to normal400209 = 0000 hex*
*
*
*
*
**
**
*
*
*
*
**
*
*
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EUCA: Engineering Unit Conversion and Alarms
498 043505766 4/2006
The alarm is maintained, thus taking what would be a switch chatter condition out of a marginal signal level. This point is exemplified in the chart above, where after setting the HA alarm and returning to the warning level at 4700 the signal crosses in and out of DB at the warning level (4450) but the warning bit in 400209 stays ON.
The same action would be seen if the signal were generated through the low settings.
Example 3 You can chain up to four EUCA conversions together to make one alarm status register. Each conversion writes to the nibble defined in the block bottom node. In the program example below, each EUCA block writes it‘s status (based on the table values for that block) into a four bit (nibble) of the status register 400209.
Reference Data
The status register can then be transferred using a BLKM instruction to a group of discretes wired to illuminate lamps in an alarm enunciator panel.
As you observe the status content of register 400209 you see: no alarm in block 1, an LW alarm in block 2, an HW alarm in Block 3, and an HA alarm in block 4.
Register Meaning Content
400209 STATUS 0000001001001000
400209
EUCA
400220
# 0002
400209
EUCA
400230
# 0003
400209
EUCA
400240
# 0004
000002
000023
000023400209
BLKM
000033
# 1
000004
400209
EUCA
400210
# 0001000003
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EUCA: Engineering Unit Conversion and Alarms
043505766 4/2006 499
The alarm conditions for the four blocks can be represented with the following table settings:
Conversion 1 Conversion 2 Conversion 3 Conversion 4
Input 400210 = 2048 400220 = 1220 400230 = 3022 400240 = 3920
Scaled # 400211 = 2501 400221 = 1124 400231 = 7379 400241 = 0770
HEU 400212 = 5000 400222 = 3300 400232 = 9999 400242 = 0800
LEU 400213 = 0000 400223 = 0200 400233 = 0000 400243 = 0100
DB 400214 = 0015 400224 = 0022 400234 = 0100 400244 = 0006
Hi Alarm 400215 = 40000 400225 = 2900 400235 = 8090 400245 = 0768
Hi Warn 400216 = 3500 400226 = 2300 400236 = 7100 400246 = 0680
Lo Warn 400217 = 2000 400227 = 1200 400237 = 3200 400247 = 0280
Lo Alarm 400218 = 1200 400228 = 0430 400238 = 0992 400248 = 0230
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
EUCA: Engineering Unit Conversion and Alarms
500 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
043505766 4/2006 xxxi
Glossary
active window The window, which is currently selected. Only one window can be active at any one given time. When a window is active, the heading changes color, in order to distinguish it from other windows. Unselected windows are inactive.
Actual parameter Currently connected Input/Output parameters.
Addresses (Direct) addresses are memory areas on the PLC. These are found in the State RAM and can be assigned input/output modules.The display/input of direct addresses is possible in the following formats:
Standard format (400001)Separator format (4:00001)Compact format (4:1)IEC format (QW1)
ANL_IN ANL_IN stands for the data type "Analog Input" and is used for processing analog values. The 3x References of the configured analog input module, which is specified in the I/O component list is automatically assigned the data type and should therefore only be occupied by Unlocated variables.
ANL_OUT ANL_OUT stands for the data type "Analog Output" and is used for processing analog values. The 4x-References of the configured analog output module, which is specified in the I/O component list is automatically assigned the data type and should therefore only be occupied by Unlocated variables.
ANY In the existing version "ANY" covers the elementary data types BOOL, BYTE, DINT, INT, REAL, UDINT, UINT, TIME and WORD and therefore derived data types.
A
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
xxxii 043505766 4/2006
ANY_BIT In the existing version, "ANY_BIT" covers the data types BOOL, BYTE and WORD.
ANY_ELEM In the existing version "ANY_ELEM" covers the elementary data types BOOL, BYTE, DINT, INT, REAL, UDINT, UINT, TIME and WORD.
ANY_INT In the existing version, "ANY_INT" covers the data types DINT, INT, UDINT and UINT.
ANY_NUM In the existing version, "ANY_NUM" covers the data types DINT, INT, REAL, UDINT and UINT.
ANY_REAL In the existing version "ANY_REAL" covers the data type REAL.
Application window
The window, which contains the working area, the menu bar and the tool bar for the application. The name of the application appears in the heading. An application window can contain several document windows. In Concept the application window corresponds to a Project.
Argument Synonymous with Actual parameters.
ASCII mode American Standard Code for Information Interchange. The ASCII mode is used for communication with various host devices. ASCII works with 7 data bits.
Atrium The PC based controller is located on a standard AT board, and can be operated within a host computer in an ISA bus slot. The module occupies a motherboard (requires SA85 driver) with two slots for PC104 daughter boards. From this, a PC104 daughter board is used as a CPU and the others for INTERBUS control.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
043505766 4/2006 xxxiii
Back up data file (Concept EFB)
The back up file is a copy of the last Source files. The name of this back up file is "backup??.c" (it is accepted that there are no more than 100 copies of the source files. The first back up file is called "backup00.c". If changes have been made on the Definition file, which do not create any changes to the interface in the EFB, there is no need to create a back up file by editing the source files (Objects Source). If a back up file can be assigned, the name of the source file can be given.
Base 16 literals Base 16 literals function as the input of whole number values in the hexadecimal system. The base must be denoted by the prefix 16#. The values may not be preceded by signs (+/-). Single underline signs ( _ ) between figures are not significant.
Example 16#F_F or 16#FF (decimal 255)16#E_0 or 16#E0 (decimal 224)
Base 8 literal Base 8 literals function as the input of whole number values in the octal system. The base must be denoted by the prefix 3.63kg. The values may not be preceded by signs (+/-). Single underline signs ( _ ) between figures are not significant.
Example 8#3_1111 or 8#377 (decimal 255) 8#34_1111 or 8#340 (decimal 224)
Basis 2 literals Base 2 literals function as the input of whole number values in the dual system. The base must be denoted by the prefix 0.91kg. The values may not be preceded by signs (+/-). Single underline signs ( _ ) between figures are not significant.
Example 2#1111_1111 or 2#11111111 (decimal 255) 2#1110_1111 or 2#11100000 (decimal 224)
Binary connections
Connections between outputs and inputs of FFBs of data type BOOL.
Bit sequence A data element, which is made up from one or more bits.
BOOL BOOL stands for the data type "Boolean". The length of the data elements is 1 bit (in the memory contained in 1 byte). The range of values for variables of this type is 0 (FALSE) and 1 (TRUE).
B
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
xxxiv 043505766 4/2006
Bridge A bridge serves to connect networks. It enables communication between nodes on the two networks. Each network has its own token rotation sequence – the token is not deployed via bridges.
BYTE BYTE stands for the data type "Bit sequence 8". The input appears as Base 2 literal, Base 8 literal or Base 1 16 literal. The length of the data element is 8 bit. A numerical range of values cannot be assigned to this data type.
Cache The cache is a temporary memory for cut or copied objects. These objects can be inserted into sections. The old content in the cache is overwritten for each new Cut or Copy.
Call up The operation, by which the execution of an operation is initiated.
Coil A coil is a LD element, which transfers (without alteration) the status of the horizontal link on the left side to the horizontal link on the right side. In this way, the status is saved in the associated Variable/ direct address.
Compact format (4:1)
The first figure (the Reference) is separated from the following address with a colon (:), where the leading zero are not entered in the address.
Connection A check or flow of data connection between graphic objects (e.g. steps in the SFC editor, Function blocks in the FBD editor) within a section, is graphically shown as a line.
Constants Constants are Unlocated variables, which are assigned a value that cannot be altered from the program logic (write protected).
Contact A contact is a LD element, which transfers a horizontal connection status onto the right side. This status is from the Boolean AND- operation of the horizontal connection status on the left side with the status of the associated Variables/direct Address. A contact does not alter the value of the associated variables/direct address.
C
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
043505766 4/2006 xxxv
Data transfer settings
Settings, which determine how information from the programming device is transferred to the PLC.
Data types The overview shows the hierarchy of data types, as they are used with inputs and outputs of Functions and Function blocks. Generic data types are denoted by the prefix "ANY".
ANY_ELEMANY_NUMANY_REAL (REAL)ANY_INT (DINT, INT, UDINT, UINT)ANY_BIT (BOOL, BYTE, WORD)TIME
System data types (IEC extensions)Derived (from "ANY" data types)
DCP I/O station With a Distributed Control Processor (D908) a remote network can be set up with a parent PLC. When using a D908 with remote PLC, the parent PLC views the remote PLC as a remote I/O station. The D908 and the remote PLC communicate via the system bus, which results in high performance, with minimum effect on the cycle time. The data exchange between the D908 and the parent PLC takes place at 1.5 Megabits per second via the remote I/O bus. A parent PLC can support up to 31 (Address 2-32) D908 processors.
DDE (Dynamic Data Exchange)
The DDE interface enables a dynamic data exchange between two programs under Windows. The DDE interface can be used in the extended monitor to call up its own display applications. With this interface, the user (i.e. the DDE client) can not only read data from the extended monitor (DDE server), but also write data onto the PLC via the server. Data can therefore be altered directly in the PLC, while it monitors and analyzes the results. When using this interface, the user is able to make their own "Graphic-Tool", "Face Plate" or "Tuning Tool", and integrate this into the system. The tools can be written in any DDE supporting language, e.g. Visual Basic and Visual-C++. The tools are called up, when the one of the buttons in the dialog box extended monitor uses Concept Graphic Tool: Signals of a projection can be displayed as timing diagrams via the DDE connection between Concept and Concept Graphic Tool.
D
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
xxxvi 043505766 4/2006
Decentral Network (DIO)
A remote programming in Modbus Plus network enables maximum data transfer performance and no specific requests on the links. The programming of a remote net is easy. To set up the net, no additional ladder diagram logic is needed. Via corresponding entries into the Peer Cop processor all data transfer requests are met.
Declaration Mechanism for determining the definition of a Language element. A declaration normally covers the connection of an Identifier with a language element and the assignment of attributes such as Data types and algorithms.
Definition data file (Concept EFB)
The definition file contains general descriptive information about the selected FFB and its formal parameters.
Derived data type Derived data types are types of data, which are derived from the Elementary data types and/or other derived data types. The definition of the derived data types appears in the data type editor in Concept.Distinctions are made between global data types and local data types.
Derived Function Block (DFB)
A derived function block represents the Call up of a derived function block type. Details of the graphic form of call up can be found in the definition " Function block (Item)". Contrary to calling up EFB types, calling up DFB types is denoted by double vertical lines on the left and right side of the rectangular block symbol.The body of a derived function block type is designed using FBD language, but only in the current version of the programming system. Other IEC languages cannot yet be used for defining DFB types, nor can derived functions be defined in the current version. Distinctions are made between local and global DFBs.
DINT DINT stands for the data type "double integer". The input appears as Integer literal, Base 2 literal, Base 8 literal or Base 16 literal. The length of the data element is 32 bit. The range of values for variables of this data type is from –2 exp (31) to 2 exp (31) –1.
Direct display A method of displaying variables in the PLC program, from which the assignment of configured memory can be directly and indirectly derived from the physical memory.
Document window
A window within an Application window. Several document windows can be opened at the same time in an application window. However, only one document window can be active. Document windows in Concept are, for example, sections, the message window, the reference data editor and the PLC configuration.
Dummy An empty data file, which consists of a text header with general file information, i.e. author, date of creation, EFB identifier etc. The user must complete this dummy file with additional entries.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
043505766 4/2006 xxxvii
DX Zoom This property enables connection to a programming object to observe and, if necessary, change its data value.
Elementary functions/function blocks (EFB)
Identifier for Functions or Function blocks, whose type definitions are not formulated in one of the IEC languages, i.e. whose bodies, for example, cannot be modified with the DFB Editor (Concept-DFB). EFB types are programmed in "C" and mounted via Libraries in precompiled form.
EN / ENO (Enable / Error display)
If the value of EN is "0" when the FFB is called up, the algorithms defined by the FFB are not executed and all outputs contain the previous value. The value of ENO is automatically set to "0" in this case. If the value of EN is "1" when the FFB is called up, the algorithms defined by the FFB are executed. After the error free execution of the algorithms, the ENO value is automatically set to "1". If an error occurs during the execution of the algorithm, ENO is automatically set to "0". The output behavior of the FFB depends whether the FFBs are called up without EN/ENO or with EN=1. If the EN/ENO display is enabled, the EN input must be active. Otherwise, the FFB is not executed. The projection of EN and ENO is enabled/disabled in the block properties dialog box. The dialog box is called up via the menu commands Objects
Properties... or via a double click on the FFB.
Error When processing a FFB or a Step an error is detected (e.g. unauthorized input value or a time error), an error message appears, which can be viewed with the menu command Online Event display... . With FFBs the ENO output is set to "0".
Evaluation The process, by which a value for a Function or for the outputs of a Function block during the Program execution is transmitted.
Expression Expressions consist of operators and operands.
E
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
xxxviii 043505766 4/2006
FFB (functions/function blocks)
Collective term for EFB (elementary functions/function blocks) and DFB (derived function blocks)
Field variables Variables, one of which is assigned, with the assistance of the key word ARRAY (field), a defined Derived data type. A field is a collection of data elements of the same Data type.
FIR filter Finite Impulse Response Filter
Formal parameters
Input/Output parameters, which are used within the logic of a FFB and led out of the FFB as inputs/outputs.
Function (FUNC) A Program organization unit, which exactly supplies a data element when executing. A function has no internal status information. Multiple call ups of the same function with the same input parameter values always supply the same output values.Details of the graphic form of function call up can be found in the definition " Function block (Item)". In contrast to the call up of function blocks, the function call ups only have one unnamed output, whose name is the name of the function itself. In FBD each call up is denoted by a unique number over the graphic block; this number is automatically generated and cannot be altered.
Function block (item) (FB)
A function block is a Program organization unit, which correspondingly calculates the functionality values, defined in the function block type description, for the output and internal variables, when it is called up as a certain item. All output values and internal variables of a certain function block item remain as a call up of the function block until the next. Multiple call up of the same function block item with the same arguments (Input parameter values) supply generally supply the same output value(s).Each function block item is displayed graphically by a rectangular block symbol. The name of the function block type is located on the top center within the rectangle. The name of the function block item is located also at the top, but on the outside of the rectangle. An instance is automatically generated when creating, which can however be altered manually, if required. Inputs are displayed on the left side and outputs on the right of the block. The names of the formal input/output parameters are displayed within the rectangle in the corresponding places.The above description of the graphic presentation is principally applicable to Function call ups and to DFB call ups. Differences are described in the corresponding definitions.
F
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
043505766 4/2006 xxxix
Function block dialog (FBD)
One or more sections, which contain graphically displayed networks from Functions, Function blocks and Connections.
Function block type
A language element, consisting of: 1. the definition of a data structure, subdivided into input, output and internal variables, 2. A set of operations, which is used with the elements of the data structure, when a function block type instance is called up. This set of operations can be formulated either in one of the IEC languages (DFB type) or in "C" (EFB type). A function block type can be instanced (called up) several times.
Function counter The function counter serves as a unique identifier for the function in a Program or DFB. The function counter cannot be edited and is automatically assigned. The function counter always has the structure: .n.mn = Section number (number running)m = Number of the FFB object in the section (number running)
Generic data type
A Data type, which stands in for several other data types.
Generic literal If the Data type of a literal is not relevant, simply enter the value for the literal. In this case Concept automatically assigns the literal to a suitable data type.
Global derived data types
Global Derived data types are available in every Concept project and are contained in the DFB directory directly under the Concept directory.
Global DFBs Global DFBs are available in every Concept project and are contained in the DFB directory directly under the Concept directory.
Global macros Global Macros are available in every Concept project and are contained in the DFB directory directly under the Concept directory.
Groups (EFBs) Some EFB libraries (e.g. the IEC library) are subdivided into groups. This facilitates the search for FFBs, especially in extensive libraries.
G
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
xl 043505766 4/2006
I/O component list
The I/O and expert assemblies of the various CPUs are configured in the I/O component list.
IEC 61131-3 International norm: Programmable controllers – part 3: Programming languages.
IEC format (QW1) In the place of the address stands an IEC identifier, followed by a five figure address:%0x12345 = %Q12345%1x12345 = %I12345%3x12345 = %IW12345%4x12345 = %QW12345
IEC name conventions (identifier)
An identifier is a sequence of letters, figures, and underscores, which must start with a letter or underscores (e.g. name of a function block type, of an item or section). Letters from national sets of characters (e.g. ö,ü, é, õ) can be used, taken from project and DFB names.Underscores are significant in identifiers; e.g. "A_BCD" and "AB_CD" are interpreted as different identifiers. Several leading and multiple underscores are not authorized consecutively.Identifiers are not permitted to contain space characters. Upper and/or lower case is not significant; e.g. "ABCD" and "abcd" are interpreted as the same identifier.Identifiers are not permitted to be Key words.
IIR filter Infinite Impulse Response Filter
Initial step (starting step)
The first step in a chain. In each chain, an initial step must be defined. The chain is started with the initial step when first called up.
Initial value The allocated value of one of the variables when starting the program. The value assignment appears in the form of a Literal.
Input bits (1x references)
The 1/0 status of input bits is controlled via the process data, which reaches the CPU from an entry device.
Input parameters (Input)
When calling up a FFB the associated Argument is transferred.
I
Note: The x, which comes after the first figure of the reference type, represents a five figure storage location in the application data store, i.e. if the reference 100201 signifies an input bit in the address 201 of the State RAM.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
043505766 4/2006 xli
Input words (3x references)
An input word contains information, which come from an external source and are represented by a 16 bit figure. A 3x register can also contain 16 sequential input bits, which were read into the register in binary or BCD (binary coded decimal) format. Note: The x, which comes after the first figure of the reference type, represents a five figure storage location in the user data store, i.e. if the reference 300201 signifies a 16 bit input word in the address 201 of the State RAM.
Instantiation The generation of an Item.
Instruction (IL) Instructions are "commands" of the IL programming language. Each operation begins on a new line and is succeeded by an operator (with modifier if needed) and, if necessary for each relevant operation, by one or more operands. If several operands are used, they are separated by commas. A tag can stand before the instruction, which is followed by a colon. The commentary must, if available, be the last element in the line.
Instruction (LL984)
When programming electric controllers, the task of implementing operational coded instructions in the form of picture objects, which are divided into recognizable contact forms, must be executed. The designed program objects are, on the user level, converted to computer useable OP codes during the loading process. The OP codes are deciphered in the CPU and processed by the controller’s firmware functions so that the desired controller is implemented.
Instruction list (IL)
IL is a text language according to IEC 1131, in which operations, e.g. conditional/unconditional call up of Function blocks and Functions, conditional/unconditional jumps etc. are displayed through instructions.
INT INT stands for the data type "whole number". The input appears as Integer literal, Base 2 literal, Base 8 literal or Base 16 literal. The length of the data element is 16 bit. The range of values for variables of this data type is from –2 exp (15) to 2 exp (15) –1.
Integer literals Integer literals function as the input of whole number values in the decimal system. The values may be preceded by the signs (+/-). Single underline signs ( _ ) between figures are not significant.
Example -12, 0, 123_456, +986
INTERBUS (PCP) To use the INTERBUS PCP channel and the INTERBUS process data preprocessing (PDP), the new I/O station type INTERBUS (PCP) is led into the Concept configurator. This I/O station type is assigned fixed to the INTERBUS connection module 180-CRP-660-01.The 180-CRP-660-01 differs from the 180-CRP-660-00 only by a clearly larger I/O area in the state RAM of the controller.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
xlii 043505766 4/2006
Item name An Identifier, which belongs to a certain Function block item. The item name serves as a unique identifier for the function block in a program organization unit. The item name is automatically generated, but can be edited. The item name must be unique throughout the Program organization unit, and no distinction is made between upper/lower case. If the given name already exists, a warning is given and another name must be selected. The item name must conform to the IEC name conventions, otherwise an error message appears. The automatically generated instance name always has the structure: FBI_n_m
FBI = Function block itemn = Section number (number running)m = Number of the FFB object in the section (number running)
Jump Element of the SFC language. Jumps are used to jump over areas of the chain.
Key words Key words are unique combinations of figures, which are used as special syntactic elements, as is defined in appendix B of the IEC 1131-3. All key words, which are used in the IEC 1131-3 and in Concept, are listed in appendix C of the IEC 1131-3. These listed keywords cannot be used for any other purpose, i.e. not as variable names, section names, item names etc.
J
K
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
043505766 4/2006 xliii
Ladder Diagram (LD)
Ladder Diagram is a graphic programming language according to IEC1131, which optically orientates itself to the "rung" of a relay ladder diagram.
Ladder Logic 984 (LL)
In the terms Ladder Logic and Ladder Diagram, the word Ladder refers to execution. In contrast to a diagram, a ladder logic is used by engineers to draw up a circuit (with assistance from electrical symbols),which should chart the cycle of events and not the existing wires, which connect the parts together. A usual user interface for controlling the action by automated devices permits ladder logic interfaces, so that when implementing a control system, engineers do not have to learn any new programming languages, with which they are not conversant.The structure of the actual ladder logic enables electrical elements to be linked in a way that generates a control output, which is dependant upon a configured flow of power through the electrical objects used, which displays the previously demanded condition of a physical electric appliance.In simple form, the user interface is one of the video displays used by the PLC programming application, which establishes a vertical and horizontal grid, in which the programming objects are arranged. The logic is powered from the left side of the grid, and by connecting activated objects the electricity flows from left to right.
Landscape format
Landscape format means that the page is wider than it is long when looking at the printed text.
Language element
Each basic element in one of the IEC programming languages, e.g. a Step in SFC, a Function block item in FBD or the Start value of a variable.
Library Collection of software objects, which are provided for reuse when programming new projects, or even when building new libraries. Examples are the Elementary function block types libraries.EFB libraries can be subdivided into Groups.
Literals Literals serve to directly supply values to inputs of FFBs, transition conditions etc. These values cannot be overwritten by the program logic (write protected). In this way, generic and standardized literals are differentiated.Furthermore literals serve to assign a Constant a value or a Variable an Initial value. The input appears as Base 2 literal, Base 8 literal, Base 16 literal, Integer literal, Real literal or Real literal with exponent.
Local derived data types
Local derived data types are only available in a single Concept project and its local DFBs and are contained in the DFB directory under the project directory.
L
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
xliv 043505766 4/2006
Local DFBs Local DFBs are only available in a single Concept project and are contained in the DFB directory under the project directory.
Local link The local network link is the network, which links the local nodes with other nodes either directly or via a bus amplifier.
Local macros Local Macros are only available in a single Concept project and are contained in the DFB directory under the project directory.
Local network nodes
The local node is the one, which is projected evenly.
Located variable Located variables are assigned a state RAM address (reference addresses 0x,1x, 3x, 4x). The value of these variables is saved in the state RAM and can be altered online with the reference data editor. These variables can be addressed by symbolic names or the reference addresses.
Collective PLC inputs and outputs are connected to the state RAM. The program access to the peripheral signals, which are connected to the PLC, appears only via located variables. PLC access from external sides via Modbus or Modbus plus interfaces, i.e. from visualizing systems, are likewise possible via located variables.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
043505766 4/2006 xlv
Macro Macros are created with help from the software Concept DFB.Macros function to duplicate frequently used sections and networks (including the logic, variables, and variable declaration).Distinctions are made between local and global macros.
Macros have the following properties:Macros can only be created in the programming languages FBD and LD.Macros only contain one single section.Macros can contain any complex section.From a program technical point of view, there is no differentiation between an instanced macro, i.e. a macro inserted into a section, and a conventionally created macro.Calling up DFBs in a macroVariable declarationUse of macro-own data structuresAutomatic acceptance of the variables declared in the macroInitial value for variablesMultiple instancing of a macro in the whole program with different variablesThe section name, the variable name and the data structure name can contain up to 10 different exchange markings (@0 to @9).
MMI Man Machine Interface
Multi element variables
Variables, one of which is assigned a Derived data type defined with STRUCT or ARRAY.Distinctions are made between Field variables and structured variables.
M
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
xlvi 043505766 4/2006
Network A network is the connection of devices to a common data path, which communicate with each other via a common protocol.
Network node A node is a device with an address (164) on the Modbus Plus network.
Node address The node address serves a unique identifier for the network in the routing path. The address is set directly on the node, e.g. with a rotary switch on the back of the module.
Operand An operand is a Literal, a Variable, a Function call up or an Expression.
Operator An operator is a symbol for an arithmetic or Boolean operation to be executed.
Output parameters (Output)
A parameter, with which the result(s) of the Evaluation of a FFB are returned.
Output/discretes (0x references)
An output/marker bit can be used to control real output data via an output unit of the control system, or to define one or more outputs in the state RAM. Note: The x, which comes after the first figure of the reference type, represents a five figure storage location in the application data store, i.e. if the reference 000201 signifies an output or marker bit in the address 201 of the State RAM.
Output/marker words (4x references)
An output/marker word can be used to save numerical data (binary or decimal) in the State RAM, or also to send data from the CPU to an output unit in the control system. Note: The x, which comes after the first figure of the reference type, represents a five figure storage location in the application data store, i.e. if the reference 400201 signifies a 16 bit output or marker word in the address 201 of the State RAM.
N
O
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
043505766 4/2006 xlvii
Peer processor The peer processor processes the token run and the flow of data between the Modbus Plus network and the PLC application logic.
PLC Programmable controller
Program The uppermost Program organization unit. A program is closed and loaded onto a single PLC.
Program cycle A program cycle consists of reading in the inputs, processing the program logic and the output of the outputs.
Program organization unit
A Function, a Function block, or a Program. This term can refer to either a Type or an Item.
Programming device
Hardware and software, which supports programming, configuring, testing, implementing and error searching in PLC applications as well as in remote system applications, to enable source documentation and archiving. The programming device could also be used for process visualization.
Programming redundancy system (Hot Standby)
A redundancy system consists of two identically configured PLC devices, which communicate with each other via redundancy processors. In the case of the primary PLC failing, the secondary PLC takes over the control checks. Under normal conditions the secondary PLC does not take over any controlling functions, but instead checks the status information, to detect mistakes.
Project General identification of the uppermost level of a software tree structure, which specifies the parent project name of a PLC application. After specifying the project name, the system configuration and control program can be saved under this name. All data, which results during the creation of the configuration and the program, belongs to this parent project for this special automation.General identification for the complete set of programming and configuring information in the Project data bank, which displays the source code that describes the automation of a system.
Project data bank The data bank in the Programming device, which contains the projection information for a Project.
Prototype data file (Concept EFB)
The prototype data file contains all prototypes of the assigned functions. Further, if available, a type definition of the internal status structure is given.
P
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
xlviii 043505766 4/2006
REAL REAL stands for the data type "real". The input appears as Real literal or as Real literal with exponent. The length of the data element is 32 bit. The value range for variables of this data type reaches from 8.43E-37 to 3.36E+38.
Real literal Real literals function as the input of real values in the decimal system. Real literals are denoted by the input of the decimal point. The values may be preceded by the signs (+/-). Single underline signs ( _ ) between figures are not significant.
Example -12.0, 0.0, +0.456, 3.14159_26
Real literal with exponent
Real literals with exponent function as the input of real values in the decimal system. Real literals with exponent are denoted by the input of the decimal point. The exponent sets the key potency, by which the preceding number is multiplied to get to the value to be displayed. The basis may be preceded by a negative sign (-). The exponent may be preceded by a positive or negative sign (+/-). Single underline signs ( _ ) between figures are not significant. (Only between numbers, not before or after the decimal poiont and not before or after "E", "E+" or "E-")
Example -1.34E-12 or -1.34e-12 1.0E+6 or 1.0e+61.234E6 or 1.234e6
Reference Each direct address is a reference, which starts with an ID, specifying whether it concerns an input or an output and whether it concerns a bit or a word. References, which start with the code 6, display the register in the extended memory of the state RAM. 0x area = Discrete outputs 1x area = Input bits 3x area = Input words 4x area = Output bits/Marker words 6x area = Register in the extended memory
R
Note: Depending on the mathematic processor type of the CPU, various areas within this valid value range cannot be represented. This is valid for values nearing ZERO and for values nearing INFINITY. In these cases, a number value is not shown in animation, instead NAN (Not A Number) oder INF (INFinite).
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
043505766 4/2006 xlix
Register in the extended memory (6x reference)
6x references are marker words in the extended memory of the PLC. Only LL984 user programs and CPU 213 04 or CPU 424 02 can be used.
RIO (Remote I/O) Remote I/O provides a physical location of the I/O coordinate setting device in relation to the processor to be controlled. Remote inputs/outputs are connected to the consumer control via a wired communication cable.
RP (PROFIBUS) RP = Remote Peripheral
RTU mode Remote Terminal UnitThe RTU mode is used for communication between the PLC and an IBM compatible personal computer. RTU works with 8 data bits.
Rum-time error Error, which occurs during program processing on the PLC, with SFC objects (i.e. steps) or FFBs. These are, for example, over-runs of value ranges with figures, or time errors with steps.
SA85 module The SA85 module is a Modbus Plus adapter for an IBM-AT or compatible computer.
Section A section can be used, for example, to describe the functioning method of a technological unit, such as a motor.A Program or DFB consist of one or more sections. Sections can be programmed with the IEC programming languages FBD and SFC. Only one of the named programming languages can be used within a section.Each section has its own Document window in Concept. For reasons of clarity, it is recommended to subdivide a very large section into several small ones. The scroll bar serves to assist scrolling in a section.
Separator format (4:00001)
The first figure (the Reference) is separated from the ensuing five figure address by a colon (:).
Note: The x, which comes after the first figure of each reference type, represents a five figure storage location in the application data store, i.e. if the reference 400201 signifies a 16 bit output or marker word in the address 201 of the State RAM.
S
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
l 043505766 4/2006
Sequence language (SFC)
The SFC Language elements enable the subdivision of a PLC program organiza-tional unit in a number of Steps and Transitions, which are connected horizontally by aligned Connections. A number of actions belong to each step, and a transition condition is linked to a transition.
Serial ports With serial ports (COM) the information is transferred bit by bit.
Source code data file (Concept EFB)
The source code data file is a usual C++ source file. After execution of the menu command Library Generate data files this file contains an EFB code framework, in which a specific code must be entered for the selected EFB. To do this, click on the menu command Objects Source.
Standard format (400001)
The five figure address is located directly after the first figure (the reference).
Standardized literals
If the data type for the literal is to be automatically determined, use the following construction: ’Data type name’#’Literal value’.
Example INT#15 (Data type: Integer, value: 15), BYTE#00001111 (data type: Byte, value: 00001111) REAL#23.0 (Data type: Real, value: 23.0)
For the assignment of REAL data types, there is also the possibility to enter the value in the following way: 23.0. Entering a comma will automatically assign the data type REAL.
State RAM The state RAM is the storage for all sizes, which are addressed in the user program via References (Direct display). For example, input bits, discretes, input words, and discrete words are located in the state RAM.
Statement (ST) Instructions are "commands" of the ST programming language. Instructions must be terminated with semicolons. Several instructions (separated by semi-colons) can occupy the same line.
Status bits There is a status bit for every node with a global input or specific input/output of Peer Cop data. If a defined group of data was successfully transferred within the set time out, the corresponding status bit is set to 1. Alternatively, this bit is set to 0 and all data belonging to this group (of 0) is deleted.
Step SFC Language element: Situations, in which the Program behavior follows in relation to the inputs and outputs of the same operations, which are defined by the associated actions of the step.
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
043505766 4/2006 li
Step name The step name functions as the unique flag of a step in a Program organization unit. The step name is automatically generated, but can be edited. The step name must be unique throughout the whole program organization unit, otherwise an Error message appears. The automatically generated step name always has the structure: S_n_m
S = Step n = Section number (number running)m = Number of steps in the section (number running)
Structured text (ST)
ST is a text language according to IEC 1131, in which operations, e.g. call up of Function blocks and Functions, conditional execution of instructions, repetition of instructions etc. are displayed through instructions.
Structured variables
Variables, one of which is assigned a Derived data type defined with STRUCT (structure).A structure is a collection of data elements with generally differing data types ( Elementary data types and/or derived data types).
SY/MAX In Quantum control devices, Concept closes the mounting on the I/O population SY/MAX I/O modules for RIO control via the Quantum PLC with on. The SY/MAX remote subrack has a remote I/O adapter in slot 1, which communicates via a Modicon S908 R I/O system. The SY/MAX I/O modules are performed when highlighting and including in the I/O population of the Concept configuration.
Symbol (Icon) Graphic display of various objects in Windows, e.g. drives, user programs and Document windows.
Template data file (Concept EFB)
The template data file is an ASCII data file with a layout information for the Concept FBD editor, and the parameters for code generation.
TIME TIME stands for the data type "Time span". The input appears as Time span literal. The length of the data element is 32 bit. The value range for variables of this type stretches from 0 to 2exp(32)-1. The unit for the data type TIME is 1 ms.
Time span literals
Permitted units for time spans (TIME) are days (D), hours (H), minutes (M), seconds (S) and milliseconds (MS) or a combination thereof. The time span must be denoted by the prefix t#, T#, time# or TIME#. An "overrun" of the highest ranking unit is permitted, i.e. the input T#25H15M is permitted.
T
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
lii 043505766 4/2006
Example t#14MS, T#14.7S, time#18M, TIME#19.9H, t#20.4D, T#25H15M, time#5D14H12M18S3.5MS
Token The network "Token" controls the temporary property of the transfer rights via a single node. The token runs through the node in a circulating (rising) address sequence. All nodes track the Token run through and can contain all possible data sent with it.
Traffic Cop The Traffic Cop is a component list, which is compiled from the user component list. The Traffic Cop is managed in the PLC and in addition contains the user component list e.g. Status information of the I/O stations and modules.
Transition The condition with which the control of one or more Previous steps transfers to one or more ensuing steps along a directional Link.
UDEFB User defined elementary functions/function blocksFunctions or Function blocks, which were created in the programming language C, and are available in Concept Libraries.
UDINT UDINT stands for the data type "unsigned double integer". The input appears as Integer literal, Base 2 literal, Base 8 literal or Base 16 literal. The length of the data element is 32 bit. The value range for variables of this type stretches from 0 to 2exp(32)-1.
UINT UINT stands for the data type "unsigned integer". The input appears as Integer literal, Base 2 literal, Base 8 literal or Base 16 literal. The length of the data element is 16 bit. The value range for variables of this type stretches from 0 to (2exp16)-1.
Unlocated variable
Unlocated variables are not assigned any state RAM addresses. They therefore do not occupy any state RAM addresses. The value of these variables is saved in the system and can be altered with the reference data editor. These variables are only addressed by symbolic names.
Signals requiring no peripheral access, e.g. intermediate results, system tags etc, should primarily be declared as unlocated variables.
U
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
043505766 4/2006 liii
Variables Variables function as a data exchange within sections between several sections and between the Program and the PLC.Variables consist of at least a variable name and a Data type.Should a variable be assigned a direct Address (Reference), it is referred to as a Located variable. Should a variable not be assigned a direct address, it is referred to as an unlocated variable. If the variable is assigned a Derived data type, it is referred to as a Multi-element variable.Otherwise there are Constants and Literals.
Vertical format Vertical format means that the page is higher than it is wide when looking at the printed text.
Warning When processing a FFB or a Step a critical status is detected (e.g. critical input value or a time out), a warning appears, which can be viewed with the menu command Online Event display... . With FFBs the ENO output remains at "1".
WORD WORD stands for the data type "Bit sequence 16". The input appears as Base 2 literal, Base 8 literal or Base 1 16 literal. The length of the data element is 16 bit. A numerical range of values cannot be assigned to this data type.
V
W
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Glossary
liv 043505766 4/2006
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
CBA
043505766 4/2006 lv
Numerics3x or 4x register
entering in mathematical equation, 57
AABS, 64AD16, 109ADD, 113Add 16 Bit, 109Addition, 113
AD16, 109ADD, 113
Advanced Calculations, 782algebraic expression
equation network, 54algebraic notation
equation network, 51Analog Input, 787Analog Output, 799Analog Values, 71AND, 117ARCCOS, 64ARCSIN, 64ARCTAN, 64argument
equation network, 64limits, 65
arithmetic operator, 59ASCII Functions
READ, 937WRIT, 1091
assignment operator, 59Average Weighted Inputs Calculate, 803
BBase 10 Antilogarithm, 279Base 10 Logarithm, 383BCD, 123benchmark performance
equation network, 69Binary to Binary Code, 123Bit Control, 755Bit pattern comparison
CMPR, 167Bit Rotate, 139bitwise operator, 59BLKM, 127BLKT, 131Block Move, 127Block Move with Interrupts Disabled, 135Block to Table, 131BMDI, 135boolean, 56BROT, 139
CCalculated preset formula, 809Central Alarm Handler, 793Changing the Sign of a Floating Point Number, 301Check Sum, 163
Index
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Index
lvi 043505766 4/2006
CHS, 157CKSM, 163Closed Loop Control, 71CMPR, 167coil
equation network, 53error messages, 53
Coils, 91Communications
MSTR, 701COMP, 179Compare Register, 167Complement a Matrix, 179Comprehensive ISA Non Interacting PID, 831conditional expression
equation network, 51, 61conditional operator, 59Configure Hot Standby, 157constant
equation network, 51constant data
floating point, 57long (32-bit), 57LSB (least signifcant byte), 57mathematical equation, 57
Contacts, 91Convertion
BCD to binary, 123binary to BCD, 123
COS, 64COSD, 64Counters / Timers
T.01 Timer, 1049T0.1 Timer, 1053T1.0 Timer, 1057T1MS Timer, 1061UCTR, 1077
Counters/TimersDCTR, 203
creating equation network, 52
Ddata
mathematical equation, 56data conversions
equation network, 66Data Logging for PCMCIA Read/Write Support, 223DCTR, 203Derivative Rate Calculation over a Specified Time, 883DIOH, 207discrete reference
mathematical equation, 56Distributed I/O Health, 207DIV, 217Divide, 217Divide 16 Bit, 243DLOG, 223Double Precision Addition, 265Double Precision Division, 347Double Precision Multiplication, 395Double Precision Subtraction, 447Down Counter, 203DRUM, 237DRUM Sequencer, 237DV16, 243
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Index
043505766 4/2006 lvii
EEMTH, 259EMTH Subfunction
EMTH-ADDDP, 265EMTH-ADDFP, 271, 275EMTH-ANLOG, 279EMTH-ARCOS, 285EMTH-ARSIN, 291EMTH-ARTAN, 295EMTH-CHSIN, 301EMTH-CMPFP, 307EMTH-CMPIF, 313EMTH-CNVDR, 319EMTH-CNVFI, 325EMTH-CNVIF, 331EMTH-CNVRD, 337EMTH-COS, 343EMTH-DIVDP, 347EMTH-DIVFI, 353EMTH-DIVFP, 357EMTH-DIVIF, 361EMTH-ERLOG, 365EMTH-EXP, 371EMTH-LNFP, 377EMTH-LOG, 383EMTH-LOGFP, 389EMTH-MULDP, 395EMTH-MULFP, 401EMTH-MULIF, 405EMTH-PI, 411EMTH-POW, 417EMTH-SINE, 423EMTH-SQRFP, 429EMTH-SQRT, 435EMTH-SQRTP, 441EMTH-SUBDP, 447EMTH-SUBFI, 453EMTH-SUBFP, 457EMTH-SUBIF, 461EMTH-TAN, 465
EMTH-ADDDP, 265EMTH-ADDFP, 271EMTH-ADDIF, 275EMTH-ANLOG, 279EMTH-ARCOS, 285
EMTH-ARSIN, 291EMTH-ARTAN, 295EMTH-CHSIN, 301EMTH-CMPFP, 307EMTH-CMPIF, 313EMTH-CNVDR, 319EMTH-CNVFI, 325EMTH-CNVIF, 331EMTH-CNVRD, 337EMTH-COS, 343EMTH-DIVDP, 347EMTH-DIVFI, 353EMTH-DIVFP, 357EMTH-DIVIF, 361EMTH-ERLOG, 365EMTH-EXP, 371EMTH-LNFP, 377EMTH-LOG, 383EMTH-LOGFP, 389EMTHMULDP, 395EMTH-MULFP, 401EMTH-MULIF, 405EMTH-PI, 411EMTH-POW, 417EMTH-SINE, 423EMTH-SQRFP, 429EMTH-SQRT, 435EMTH-SQRTP, 441EMTH-SUBDP, 447EMTH-SUBFI, 453EMTH-SUBFP, 457EMTH-SUBIF, 461EMTH-TAN, 465enable contact
horizontal open, 53horizontal short, 53normally closed, 53normally open, 53
Engineering Unit Conversion and Alarms, 489
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Index
lviii 043505766 4/2006
equation networkABS, 64algebraic expression, 54algebraic notation, 51ARCCOS, 64ARCSIN, 64ARCTAN, 64argument, 64argument limits, 65arithmetic operator, 59assignment operator, 59benchmark performance, 69bitwise operator, 59conditional expression, 51, 61conditional operator, 59constant, 51content, 54COS, 64COSD, 64creating, 52data conversions, 66enable contact, 53entering function, 64entering parentheses, 63EXP, 64exponentiation operator, 59FIX, 64FLOAT, 64group expressions in nested layers of
parentheses, 51LN, 64LOG, 64logic editor, 51logical expression, 51math operator, 51mathematical, 55mathematical function, 64mathematical operation, 59nested parentheses, 63operator precedence, 62output coil, 53overview, 51parentheses, 59, 63relational operator, 59result, 54roundoff differences, 68SIN, 64SIND, 64single expression, 61size, 54SQRT, 64TAN, 64TAND, 64unary operator, 59variable, 51words consumed, 54
ESI, 469EUCA, 489Exclusive OR, 1145EXP, 64exponential notation
mathematical equation, 58exponentiation operator, 59expression
equation network, 61Extended Math, 259Extended Memory Read, 1133Extended Memory Write, 1139
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Index
043505766 4/2006 lix
FFast I/O Instructions
BMDI, 135ID, 617IE, 621IMIO, 625IMOD, 631ITMR, 639
FIN, 503First In, 503First Out, 507First-order Lead/Lag Filter, 851FIX, 64FLOAT, 64Floating Point - Integer Subtraction, 453Floating Point Addition, 271Floating Point Arc Cosine of an Angle (in Radians), 285Floating Point Arc Tangent of an Angle (in Radians), 295Floating Point Arcsine of an Angle (in Radians), 291Floating Point Common Logarithm, 389Floating Point Comparison, 307Floating Point Conversion of Degrees to Radians, 319Floating Point Conversion of Radians to Degrees, 337Floating Point Cosine of an Angle (in Radians), 343Floating Point Divided by Integer, 353Floating Point Division, 357Floating Point Error Report Log, 365Floating Point Exponential Function, 371Floating Point Multiplication, 401Floating Point Natural Logarithm, 377Floating Point Sine of an Angle (in Radians), 423Floating Point Square Root, 429, 435Floating Point Subtraction, 457Floating Point Tangent of an Angle (in Radians), 465Floating Point to Integer, 513Floating Point to Integer Conversion, 325floating point variable, 56
Formatted Equation Calculator, 821Formatting Messages, 83Four Station Ratio Controller, 887FOUT, 507FTOI, 513function
ABS, 64ARCCOS, 64ARCSIN, 64ARCTAN, 64argument, 64argument limits, 65COS, 64COSD, 64entering in equation network, 64EXP, 64FIX, 64FLOAT, 64LN, 64LOG, 64SIN, 64SIND, 64SQRT, 64TAN, 64TAND, 64
Ggroup expressions in nested layers of parentheses
equation network, 51
HHistory and Status Matrices, 583HLTH, 583horizontal open
equation network, 53horizontal short
equation network, 53Hot standby
CHS, 157
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Index
lx 043505766 4/2006
IIBKR, 603IBKW, 607ICMP, 611ID, 617IE, 621IMIO, 625Immediate I/O, 625IMOD, 631Indirect Block Read, 603Indirect Block Write, 607infix notation
equation network, 52Input Compare, 611Input Selection, 897Installation of DX Loadables, 101Instruction
Coils, Contacts and Interconnects, 91Instruction Groups, 37
ASCII Communication Instructions, 39Coils, Contacts and Interconnects, 50Counters and Timers Instructions, 40Fast I/O Instructions, 41Loadable DX, 42Math Instructions, 43Matrix Instructions, 45Miscellaneous, 46Move Instructions, 47Overview, 38Skips/Specials, 48Special Instructions, 49
Integer - Floating Point Subtraction, 461Integer + Floating Point Addition, 275Integer Divided by Floating Point, 361Integer to Floating Point, 645Integer x Floating Point Multiplication, 405Integer-Floating Point Comparison, 313Integer-to-Floating Point Conversion, 331Integrate Input at Specified Interval, 827Interconnects, 91Interrupt Disable, 617Interrupt Enable, 621Interrupt Handling, 97Interrupt Module Instruction, 631Interrupt Timer, 639
ISA Non Interacting PI, 865ITMR, 639ITOF, 645
JJSR, 649Jump to Subroutine, 649
LLAB, 653Label for a Subroutine, 653Limiter for the Pv, 837
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Index
043505766 4/2006 lxi
LL984AD16, 109ADD, 113AND, 117BCD, 123BLKM, 127BLKT, 131BMDI, 135BROT, 139CHS, 157CKSM, 163Closed Loop Control / Analog Values, 71CMPR, 167Coils, Contacts and Interconnects, 91COMP, 179DCTR, 203DIOH, 207DIV, 217DLOG, 223DRUM, 237DV16, 243EMTH, 259EMTH-ADDDP, 265EMTH-ADDFP, 271EMTH-ADDIF, 275EMTH-ANLOG, 279EMTH-ARCOS, 285EMTH-ARSIN, 291EMTH-ARTAN, 295EMTH-CHSIN, 301EMTH-CMPFP, 307EMTH-CMPIF, 313EMTH-CNVDR, 319EMTH-CNVFI, 325EMTH-CNVIF, 331EMTH-CNVRD, 337EMTH-COS, 343EMTH-DIVDP, 347EMTH-DIVFI, 353EMTH-DIVFP, 357EMTH-DIVIF, 361EMTH-ERLOG, 365EMTH-EXP, 371EMTH-LNFP, 377EMTH-LOG, 383EMTH-LOGFP, 389
EMTH-MULDP, 395EMTH-MULFP, 401EMTH-MULIF, 405EMTH-PI, 411EMTH-POW, 417EMTH-SINE, 423EMTH-SQRFP, 429EMTH-SQRT, 435EMTH-SQRTP, 441EMTH-SUBDP, 447EMTH-SUBFI, 453EMTH-SUBFP, 457EMTH-SUBIF, 461EMTH-TAN, 465ESI, 469EUCA, 489FIN, 503Formatting Messages for ASCII READ/
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Index
lxii 043505766 4/2006
WRIT Operations, 83FOUT, 507FTOI, 513HLTH, 583IBKR, 603IBKW, 607ICMP, 611ID, 617IE, 621IMIO, 625IMOD, 631Interrupt Handling, 97ITMR, 639ITOF, 645JSR, 649LAB, 653LOAD, 657MAP 3, 661MBIT, 677MBUS, 681MRTM, 691MSTR, 701MU16, 747MUL, 751NBIT, 755NCBT, 759NOBT, 763NOL, 767OR, 775PCFL, 781PCFL-AIN, 787PCFL-ALARM, 793PCFL-AOUT, 799PCFL-AVER, 803PCFL-CALC, 809PCFL-DELAY, 815PCFL-EQN, 821PCFL-INTEG, 827PCFL-KPID, 831PCFL-LIMIT, 837PCFL-LIMV, 841PCFL-LKUP, 845PCFL-LLAG, 851PCFL-MODE, 855PCFL-ONOFF, 859PCFL-PI, 865
PCFL-PID, 871PCFL-RAMP, 877PCFL-RATE, 883PCFL-RATIO, 887PCFL-RMPLN, 893PCFL-SEL, 897PCFL-TOTAL, 903PEER, 909PID2, 913R --> T, 929RBIT, 933READ, 937RET, 943SAVE, 961SBIT, 965SCIF, 969SENS, 975SRCH, 987STAT, 993SU16, 1021SUB, 1025Subroutine Handling, 99T.01 Timer, 1049T-->R, 1037T-->T, 1043T0.1 Timer, 1053T1.0 Timer, 1057T1MS Timer, 1061TBLK, 1067TEST, 1073UCTR, 1077WRIT, 1091XMRD, 1133XMWT, 1139XOR, 1145
LN, 64LOAD, 657Load Flash, 657Load the Floating Point Value of "Pi", 411
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Index
043505766 4/2006 lxiii
Loadable DXCHS, 157DRUM, 237ESI, 469EUCA, 489HLTH, 583ICMP, 611Installation, 101MAP 3, 661MBUS, 681MRTM, 691NOL, 767PEER, 909
LOG, 64Logarithmic Ramp to Set Point, 893logic editor
equation network, 51, 52Logical And, 117logical expression
equation network, 51Logical OR, 775Look-up Table, 845LSB (least significant byte)
constant data, 57
MMAP 3, 661MAP Transaction, 661Master, 701Math
AD16, 109ADD, 113BCD, 123DIV, 217DV16, 243FTOI, 513ITOF, 645MU16, 747MUL, 751SU16, 1021SUB, 1025TEST, 1073
math coprocessorroundoff differences, 68
math operatorequation network, 51
mathematical equationconstant data, 57exponential notation, 58values and data types, 55
mathematical functionABS, 64ARCCOS, 64ARCSIN, 64ARCTAN, 64argument, 64argument limits, 65COS, 64COSD, 64entering in equation network, 64equation network, 64EXP, 64FIX, 64FLOAT, 64LN, 64LOG, 64SIN, 64SIND, 64SQRT, 64TAN, 64TAND, 64
mathematical operationarithmetic operator, 59assignment operator, 59bitwise operator, 59conditional operator, 59equation network, 59exponentiation operator, 59parentheses, 59relational operator, 59unary operator, 59
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Index
lxiv 043505766 4/2006
MatrixAND, 117BROT, 139CMPR, 167COMP, 179MBIT, 677NBIT, 755NCBT, 759, 763OR, 775RBIT, 933SBIT, 965SENS, 975XOR, 1145
MBIT, 677MBUS, 681MBUS Transaction, 681
MiscellaneousCKSM, 163DLOG, 223EMTH, 259EMTH-ADDDP, 265EMTH-ADDFP, 271EMTH-ADDIF, 275EMTH-ANLOG, 279EMTH-ARCOS, 285, 343EMTH-ARSIN, 291EMTH-ARTAN, 295EMTH-CHSIN, 301EMTH-CMPFP, 307EMTH-CMPIF, 313EMTH-CNVDR, 319EMTH-CNVFI, 325EMTH-CNVIF, 331EMTH-CNVRD, 337EMTH-DIVDP, 347EMTH-DIVFI, 353EMTH-DIVFP, 357EMTH-DIVIF, 361EMTH-ERLOG, 365EMTH-EXP, 371EMTH-LNFP, 377EMTH-LOG, 383EMTH-LOGFP, 389EMTH-MULDP, 395EMTH-MULFP, 401EMTH-MULIF, 405EMTH-PI, 411EMTH-POW, 417EMTH-SINE, 423EMTH-SQRFP, 429EMTH-SQRT, 435EMTH-SQRTP, 441EMTH-SUBDP, 447EMTH-SUBFI, 453EMTH-SUBFP, 457EMTH-SUBIF, 461EMTH-TAN, 465LOAD, 657MSTR, 701SAVE, 961SCIF, 969XMRD, 1133
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Index
043505766 4/2006 lxv
XMWT, 1139mixed data types
equation network, 66Modbus Functions, 1099Modbus Plus
MSTR, 701Modbus Plus Network Statistics
MSTR, 732Modify Bit, 677Move
BLKM, 127BLKT, 131FIN, 503FOUT, 507IBKR, 603IBKW, 607R --> T, 929SRCH, 987T-->R, 1037T-->T, 1043TBLK, 1067
MRTM, 691MSTR, 701
Clear Local Statistics, 716Clear Remote Statistics, 722CTE Error Codes for SY/MAX and TCP/IP Ethernet, 746Get Local Statistics, 714Get Remote Statistics, 720Modbus Plus and SY/MAX Ethernet Error Codes, 739Modbus Plus Network Statistics, 732Peer Cop Health, 724Read CTE (Config Extension Table), 728Read Global Data, 719Reset Option Module, 727SY/MAX-specific Error Codes, 741TCP/IP Ethernet Error Codes, 743TCP/IP Ethernet Statistics, 737Write CTE (Config Extension Table), 730Write Global Data, 718
MU16, 747MUL, 751Multiply, 751Multiply 16 Bit, 747Multi-Register Transfer Module, 691
NNBIT, 755NCBT, 759nested layer
parentheses, 51nested parentheses
equation network, 63Network Option Module for Lonworks, 767NOBT, 763NOL, 767Normally Closed Bit, 759normally closed contact
equation network, 53Normally Open Bit, 763normally open contact
equation network, 53
OON/OFF Values for Deadband, 859One Hundredth Second Timer, 1049One Millisecond Timer, 1061One Second Timer, 1057One Tenth Second Timer, 1053operator combinations
equation network, 66operator precedence
equation network, 62OR, 775output coil
equation network, 53
Pparentheses
entering in equation network, 63equation network, 51nested, 63nested layer, 51using in equation network, 63
PCFL, 781PCFL Subfunctions
General, 73PCFL-AIN, 787PCFL-ALARM, 793
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Index
lxvi 043505766 4/2006
PCFL-AOUT, 799PCFL-AVER, 803PCFL-CALC, 809PCFL-DELAY, 815PCFL-EQN, 821PCFL-INTEG, 827PCFL-KPID, 831PCFL-LIMIT, 837PCFL-LIMV, 841PCFL-LKUP, 845PCFL-LLAG, 851PCFL-MODE, 855PCFL-ONOFF, 859PCFL-PI, 865PCFL-PID, 871PCFL-RAMP, 877PCFL-RATE, 883PCFL-RATIO, 887PCFL-RMPLN, 893PCFL-SEL, 897PCFL-Subfunction
PCFL-AIN, 787PCFL-ALARM, 793PCFL-AOUT, 799PCFL-AVER, 803PCFL-CALC, 809PCFL-DELAY, 815PCFL-EQN, 821PCFL-INTEG, 827PCFL-KPID, 831PCFL-LIMIT, 837PCFL-LIMV, 841PCFL-LKUP, 845PCFL-LLAG, 851PCFL-MODE, 855PCFL-ONOFF, 859PCFL-PI, 865PCFL-PID, 871PCFL-RAMP, 877PCFL-RATE, 883PCFL-RATIO, 887PCFL-RMPLN, 893PCFL-SEL, 897PCFL-TOTAL, 903
PCFL-TOTAL, 903PEER, 909
PEER Transaction, 909PID Algorithms, 871PID Example, 77PID2, 913PID2 Level Control Example, 80PLCs
roundoff differences, 68scan time, 69
precedenceequation network, 62
Process Control Function Library, 781Process Square Root, 441Process Variable, 72Proportional Integral Derivative, 913Put Input in Auto or Manual Mode, 855
QQuantum PLCs
roundoff differences, 68
RR --> T, 929Raising a Floating Point Number to an Integer Power, 417Ramp to Set Point at a Constant Rate, 877RBIT, 933READ, 937
MSTR, 712Read, 937READ/WRIT Operations, 83Register to Table, 929registers consumed
mathematical equation, 56Regulatory Control, 782relational operator, 59Reset Bit, 933result
equation network, 54RET, 943Return from a Subroutine, 943roundoff differences
equation network, 68
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Index
043505766 4/2006 lxvii
SSAVE, 961Save Flash, 961SBIT, 965SCIF, 969Search, 987SENS, 975Sense, 975Sequential Control Interfaces, 969Set Bit, 965Set Point Vaiable, 72signed 16-bit variable, 56signed long (32-bit) variable, 56SIN, 64SIND, 64single expression
equation network, 61Skips / Specials
RET, 943Skips/Specials
JSR, 649LAB, 653
SpecialDIOH, 207PCFL, 781PCFL-, 799PCFL-AIN, 787PCFL-ALARM, 793PCFL-AVER, 803PCFL-CALC, 809PCFL-DELAY, 815PCFL-EQN, 821PCFL-KPID, 831PCFL-LIMIT, 837PCFL-LIMV, 841PCFL-LKUP, 845PCFL-LLAG, 851PCFL-MODE, 855PCFL-ONOFF, 859PCFL-PI, 865PCFL-PID, 871PCFL-RAMP, 877PCFL-RATE, 883PCFL-RATIO, 887PCFL-RMPLN, 893PCFL-SEL, 897PCFL-TOTAL, 903PCPCFL-INTEGFL, 827PID2, 913STAT, 993
SQRT, 64SRCH, 987STAT, 993Status, 993SU16, 1021SUB, 1025Subroutine Handling, 99Subtract 16 Bit, 1021Subtraction, 1025Support of the ESI Module, 469
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com
Index
lxviii 043505766 4/2006
TT.01 Timer, 1049T-->R, 1037T-->T, 1043T0.1 Timer, 1053T1.0 Timer, 1057T1MS Timer, 1061Table to Block, 1067Table to Register, 1037Table to Table, 1043TAN, 64TAND, 64TBLK, 1067TCP/IP Ethernet Statistics
MSTR, 737TEST, 1073Test of 2 Values, 1073Time Delay Queue, 815Totalizer for Metering Flow, 903
UUCTR, 1077unary operator, 59unsigned 16-bit variable, 56unsigned long (32-bit) variable, 56Up Counter, 1077
Vvalues and data types
mathematical equation, 55variable
equation network, 51variable data
mathematical equation, 56Velocity Limiter for Changes in the Pv, 841
Wword
maximum in an equation network, 54words consumed
constant data, 57mathematical equation, 56
WRIT, 1091Write, 1091
MSTR, 710
XXMRD, 1133XMWT, 1139XOR, 1145
This document provided by Barr-Thorp Electric Co., Inc. 800-473-9123 www.barr-thorp.com