ÿþS a i a P G 5 ® I n s t r u c t i o n L i s t L a n g u a g e [PDF]

Saia PG5® Instruction List Language. Manual 26/733 ...... If the natural log of a negative value is taken, the Error fl

3 downloads 30 Views 2MB Size

Recommend Stories


Pa r t n e rs h i p G ra n t s
Where there is ruin, there is hope for a treasure. Rumi

A R E A P L A N C O M M I S S I O N
Make yourself a priority once in a while. It's not selfish. It's necessary. Anonymous

P E N C L U B E D O B R A S I L
Live as if you were to die tomorrow. Learn as if you were to live forever. Mahatma Gandhi

P E N C L U B E D O B R A S I L
The greatest of richness is the richness of the soul. Prophet Muhammad (Peace be upon him)

N A T H A N T I N D A L L - Nathan James Tindall
Kindness, like a boomerang, always returns. Unknown

B I O E N E R G E T I K A
In the end only three things matter: how much you loved, how gently you lived, and how gracefully you

P U T U S A N - Pengadilan Negeri Sibolga
Raise your words, not voice. It is rain that grows flowers, not thunder. Rumi

P U T U S A N - Pengadilan Negeri Medan
We must be willing to let go of the life we have planned, so as to have the life that is waiting for

J I N A S E O
I want to sing like the birds sing, not worrying about who hears or what they think. Rumi

Idea Transcript


Saia PG5® Instruction List Language Manual 26/733

Saia-Burgess Controls AG

1 Introduction

13

1.1

First-time initialization " (is not equal to) will work correctly with floating point numbers. An expression can contain forward references, but these should be used with care since the value of the symbol will be undefined on the first pass of the assembler. This could have disastrous effects, and may cause a "Pass 2 phase error".

15.1

Arithmetic Operators

+, - etc.

Bitwise Operators

For use with binary values

Comparison Operators

For comparing values

Operator Precedence

Order of evaluation

Special @Operators

Special operations which can be used in expressions

Arithmetic Integer Operators + + * / %

15.2

