Outbound Communication¶
This enables you to send start and stop commands to a machine using shop floor workbench. In this example the message in Application Messages is enriched with operation information and sent outbound to a Device.
Prerequisites¶
Before configuring there are some considerations:
- Conduct a risk assessments and implement necessary safety steps. The remote start and stop action should never compromise the health and safety of any person.
- Ensure that the Machine supports the required connections.
- The network access, security and routing requirements have been addressed.
- The machine language and message protocol can be handled.
Setup Outbound Communication¶
To setup the outbound communication the following steps need to be addressed.
Work Center - Send IoT Event to Device¶
In Work Center activate Send IoT Event to Device. This Work Center should contain the resource that you want to send the messages to.
Device map¶
In Device Map create a Device ID and connect this to the Work Center Resource ID.
Starting or stopping a operation using a Work Center will generate a IFS Connect Application Message. This message can be enriched with more information and sent outbound.
Enriching the message using Get Operation Info¶
Create a Routing address with the Transport Connector type Projection. Use the transformers TO_MIXED_CASE followed by IFS_XML_TO_JSON_GENERIC. This converts the XML file containing the Operation ID in the application message to a JSON payload. Set the Projection Method to Action and the Projection Resource to ShopFloorConnector.GetOperationInfo.
Set up the outbound address¶
Set up a outbound Routing Address. The example in the images use a RESTful POST message with a Api Key. To configure a custom solution refer to IFS Connect
Routing Rule - Start or Stop operation¶
Set up a Routing Rule to trigger a outbound message when a Application Message occur. Set the MESSAGE_FUNCTION
to START_OPERATION
. Set the RECEIVER as the Device ID connected to the Work Center Resource in the Device Map. Set the first Destination Address to the internal Projection using GetOperationInfo and the second to the outbound address.
Starting Machine Time on a shop order operation now triggers a outbound message to the connected device. A similar setup using MESSAGE_FUNCTION
as STOP_OPERATION
triggers a outbound message on stop.
To differentiate between start, stop, setup and production you can use the OperationStatus information in the GetOperationInfo payload. This is a example snippet of a response:
{
...
"OperationStatus": "SetupStarted",
...
}