Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSR-253 : Create a new Control Block linked to a DataSet - 2. Sampled Value Control Block #43

Closed
jeanetiennelemaire opened this issue Nov 15, 2021 · 0 comments

Comments

@jeanetiennelemaire
Copy link

jeanetiennelemaire commented Nov 15, 2021

As a COMPAS service user, this US purpose is to create a service which generates a new SampledValue type Control Block into a specified IED/LDevice/LN0 in current SCD file.

 

As integrator, I would like to create a new Sampled Value control block with its properties, options and data destinations (IEDName element) within a previous existing SCD file (mandatory) for a given IED/LD/LN0.

 

Prerequisites 

None

 

The inputs of this service are:

A previous existing SCD file (Mandatory) defined by Header.id, Header.version and Header.revision. It contains at least one IED.name which contains at least one LDevice.inst
The place where the new control block has to be created within the SCD file. This place is defined by these attributes:
IED.name
LDevice.inst (the Sampled Value control block is only allowed in the logical node LLN0 so the LN.lnClass/LN.prefix/LN.inst are not mandatory for Sampled Value ControlBlock)
the attributes of Sampeld Value Control Block:
name : A name identifying this SMV control block
desc : Optional. The description text
datSet : The name of the data set whose values shall be sent; datSet should only be missing within an ICD-File, or to indicate an unused control block. A referenced data set must reside in LLN0. The datSet attribute must contain a valid data set reference, or be missing completely. The referenced data set shall reside in LLN0, like the control block
smvID : String (VisString129), required. Multicast CB: the MsvID for the sampled value definition as defined in IEC 61850-7-2; Unicast CB: the UsvID as defined in IEC 61850-7-2.
multicast : Boolean, default value=true. False indicates Unicast SMV services only meaning that smvID = UsvID
smpRate : Integer (INT16U), required. Sample rate as defined in IEC 61850-7-2. If no smpMod is defined, in samples per period, else as stated by smpMod.
nofASDU : Integer, required. Number of ASDU (Application service data unit) – see IEC 61850-9-2
smpMod : Optional, default='SmpPerPeriod'. The sampling mode as defined in IEC 61850-7-2; default: 'SmpPerPeriod'; if supported by the IED, also 'SmpPerSec' and 'SecPerSample' can be choosen. In these cases smpRate defines the appropriate sample number per second, or seconds between samples.
An optional Protocol definition supported by SampledValueControl
Protocol : R-SV (optional) ; if missing the Protocol node is not present
Protocol.mustUnderstand: Boolean, optional default value is 'true' if missing and if Protocol is defined to 'R-SV'
securityEnabled : Optional. Default: 'None'. Allows to configure the message security options per control block instance: 'Signature' or 'SignatureAndEncryption'. Only those indicated by the McSecurity element of the SMVSetting are allowed. 
An optional set of options (SmvOpts element) :
refreshTime : Boolean, optional, default: false. The meaning of the options is described in IEC 61850-7-2. If any of the attributes is set to true, the appropriate values shall be included into the SMV telegram
sampleRate : Boolean, optional, default: false. The meaning of the options is described in IEC 61850-7-2. If any of the attributes is set to true, the appropriate values shall be included into the SMV telegram
dataSet : Boolean, optional, default: false. The meaning of the options is described in IEC 61850-7-2. If the attribute is set to true, the dataset name shall be included into the SMV telegram
security : Boolean, optional, default: false. See IEC 61850-9-2 for description
synchSourceId : Boolean, optional, default: false. If true, the SV message contains the identity of the synchronizing master clock according to IEC 61850-9-3; default = false
An optional list of data destinations (IEDName element) :
IEDname : Required if the optional list of data destinations has to be populated. IED name that have to subscribe to the Sampled Value data.
apRef : The reference to the access point on the IED, via which the data shall flow. Optional, only needed if the IED has more than one access point.
ldInst : Optional but required if lnClass is populated. Identifies the destination LD in the IED.
prefix : Optional. Destination LN prefix.
lnClass : Optional. Destination LN class, optional. If missing, no destination LN at all
lnInst : Optional. Destination LN instance number, optional. If missing, either no destination LN, or lnClass = LLN0.
 

This US is covering the following functional service as described in the 61850-6:

S32 : Create control block types / instances, if IED capabilities allow so, for all types of data flow and log related control blocks.

 

Expected process 

Step 1:

Check that if a required field such as:
name
smvID
smpRate
nofASDU
is missing then an error message is returned: "A required field is missing: name_of_the_missing_field"
 

Check data type for each populated input; if a bad data type is provided then an error message is returned: "Bad data type: you have to entered a data_type for the entry_name".
 

If smpMod value is specified as input, check that smpMod value is included in this set of values: 'SmpPerPeriod' or 'SmpPerSec' or 'SecPerSample' else an error message is returned: "smpMod can only take one of these values: 'SmpPerPeriod' or 'SmpPerSec' or 'SecPerSample'".
 

