g[3] = 4 + XYZ <- illegal – XYZ is undefined
Next g[2]
End Macro_Command
· (28:)"Missing “Sub” “ ;
· (29:)"Missing “Macro_Command” “ ;
The format of function declaration is:
Sub(Macro_Command) [data type] function_name( … )
End Sub(Macro_Command)
Any format other than this format will cause compile error.
· (30:)"Mismatch of the number of parameters “ ;
· (31:)"Mismatch of data type of parameter" ;
· (32:)"Parameter error";
The parameters of a function must be equivalent to the arguments passing to
a function to avoid compile error.
· (33:) “Undefined function” ;
· (34:)Illegal member of array
· (35:)Illegal definition of array";
· (36)Illegal index of array
· (37:) “Undefined symbol” ;
Any variable or function should be declared before use.
· (38:) “Un-supported PLC data address” ;
The parameter of GetData( … ) , SetData( … ) should be legal PLC
address.
· (39:) Should be integer, character or constant" ;
The format of array is:
Declaration: array_name[constant] (constant is the size of the array)
Usage: array_name[integer, character or constant] Any format other than
this format will cause compile error.
· (40:) “Illegal Macro statement before declaration statement ”
For example :
Macro_Command main( )
int g[10]
For g[2] = 0 To 2
g[3] = 4 + g[9]
int h , k <- illegal – definitions must occur
before any statements or expressions
Next g[2]
End Macro_Command
· (41:) “Floating point can not bitwise shift”
· (42:) “Missing function return value ” ;
· (43) “Function can not return a value”
· (44:) “Illegal Float data type in expression” ;
· (45:) “Error PLC address” ;
· (46:) “Stack can not exceed 4k bytes” ;
· (47:) “Only one main entrance in the Macro is allowed” ;
· (48) “Too many main entrance: ” ‘identifier’
The only one main entrance of Macro is:
Macro_Command function_name( )
1010-1001a, Rev 02
Mac ros 259