Measurement#
This task is intended to fully integrate with the Weigh & Dispense functionality of the MES. It is responsible for collecting measurements and send them to the MES.
Inputs#
| Name | Data Type | Description |
|---|---|---|
| entity | Entity Type | Entity that we want to collect the measurement |
| isStable | Boolean | Flag indicating the received value is stable |
| value | Any | Value that is measured |
| Activate | Any | Activate the task |
Outputs#
| Name | Data Type | Description |
|---|---|---|
| onSetup | Object | Emits the contents received when an OnSetup message is received |
| onStart | Object | Emits the contents received when an OnStart message is received |
| onStop | Object | Emits the contents received when an OnStop message is received |
| Success | Boolean | Triggered when the task is executed with success |
| Error | Error | Triggered when the task failed for some reason |
Settings#
On the General tab, you have the usual settings and the following settings:
| Name | Data Type | Values | Default | Description |
|---|---|---|---|---|
| AutoActivate | Boolean | true | Auto subscribes to the subjects specified in the Setup Instrument, Start Measuring, Stop Measuring. | |
| Instrument Type | Enum | OtherScale | Other | If the option chosen is Scale, it will add the fields tareValue and tareIsSetto the input fields, it will also add the fields resetTare and setTareto the output fields |
| Entity | EntityType | Resource | Entity Type associated to the measurement | |
| Instance | EntityType | Instance of the specified Entity Type | ||
| Setup Instrument | String | Displays the subject expected for the setup device message | ||
| Start Measuring | String | Displays the subject expected for the start device message | ||
| Stop Measuring | String | Displays the subject expected for the stop device message |
On the Inputs Tab you have the following setting:
| Name | Data Type | Default Value | Description |
|---|---|---|---|
| Name | String | Input Name | |
| Property Name | String | Property Name | |
| Type | LongDecimalDateTimeBooleanStringInteger | The type of input value. | |
| Collection Type | NoneArrayMap | ||
| Default Value | any | The default value of an input parameter. |
On the Outputs Tab you have the following setting:
| Name | Data Type | Default Value | Description |
|---|---|---|---|
| Name | String | Output Name | |
| Property Name | String | Property Name | |
| Type | LongDecimalDateTimeBooleanStringInteger | The type of output value. | |
| Collection Type | NoneArrayMap | ||
| Expression | any | The operation you wish to apply to the input. |
Behavior#
This task is responsible for sending measurements to the MES, via message bus. It has defined static subjects, using the instance id and uses them to publish in the message bus. It is also subscribed to those subjects, so the communication with the MES is bi-directional.
When the task receives an input entity it will subscribe to all the message bus subjects (start, stop and setup) of that entity instance. If the task receives an activate as true, the task will try to subscribe to the entity defined in the settings, if the activates is a false it will unsbscribe. When the task receives a value, it will publish it to all the active subjects.
Remarks#
There is no particular remark to be made.