(unary +ve, no operation since +ve is the default) (unary -ve, 2's complement ) add subtract multiply divide modulo (returns the remainder)

Bitwise Binary Operators & |

AND OR

Saia PG5® Instruction List, 2013-10-25

294

Saia-Burgess Controls AG

Expressions Bitwise Binary Operators

^ ! >> Clean Files" command to delete the old block information files. The files will be re-created when the program is rebuilt and downloaded. Tip: This error has also occurred if the same block is defined more than once in the user program, and S-Asm did not generate an error (this can sometimes happen if PUBL/EXTN and dynamic allocation is done in a certain order). Use Project Managers's 'Data List View' to display all the blocks, sort by type/number and check for duplicate block definitions. Error 2101: Too many initialization values ( >64K of data) The total amount of first-time initialization data cannot exceed 64K bytes. Remove all unnecessary first-time initialization data, and/or write some code to initialize the values. Error 2102: Internal error: error_id The linker detected an internal error. Please contact Saia Burgess Controls Technical Support and report the error_id and how to reproduce the problem. Error 2103: Object file error: filename: Psn p: error_id The linker detected a problem in an object file. Please contact Saia Technical Support and report the error_id and how to reproduce the problem. Error 2104: pcd_file_name: error_msg An error occurred while trying to create the 'Downloadable Files Information Database'. The build was successful, but it means that the 'Download Changed Files' option will not know which downloadable files have changed. Downloadable files are used for configuration data, such as the BACnet configuration. Error 2105: Value length exceeds specified width, e.g. symbol.04 where symbol is > 9999 The text contains a formatted symbol, and the symbol's value will not fit into the specified number of digits. This may happen for Mode C texts which are specified using this syntax: "$",symbol.04T, and the symbol is a register or flag number > 9999. For mode C texts which use more than 4 digits, firmware version >= 1.16.54 is required, and you must use the new extended format with an 'X' and a 5-digit address, e.g. "$RX",symbol.05. Tip: If dynamic (auto-allocated) addresses are used, open the 'Build Options' and check the range for Registers or Flags does not go over 9999.

20.4

Linker Warnings 2300+ Warnings do not prevent the creation of the ".pcd" file. Warning 2301: filename: Line n: FB parameter not referenced: FB n: Param n This occurs when a Function Block parameter, supplied in a "Call Function Block" (CFB) parameter list, is not used by the Function Block. The source module name and line number are shown, so

Saia PG5® Instruction List, 2013-10-25

391

Saia-Burgess Controls AG

Error and Warning Messages Linker Warnings 2300+

double-clicking on the error message will open the source file at the correct line. Warning 2302: Can't sort symbol table There is not enough memory available to sort the global symbols into alphabetical order. The symbols are listed in the map file unsorted. (obsolete) Warning 2303: filename: Line n: Too many FB parameters: CFB n The Function Block call provides more parameters than the FB actually needs. The source module name and line number are shown, so double-clicking on the error message will open the source module at the correct line. Warning 2305: Failed to create debug info file: filename For debugging with SEdit's 'code view' mode, the linker creates a file containing the source module line numbers and the locations of the actual code in the PCD's memory. These files are created in the 'Sym' subdirectory. This error occurs if the file could not be created. Check the 'Sym' directories files are not read-only, then try a 'Rebuild All'. Warning 2306: More than one initialization value for: type address symbol If type address is EQUated more than once, which is allowed, it could have more than 'first-time initialization' value. S-Asm will always use the last value supplied. This warning is issued even if the initialization values are the same. Warning 2307: Local and public symbols have the same name: symbol An EQUated symbol which has not been made PUBLic on one file has been defined in anotehr file and made PUBLic (or PEQU was used). This could be a programming error, or could be intentional, for example if the symbol was defined in an include file. Warning 2308: Failed to copy PCX file (symbol database) The ".pcx" file is always created even if the build fails. If the build was successful and there were no errors, the ".pcx" file is copied to the ".pcd" file. If there were errors, the ".pcd" file is deleted. The ". pcx" file contains the symbol table from the build which is read by the Symbol Editor. This error can occur if the ".pcx" file is open when the build is done, and it cannot be updated. If this error occurs, then you should close all applications which may be accessing the file (all editors and add-on tools), and do a manual build. Warning 2309: Time-limited library used: library_name : Expires: expiry_date The library has a limited license and will eventually expire. If the license expires then you will not be bale to build the project. Consider purchasing a license. Warning 2310: Failed to create Block Information files An error occurred while trying to create the 'Block Information Database'. The build was successful, but it means that the 'Download Changed Blocks' option will not know which blocks have changed, and this feature will be disabled. Warning 2311: Failed to create Downloadable Files Information An error occurred while trying to create the 'Downloadable Files Information Database'. The build was successful, but it means that the 'Download Changed Blocks' option will not know which downloadable files have changed. Downloadable files are used for configuration data, such as the BACnet configuration. Warning 2312: Symbol is not an array: symbol_name The symbol is referenced like an array, but it has not been defined as an array. This is often a programming error, and it should be checked. For dynamic addresses this is a fatal error. But for absolute addresses it is a warning because IL code written before arrays were introduced often used the "symbol+offset" syntax. You can disable this warning by setting the Build Option 'Warn on offset to symbol which is not an array' to 'No'.

Saia PG5® Instruction List, 2013-10-25

392

Saia-Burgess Controls AG

Error and Warning Messages Linker Warnings 2300+

EXTN Stmbol R ... INC Symbol+1

;Symbol is R 100 (it is not an array, and not dynamic) ;Warning 2312: Symbol is not an array (R 101 is incremented)

Warning 2313: Symbols with same type and values R 123: Symbol 'symbol0', File: Untitled1.src R 123: Symbol 'symbol1', File: Untitled1.src If the device's Build Option 'Warn on symbols with same type and value' is Yes, then S-Asm gives this warning whenever it finds two different symbols which are accessing the same address. This may be by design if an alias is used, or it may be a programming error. FBox libraries often use aliases for parameters, so you may see these warnings for Fupla programs - they can be ignored, and you can set the warning Build Option to 'No'.

Saia PG5® Instruction List, 2013-10-25

393

Saia-Burgess Controls AG

Miscellaneous ANSI and DOS Character Sets

21

Miscellaneous

21.1

ANSI and DOS Character Sets ANSI character set The ANSI character set shares the same characters with values 0..127 (00..7F hex) as the original DOS character set. IL source files use the ANSI character set. The following table shows Windows-1252, with differences from ISO-8859-1 outlined. Each character is shown with its Unicode equivalent right below and its decimal code at the bottom. Legend: yellow cells are control characters, blue cells are punctuation, purple cells are numbers, green cells are ASCII letters, and tan cells are international letters.

Saia PG5® Instruction List, 2013-10-25

394

Saia-Burgess Controls AG

Miscellaneous ANSI and DOS Character Sets

Original DOS character set This is the original DOS character set that was used by the Saia PG3. Code Page 437

Saia PG5® Instruction List, 2013-10-25

395

Saia-Burgess Controls AG

Miscellaneous ANSI and DOS Character Sets

The following is a table representing CP437 using the equivalent Unicode characters. Standard ASCII and ISO 8859-1 (Latin-1) character glyphs, along with the Greek letters, are shown as coloured cells. Due to the dual use of values in the range 0 to 31 (hexadecimal 00 to 20), there are two sets for these, the first being their meanings as ASCII control characters and the second their graphical output on screen/printer. For value 127 (7F), its graphical output is shown in the last table, its meaning being the ASCII control character "DEL" (delete), Unicode value U+007F. Legend: yellow cells are control characters, blue cells are punctuation, purple cells are numbers, green cells are ASCII letters, and tan cells are international letters.

Saia PG5® Instruction List, 2013-10-25

396

Saia-Burgess Controls AG

Miscellaneous ANSI and DOS Character Sets

Saia PG5® Instruction List, 2013-10-25

397

Saia-Burgess Controls AG

Miscellaneous XOB List

21.2

XOB List Each Exception Organization Block (XOB) has a specific function. XOB

Description

Priority

0

Power down

4

1

Power down in extension rack

1

2

Low battery

1

3

Task/Temp Data overflow

3

4

Parity error on main bus (PCD6 only)

1

5

No response from I/O module

1

6

External error

1

7

System overload

3

8

Invalid opcode

4

9

Too many active tasks (GRAFTEC)

1

10

PB / FB nesting depth overflow

1

11

COB supervision time exceeded

2

12

Index register overflow

1

13

Error flag set

3

14

Cyclic XOB

2

15

Cyclic XOB

2

16

Cold Start

2

17

S-Bus XOB Interrupt Request

2

18

S-Bus XOB Interrupt Request

2

19

S-Bus XOB Interrupt Request

2

20

Interrupt input IN0 / Interrupt input INB0 (1)

2

21

Interrupt input IN1

2

22

Interrupt input IN2

2

23

Interrupt input IN3

2

25

Time Cyclic Alarm / Interrupt input INB1 (1)

2

26

Time Cyclic Alarm

2

27

Time Cyclic Alarm

2

28

Time Cyclic Alarm

2

29

Time Cyclic Alarm

2

30

RIO connection master slave

1

24

(1) For PCD1 and PCD2.M1xx, XOBs 20 and 21 are Interrupt inputs INB0 and INB1 respectively.

Exception Priorities There are 4 priority levels for XOBs. Note that XOB priorities are slightly different for the older PCDs. Level 4 exceptions (highest) Priority level 4 is the highest priority, only XOBs 0 and 8 can interrupt execution of another XOB.

Saia PG5® Instruction List, 2013-10-25

398

Saia-Burgess Controls AG

Miscellaneous XOB List

Level 2 and 3 exceptions If a level 2 or 3 exception occurs during execution of a lower priority XOB, then it will be run directly after the end of the current level XOB. Level 1 exceptions (lowest) Any level 1 exception which occurs during another exception will never be handled.

Level 4 Exceptions Priority level 4 is the highest priority, only XOB 0 and 8 can interrupt execution of another XOB. XOB 0 Power Down There can be up to 10ms between the call of XOB 0 and the final loss of power to the PCD to give the user time to perform some urgent saves of values. If the XOB 0 is programmed then the message "XOB 0 START EXEC" is written into the History List at the start of the XOB and "XOB 0 EXECUTED" upon completion of the XOB, this indicates to the user that the XOB completed before power was lost. If the XOB is not programmed then a restart cold is immediately performed upon detection of the power down. If the XOB is programmed then a restart cold is performed upon completion of the XOB if there is still power. XOB 8 Invalid Opcode XOB 8 is called when the firmware detects an invalid instruction in the user program.

Level 3 Exceptions If a level 2 or 3 exception occurs during execution of a lower priority XOB, then it will be run directly after after the current level XOB. XOB 20/25/11 have been given a higher priority level so that if the XOB is provoked during execution of a lower or equal priority then it will be executed directly after completion of the current XOB. XOB 3

Temp/Task Data Overflow

XOB 7 System Overload The queuing mechanism for the level 3 XOB’s has overloaded. XOB 13 Error Flag XOB 13 is always called when the Error flag is set by an invalid instruction, calculation, data transfer or communications error.

Level 2 Exceptions XOB 11 COB Supervision Time exceeded If the second line of the COB instruction indicates a monitoring time (in 1/100 seconds) and if COB processing time exceeds this defined duration, XOB 11 is called. COB processing time is the time which can elapse between the COB and ECOB instructions. XOB 14 Cyclic XOB XOB 15 XOB 14 and 15 are called periodically with a frequency ranging from 5 ms to 1000s. This frequency can be set using the SYSWR instruction. XOB 16 Cold Start XOB 16 is the start-up XOB (Cold Start XOB), and is executed when the PCD is switched on, or is given a cold restart. XOB 16 can initialise any elements before the program begins.

Saia PG5® Instruction List, 2013-10-25

399

Saia-Burgess Controls AG

Miscellaneous XOB List

If during the execution of the XOB 16 an error occurs, the XOB 13 is not called. XOB 17 S-Bus XOB Interrupt Request XOB 18 XOB 19 These three XOBs are started by a message on the S-Bus network; it is also possible to start them with the SYSWR instruction. XOB 20..25 Interrupt Inputs IN0..IN3 (NT systems) Executed on a rising edge of interrupt inputs IN0 to IN3. XOB 20 and 25 Interrupt Inputs INB0 and INB1 (PCD1 and PCD2M1xx only) These XOBs are called when interrupt input INB1 (resp INB2) of the PCD1/2 has detected a rising edge (see PCD1/2 hardware manual for further details).

Level 1 Exceptions Lowest priority. Any level 1 exception which occurs during another exception will never be treated. XOB 1 Power down in extension rack The voltage monitor in the supply module of an extension rack (PCD 2 or PCD6) detected an excessive drop in voltage. In this case all Outputs of the extension rack are set low within 2ms and XOB 1 is invoked. If Outputs from this "dead" extension rack continue to be handled (set, reset or polled) by the user program in any CPU, XOB 4 and/or XOB 5 are also invoked. (Only PCD4). XOB 1 will be called once up to 250 ms after detection of the error. SYSWR can be used to change the behavior of XOBs 1 and 2. XOB 2 Battery failure or low battery The battery is low, has failed or is missing. Information in non-volatile Flags, Registers or the user program in RAM as well as the hardware clock may be altered. XOB 2 is called by CPU 0 every 250 ms in the event of this error. SYSWR can be used to change the behavior of XOBs 1 and 2. XOB 4 Parity Failure XOB 4 can only be invoked with PCD having extension racks (PCD6 only). The monitor circuit of the address bus has noticed a parity error. This can either arise from a faulty extension cable, a defective extension rack or from a bus extension module, or else it is simply because the extension rack addressed is not present. XOB 5 No response from I/O module (I/O Quit Failure) The PCD's Input and Output modules return a signal to the CPU which has addressed them. If this signal is not returned, then XOB 5 is called. Generally, this occurs if the module is not present, but it can also happen in the case of faulty address decoding on the module. This mechanism is not implemented on the PCD1 and 2. XOB 6 External error Not used. (Foreseen for intelligent modules of the PCD6) XOB 9 Too many Graftec tasks More than 32 Graftec branches were simultaneously activated in a Sequential Block (SB). XOB 10 More than 7 nested PB/FB calls PBs and FBs can be nested to a depth of 7 levels. An additional call (calling the 8th level) results in

Saia PG5® Instruction List, 2013-10-25

400

Saia-Burgess Controls AG

Miscellaneous XOB List

XOB 10 executing. The 8th level call is not executed. XOB 12 Index Register overflow If a program contains an indexed element which falls outside its address range (0 to 8191), then XOB 12 is called. XOB 30 RIO connection master / slaves After every message sent from the master to a slave, the connection is tested. If the test is not answered positively by the slave, the master CPU calls XOB 30. This is essentially the case when, online, a station is removed from the network or closed down.

Saia PG5® Instruction List, 2013-10-25

401

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.