Common Models Final
Common Models Final
Common Models
Version 1.6
The SunSpec Alliance Interoperability Specifications describe the information models and
MODBUS register mappings for devices used in Renewable Energy systems. A physical device,
such as an inverter, is represented by a collection of one or more of these logical models.
This document describes the Common Models and model design conventions. All SunSpec
devices must contain the device information common model that describes this particular
device as the first logical model of the device.
Change
History
1.3 Require Manufacturer, Model, and Serial Number to be supplied
1.5 Corrected Assigned ID range for String Combiner and Module
1.5
Added
Assigned
ID
ranges
for
Inverter
model,
version
1.2,
Module
model,
version
1.1,
Inverter
Controls
and
Network
Interface.
1.5 Added concept of a scale factor as a basic SunSpec type.
1.5 Added concept of SunSpec Device type to Common Model
1.5 Update Network Configuration, new model ids and some descriptions
1.5 Removed model table and replaced with reference to the PICS
1.5
John
Blair’s
contribution:
document
new
types,
terminology,
model
structure,
best
practices,
other
conventions.
Included
Control
Procedural
Requirements
This
document
and
the
information
contained
herein
is
provided
on
an
"AS
IS"
basis
and
the
SunSpec
Alliance
DISCLAIMS
ALL
WARRANTIES,
EXPRESS
OR
IMPLIED,
INCLUDING
BUT
NOT
LIMITED
TO
ANY
WARRANTY
THAT
THE
USE
OF
THE
INFORMATION
HEREIN
WILL
NOT
INFRINGE
ANY
OWNERSHIP
RIGHTS
OR
ANY
IMPLIED
WARRANTIES
OF
MERCHANTABILITY
OR
FITNESS
FOR
A
PARTICULAR
PURPOSE.
This
document
may
be
used,
copied,
and
furnished
to
others,
without
restrictions
of
any
kind,
provided
that
this
document
itself
may
not
be
modified
in
anyway,
except
as
needed
by
the
SunSpec
Technical
Committee
and
as
governed
by
the
SunSpec
IPR
Policy.
The
complete
policy
of
the
SunSpec
Alliance
can
be
found
at
www.sunspec.org.
The
data
models
can
be
easily
moved
by
XML
and
other
technology,
so
these
specifications
are
not
tied
to
the
30-‐year
old
MODBUS
protocol;
MODBUS
is
the
initial
implementation
specified
because
MODBUS
is
well
understood
and
supported
within
renewable
energy
systems.
Protocol
Mapping
The
device
specifications
outlined
in
this
document
support
Modbus
and
XML
protocol.
Terminology
Device
A
collection
of
models
including
and
starting
with
the
Common
model.
Model
A
complete
SunSpec
data
model,
starting
with
the
model
ID
(DID),
the
length
and
the
data.
Block
A
section
of
Modbus
registers.
A
canonical
SunSpec
model
consists
of
two
blocks,
each
of
which
is
optional.
Instance
The
repeating
sub-‐section
of
a
repeating,
variable-‐length
block.
The
total
length
of
the
repeating
block
must
be
a
multiple
of
the
fixed
length
instance.
Point
A
value
encoded
in
one
or
more
Modbus
registers
using
one
of
the
SunSpec
datatypes
specified
in
the
Common
Model
Specification.
To
define
a
machine
readable
format
for
model
definition
we
need
to
formally
specify
the
structure
of
a
SunSpec
model.
Each
type
of
device
is
defined
in
a
separate
document
that
details
the
fields
and
values
specific
to
that
type.
Current
SunSpec
Device
Types
defined
are
1. Inverter
2. Meter
Additional
device
models
will
be
taken
up
and
defined
as
directed
by
the
SunSpec
Alliance
membership.
1. Definition
of
new
Device
Specific
Models.
New
devices
are
defined
and
assigned
a
new
model
id.
2. Revisions
of
Device
Specific
Models.
Revisions
to
device
models
are
defined
and
assigned
a
new
model
id.
3. Vendor
specific
extensions.
Models
may
include
fields
that
have
vendor
specific
values.
An
example
of
this
is
the
status
and
event
code
fields.
Vendors
may
also
define
a
Vendor
Extension
Model
that
includes
fields
and
values
specific
to
the
vendor.
These
are
assigned
a
model
type
id.
This
model
may
be
then
concatenated
to
the
associated
Device
Specific
Model.
4. Composite
device
types.
Device
Specific
Models
may
be
concatenated
together
to
form
a
composite
device.
An
example
of
this
is
a
Weather
Station
represented
by
a
collection
of
environmental
models.
5. Device
aggregations.
A
map
may
contain
multiple
Common
Models.
Each
Common
Model
marks
the
start
of
a
new
device.
This
is
useful
when
a
map
represents
an
aggregation
of
devices.
(See
the
Module/Panel
specification
for
an
example
of
this
usage.)
• The
first
model
is
the
Common
Model,
which
supplies
vendor
and
model
information
for
the
device.
• The
second
(and
subsequent)
models
will
be
device
specific
–
for
example
a
meter
model,
or
a
meter
model
followed
by
a
GPS
Location
model.
Any
vendor
extension
models
would
be
included
here.
• The
final
End
Model
formally
marks
the
end
of
the
Device
Specific
Models.
4x40122
Vendor
Specific
Model
4x40184
4x40184
End
Model
Common
Model
The
following
data
elements
shall
be
provided
to
uniquely
identify
a
SunSpec
device.
• SunSpec_ID
–
A
well-‐known
value
that
confirms
to
the
client
that
this
device
has
implemented
a
collection
of
SunSpec
Alliance
models.
• ID
–
A
well-‐known
value
that
uniquely
identifies
the
type
of
SunSpec
model.
The
IDs
are
assigned
by
SunSpec.
For
the
Common
Model,
this
value
is
“1”.
• L
–
A
value
that
is
the
length
of
the
device
model
in
Modbus
16-‐bit
registers.
This
value
does
NOT
include
the
ID
or
L.
I.e.
it
is
the
number
of
registers
that
follow
the
length.
For
the
Common
Model,
this
value
is
66
but
may
be
65.
All
SunSpec
models
should
be
of
even
length.
Common
Models
of
length
66
shall
contain
the
SunSpec
pad16
value
as
the
final
register.
• Mn
–
A
unique
value
that
identifies
the
Manufacturer
of
this
device.
Manufacturers
are
encouraged
to
register
their
ID
with
SunSpec
to
guarantee
uniqueness.
SunSpec
maintains
a
database
of
certified
products
by
Manufacturer.
The
Mn
should
be
concise
and
constrained
to
simple
alphanumeric
text
void
of
spacing.
• Md
–
A
manufacturer
specific
value
that
identifies
the
model
of
this
device.
SunSpec
maintains
a
database
of
certified
products
by
Model.
The
Md
should
be
concise
and
constrained
to
simple
alphanumeric
text
void
of
spacing.
•
• Opt
-‐
A
manufacturer
specific
value
that
identifies
any
model
options
for
this
device.
• Vr
-‐
A
manufacturer
specific
value
that
identifies
the
firmware
version
of
this
device.
• SN
-‐
A
manufacturer
specific
value
that
uniquely
identifies
this
device
within
the
manufacturer
name
space.
• DA
-‐
Protocol
specific
value
to
address
this
device
instance.
For
MODBUS
devices,
this
is
the
MODBUS
device
ID.
• Pad
–
SunSpec
pad16
register
.
Must
be
included
for
Common
Models
of
length
66.
Not
included
if
length
is
65.
Note:
SunSpec
requires
that
the
result
of
concatenating
the
three
strings
Mn,
Md,
and
SN
returns
a
globally
unique
string
for
all
of
a
manufacture’s
products.
If
the
optional
Md
value
is
not
implemented,
then
concatenating
the
two
strings
Mn
and
SN
must
be
a
globally
unique
string.
This
string
may
be
used
(for
example)
by
logging
and
uploading
functions.
• ID
–
A
well-‐known
value
that
uniquely
identifies
the
specific
type
of
SunSpec
model
this
is.
• L
–
A
value
that
is
the
length
of
the
model
in
registers.
The
length
should
be
even
and
may
contain
a
rounding
pad
register.
The
length
does
not
include
the
ID
or
L
register.
It
is
the
number
of
registers
that
follow.
• Model
data
fields
would
follow
as
required.
If
the
ID
is
not
recognized
by
the
client,
the
L
value
may
be
used
to
skip
over
the
model
data
and
move
to
the
next
model.
pad: reserved field, used to round a model to an even number of registers
acc: accumulated value, used for ever increasing values that may roll over
Modbus
Register
1
Byte
0
1
Bits
15
14
13
12
10
11
9
8
7
6
5
4
3
2
1
0
NOTE: it is up to the master to detect rollover of accumulated values.
NOTE: if the most significant bit in a bitfield is set, all other bits shall be ignored.
Modbus
1
2
Register
Byte
0
1
2
3
Bits
31
…
24
23
…
16
15
…
8
7
…
0
int32
Range:
-‐2147483647
…
2147483647
Not
Implemented:
0x80000000
NOTE: it is up to the master to detect rollover of accumulated values.
NOTE: if the most significant bit in a bitfield is set, all other bits shall be ignored.
Modbus
1
2
Register
Byte
0
1
2
3
Bits
63
…
56
55
…
48
47
…
40
39
…
32
Modbus
3
4
Register
Byte
4
5
6
7
Bits
31
…
24
23
…
16
15
…
8
7
…
0
NOTE:
Only
positive
values
in
the
int64
range
are
allowed.
Values
outside
of
this
range
shall
be
considered
invalid.
NOTE:
This
value
shall
rollover
after
the
highest
positive
value
in
the
int64
range
(0x7fffffffffffffff).
It
is
up
to
the
reader
to
detect
rollover
of
accumulated
values.
String
Values
Store
variable
length
string
values
in
a
fixed
size
register
range
using
a
NULL
(0
value)
to
terminate
or
pad
the
string.
For
example,
up
to
16
characters
can
be
stored
in
8
contiguous
registers
as
follows
Modbus
1
2
3
4
5
6
7
8
Register
Byte
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Character
E
X
A
M
P
L
E
spc
S
T
R
I
N
G
!
NULL
Modbus
1
Register
Byte
0
1
Bits
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
IEEE
sign
Exponent
Fraction
754
Modbus
2
Register
Byte
2
3
Bits
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
IEEE
Fraction
least
754
Scale
Factors
As
an
alternative
to
floating
point
format,
values
are
represented
by
integer
values
with
a
signed
scale
factor
applied.
The
scale
factor
explicitly
shifts
the
decimal
point
to
the
left
(negative
value)
or
the
right
(positive
value).
Scale
factors
may
be
fixed
and
specified
in
the
documentation
of
a
value,
or
may
have
a
variable
scale
factor
associated
with
it.
E.g.
A
value
“Value”
may
have
an
associated
value
“Value_SF”
of
type
“sunssf”
that
is
a
16
bit
two’s
compliment
integer.
sunssf
signed
range:
-‐10
…
10
Not
Implemented:
0x8000
or
0x0000
NOTE:
Any
value
outside
of
the
sunssf
range
shall
be
considered
to
be
“Not
Implemented”.
Defined
Units
No
units
are
defined
as
part
of
the
Common
Model.
Units
are
defined
as
needed
by
specific
models.
Where
units
are
shared
across
models,
care
will
be
taken
to
ensure
a
common
definition
of
those
units.
Assigned
Values
Values
that
are
well-‐known
and
part
of
the
Common
model
are
defined
here.
134
Device specific status codes shall be defined in corresponding device model.
Base
registers
are
actual
register
offsets
that
start
at
1
–
not
a
function
code
and
not
to
be
confused
with
the
Modicon
convention,
which
would
represent
these
as
4x40001
and
4x50001.
To read register 40001, use the hexadecimal offset of 0x9C40 (40,000) on the wire.
If
you
read
beyond
the
end
of
the
device,
an
exception
may
or
may
not
be
thrown
according
to
the
implementation.
If
no
exception
is
thrown,
then
data
that
comes
after
the
End
Model
is
invalid
and
should
not
be
used.
It
is
recommended
that
masters
read
the
common
model
to
determine
the
contents
of
the
map.
Fixed
model
sizes
must
be
the
size
as
defined.
It
is
nonconformant
to
truncate
a
fixed
size
model.
REMINDER:
This
specification
only
addresses
the
format
of
the
data.
The
data
can
be
moved
via
Modbus/TCP
or
RTU
–
or
any
other
media
which
can
move
Modbus
data.
Implementations
are
responsible
for
returning
measured
values
as
designed.
For
example,
power
and
voltage
readings
may
not
be
in
sync
depending
on
the
product
design.
N.B.
-‐
This
recommendation
is
NOT
the
same
as
in
the
Modbus
specification
but
rather
reflects
common
industry
practice
and
defacto
usage.
The
method
used
for
configuration
of
the
settings
is
not
specified.
Modbus/TCP
Settings
It
is
recommended
that
the
Modbus
Unit
Identifier
should
start
at
address
‘0’.
Additional
devices
should
be
numbered
as
1,
2,
etc.
with
no
gaps
in
the
sequence
to
facilitate
device
discovery.
Default
TCP
port
shall
be
502.
Repeating
Block
(may
be
zero
length)
The
repeating
block
is
composed
of
one
or
more
repeating
instances,
where
an
instance
is
a
sequence
of
points
defined
in
the
model's
specification.
Thus
the
length
of
the
repeating
block
is
constrained
to
be
a
whole
number
multiple
of
the
length
of
an
individual
instance.
We
can
formalize
this
structure
as
follows:
Component
Size
(Modbus
Registers)
Comments
Fixed Length Data Block data block length may be optional (zero
length)
All
SunSpec
data
models
must
adhere
to
this
format.
Reading
applications,
such
as
data
loggers,
depend
on
this
structure
to
properly
parse
discovered
data
models.
The
structure
also
allows
reading
applications
to
ignore
models
it
does
not
understand
yet
continue
to
parse
any
models
it
does
understand.
Length f
Repeating
Models
The
repeating
model
contains
no
fixed
length
section.
Model
ID
id
Length n * i
Repeating
n
*
i
Block
registers
Examples
of
this
structure
are
302:
Irradiance
Model,
303:
Back
of
Module
Temperature
Model
and
304:
Inclinometer
Model.
To
determine
the
number
of
repeated
instances
the
reading
application
must
know,
from
the
specification,
the
length
of
an
instance
in
a
given
model.
The
reading
application
divides
the
indicated
total
model
length
by
the
known
instance
length
to
determine
the
number
of
instances
present.
For
example,
if
the
reading
application
discovers
Model
304
with
a
length
of
18.
It
knows
that
the
length
of
the
repeating
instance
in
Model
304
is
6,
so
applying
the
formula
from
above
it
determines
there
are
3
repeated
instances.
3 = (18 – 0) / 6
Combined
Model
with
Both
a
Fixed
Length
Block
and
Variable
Length
Block
A
model
may
contain
both
a
fixed
length
section
and
a
repeating
section.
Model
ID
id
Repeating
n
*
i
Block
registers
For
example,
Model
403,
the
String
Combiner,
is
composed
of
a
fixed
length
block
of
16
registers
followed
by
a
repeating
block
with
an
instance
length
of
8
registers.
If
a
device
reports
the
total
length
is
112
registers
then
there
must
be
12
instances
in
the
repeating
section.
12 = (112 – 16) / 8
Length 0
Unimplemented
Registers
Optional
registers
may
not
be
supported
by
an
implementation.
WRITE: The written value is ignored. No exception is generated.
A
setting
is
assumed
to
be
a
field
in
a
SunSpec
model
that
is
defined
in
the
specification
as
read/write.
NOTE:
Such
limitations
may
be
documented
in
the
PICS
for
the
implementation.
There
is
no
other
SunSpec
defined
method
for
specifying
or
determining
limits
at
this
time.
WRITE to R: The written value is ignored. No exception is generated.
READ
from
W:
If
the
register
is
supported
returns
0
else
returns
the
unsupported
value.
Incomplete
Enumeration
An
incomplete
enumeration
occurs
when
the
values
for
a
setting
are
expressed
as
an
enumerated
value
and
some
of
the
possible
valid
enumerations
in
the
specification
are
not
valid
in
the
implementation.
Modelers should include a register to indicate which enumerations are supported.
WRITE:
Handled
same
as
an
Invalid
Setting.
The
value
is
not
changed
and
an
exception
“3”
shall
be
generated.
Incomplete
Operation
SunSpec
only
defines
READ
and
WRITE
operations.
Some
operations
may
not
take
place
in
time
for
a
Modbus
response.
If
it
desired
to
return
an
Exception
“5”
ACKNOWLEDGE,
the
model
must
support
a
completion
register.
Otherwise,
Exception
“5”
ACKNOWLEDGE
shall
not
be
returned.
No
exception
shall
be
returned.
Enable Procedure:
Change Procedure
1. Changed
settings
are
written.
Changes
do
NOT
take
effect,
even
if
the
activation
field
is
already
enabled,
until
the
activation
field
is
enabled.
2. The
activation
field
is
enabled
Disable Procedure
Certification
The
SunSpec
Certified™
program
is
designed
to
instill
buyer
confidence
in
SunSpec
member
product
solutions
by
establishing
objective
criteria
for
verifying
compliance
of
communication
interfaces
to
SunSpec
specifications.
This
program
has
been
in
operation
since
2012
and
25
companies
have
been
awarded
certification.
The
SunSpec
Alliance
Certification
Test
consists
of
submitting
a
SunSpec
PICS
(Protocol
Implementation
Conformance
Statement)
and
successfully
executing
the
SunSpec
Alliance
Compliance
test.
Both
certification
and
interoperability
testing
can
be
completed
over
the
Internet.
Certification
is
currently
offered
to
SunSpec
Alliance
Contributing
members
free
of
charge.
The
SunSpec
Alliance
has
a
program
to
accommodate
companies
that
would
like
to
offer
SunSpec
Certified
products
but
can’t
join
the
SunSpec
Alliance
as
members.
This
program,
called
the
SunSpec
Certified
Partner
Program,
is
for
equipment
manufacturers
and
software
developers
seeking
to
have
their
products
SunSpec
Certified™
without
needing
to
join
the
SunSpec
Alliance.
The
SunSpec
Certified
mark
instills
buyer
confidence
in
the
quality
and
interoperability
of
your
company’s
products.
Some
additional
benefits
include:
Support
The
Alliance
provides
ongoing
support
for
members
and
non-‐members
utilizing
SunSpec
Alliance
specifications.
If
you
have
any
questions,
concerns,
or
thoughts,
please
visit
http://www.sunspec.org
or
email
us
at
[email protected].