A - assignment statement reference, Appendix a assignment statement reference – Micromod MOD: 30MLTraining Manual User Manual
Page 267

Training Manual
APPENDIX A - ASSIGNMENT STATEMENT REFERENCE
APPENDIX A
ASSIGNMENT STATEMENT REFERENCE
A.1
ASSIGNMENT STATEMENTS
The assignment statement assigns a value to a given target. The target of an assignment can
be an input name, a local attribute name, or one of several predefined names listed below. All
assignment statements have an expression as their right hand side. The target will be
assigned the value of that expression. Results of assignment statements depend upon the
data type as listed below for the different assignment types. See Display Block for usage
rules and an explanation of resources.
• Table A-1. Assignment Statement Results of Type ‘srcname1 = srcname2'
For example, I1 = I2 or I1 = 4576, or RESULT = INPUT * RATIO + BIAS
(where input, ratio and bias are unique names for display block inputs or
local attribute names).
• Table A-2. Assignment Statements of Type 'display_resource = source_name'
For example, #RBAR = OUTPUT (where #RBAR is a display resource and
output is the unique name of a display block input or local attribute name).
• Table A-3. Assignment Statements of Type 'display_resource = constant’
For example, #LINE1 = 37.94 (where #LINE1 is a display resource).
• Table A-4. Assignment Statements of Type 'display_resource.SRC = srcname'
For example, #RBAR.SRC = OUTPUT; (where #RBAR.SRC is a display
resource having the suffix .SRC and output is the unique name of a display
block input or local attribute name).
Table A-1. Assignment Statement Results of Type ‘srcname1 = srcname2'
Destination Type
Source Type
Result
Discrete
Discrete:
= input
Short State:
True if input non-zero
Long State:
True if input non-zero
Count:
True if input non-zero
Msec Time:
True if input non-zero
Floating Point
True if input non-zero
Date:
True if input non-zero
Hex:
True if input non-zero
Short State
Discrete:
= input
Short State:
= input
Long State:
limits at 15
Count:
limits at 15
Msec Time:
treats input as 4 byte integer, limits at 15
Floating Point
drops fractional part, limits at 15
Date:
treats input as 3 byte integer, limits at 15
Hex:
treats input as n byte integer, limits at 15
A-1