Check that IED supports the configuration of SampledValueControl
 /SCL/IED/Services/SMVSettings/@cbName has to be equal to 'Conf' or 'Dyn'
else an error message is returned: "The IED capabilities don't support ControlBlock name modification or creation"
 

Check that securityEnabled value is included in this set of values:
'None' is possible whatever the /SCL/IED/Services/SMVSettings/McSecurity/@Signature and  /SCL/IED/Services/SMVSettings/McSecurity/@encryption values
or 'Signature' only if /SCL/IED/Services/SMVSettings/McSecurity/@Signature = true whatever the  /SCL/IED/Services/SMVSettings/McSecurity/@encryption values
or 'SignatureAndEncryption' only if 
/SCL/IED/Services/SMVSettings/McSecurity/@Signature = true
AND /SCL/IED/Services/SMVSettings/McSecurity/@encryption = true
else an error message is returned: "securityEnabled can only take one of these values: 'None' or 'Signature' or 'SignatureAndEncryption'".
 

Step 2:

 Check that the place IED.name/LDevice.inst/LLN0 where the new control block has to be created exists in current SCD file else an error message is returned: "The specified place IED.name/LDevice.inst/LLN0 where the new control block has to be created doesn't exist in current SCD file".
Step 3:

  If Dataset name is provided as input, check that this Dataset name exists and resides in the same LN0 as the Sampled Value control block (i.e IED.name/LDevice.inst/LLN0) else an error message is returned: "The specified DataSet name datSet doesn't exist in IED.name/LDevice.inst/LLN0".
Step 4:

Check that Control Block name is already existing or not:
If already existing in the same IED.name/LDevice.inst/LLN0", then overwrite the existing ControlBlock and keep in memory the ConfRev value and increment it by one.
Else create the new ControlBlock with
ConfRev = 0 if datSet is not specified
ConfRev = 10000 if datSet is specified
Step 5:

 Check that control block ID (smvID) is unique within the whole station (whole SCD file) where the control block resides else an error message is returned: "The specified control block ID smvID already exists within the whole station".
Step 6:

Check that each specified data destinations IEDname/apRef/ldInst/LN.prefix-lnClass-lnInst exists in current SCD file else an error message is returned: "Data destination IEDname/apRef/ldInst/prefix-lnClass-lnInst doesn't exist in current SCD file".
Step 7:

If all previous steps have been completed successfully, then create the /SCL/IED/AccessPoint/Server/LDevice/LN0/SampledValueControl XML block with 
SampledValueControl/@multicast is set to 'true' if no input specified else set the value as input
SampledValueControl/@smpMod is set to 'SmpPerPeriod' if no input specified else set the value as input
SampledValueControl/@securityEnable is set to 'None' if no input is specified else set the value as input
Protocol equals to R-SV then add a element
If Protocol = R-SV as input,
define SampledValueControl/Protocol = R-SV else the node is not put in the ControlBlock
If Protocol/@mustUnderstand = value defined as input if defined else Protocol/@mustUnderstand = true if not defined as input
Step 8:

If at least one input of SmvOpts element is defined, then add SmvOpts XML block into SampledValueControl XML block with:
SampledValueControl/SmvOpts@refreshTime is set to 'false' if no input is specified else set the value as input
SampledValueControl/SmvOpts@sampleRate is set to 'false' if no input is specified else set the value as input
SampledValueControl/SmvOpts@dataSet is set to 'false' if no input is specified else set the value as input
SampledValueControl/SmvOpts@security is set to 'false' if no input is specified else set the value as input
SampledValueControl/SmvOpts@synchSourceId is set to 'false' if no input is specified else set the value as input
 Step 9:

As all defined data destination have been validated, then add an IEDName XML block into SampledValueControl XML block for each defined data destination
 

Output

 The specified Sampled Value Control Block with its options and all its optional data destinations are written into SCD file at the specified place.

 

Error messages

 Those encountered all along the steps 1 to 6.

 

-----  Example of Sampled Value control block  --------

  

   BCU_4CBO_1    BCU_4CBO_1    BCU_4CBO_1   

 

syllamoh added a commit that referenced this issue Feb 2, 2022
Signed-off-by: Mohamed Sylla <mohamed.sylla@rte-france.com>
@syllamoh syllamoh mentioned this issue Feb 2, 2022
SaintierFr pushed a commit that referenced this issue Feb 17, 2022
Signed-off-by: Mohamed Sylla <mohamed.sylla@rte-france.com>
@syllamoh syllamoh reopened this Feb 18, 2022
AliouDIAITE pushed a commit that referenced this issue Jun 3, 2022
Signed-off-by: Mohamed Sylla <mohamed.sylla@rte-france.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants