Precautions, Tips & Tricks When Using Macros; Com Piler Er Rors & Er Ror Codes - Maple Systems Silver Series Installation And Operation Manual

Operator interface terminal
Hide thumbs Also See for Silver Series:
Table of Contents

Advertisement

Mac ros
iAddr_Off
iDataCount
Precautions, tips & tricks when using Macros
The size of a macro in an eob file is limited by the memory of the OIT.
The maximum storage space of local variables in a macro is 4K bytes.
A maximum of 256 macros are allowed in an EasyBuilder project.
A macro may cause the OIT to lock up. Possible causes are:
A macro contains an infinite loop with no PLC communication.
The size of an array exceeds the storage space in a macro.
PLC communication time may cause the macro to execute slower than expected.
Random macro compiler errors can often be corrected by recompiling again, or canceling out of the macro
editor and then reopen and compile again.
Some macros don't work the way they should due to the declaration of some variables and how they get
interpreted. Some Boolean arrays work better when defined as an array of 'short's or 'int's. When getting
data from an external register, the variable to receive it is best declared as a 'short' or an array of 'short's.
Com piler Er rors & Er ror Codes
When there are compile errors, the error description can be referenced by the compiler error message number.
Error message format: Macro_name(: Error_message_number ) Error_Message.
(1): "Syntax error", "identifier" - There are many possibilities for the cause of this compiler error. Simply
stated, the compiler found a problem with the syntax of the statement
(2): Used without having been initialized. - Must define the size of an array during declaration. The array
size declaration must be a constant whole number, not a variable.
(3): "Redefinition error: " - The name of variable and function within its scope must be unique.
(4): "Function name error:" 'identifier' - Reserved keywords and constant can not be the name of a function
(5): "Statement missing" ; Statement missing "(" or ")" - Some part of the Statement is missing, typically it
is a missing parentheses
(6): "Missing expression in 'If' statement"
(7): "Missing "Then" in If statement"
(8:) "Missing "EndIf" " ;
(9:) Unfinished "If' statement before "End If" " ;
(10:) "Illegal Else statement" ;
The address offset in the PLC
Number of words
Macro_Command main( )
int g[10] , g
For g[2] = 0 To 2
g[3] = 4
Next g[2]
End Macro_Command
Macro_Command If( )
name
Macro_Command main )
//<- illegal – redefinition of 'g'
//<- illegal – used 'If' in the
//<- illegal – missing '('
257
1010-1001a, Rev 02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents