Difference between revisions of "42Q-MES0184-IIoT Configuration"

From 42Q
Jump to navigation Jump to search
Line 12: Line 12:
 
 
 
 
  
= <span class="mw-headline" id="Introduction"><span class="mw-headline" id="Introduction"><span class="mw-headline" id="Introduction"><span class="mw-headline" id="Introduction">Introduction</span></span></span></span> =
+
= <span class="mw-headline" id="Introduction"><span class="mw-headline" id="Introduction"><span class="mw-headline" id="Introduction"><span class="mw-headline" id="Introduction"><span class="mw-headline" id="Introduction">Introduction</span></span></span></span></span> =
  
 
The concept of GGC stands for “Green Grass Computer”, the word: “Computer” also refers to any kind of device. This document will teach users how to configure, install, and deploy a GGC, as well as create and set up an Edge Device for the purpose of establishing a connection between the computer (device) and the 42Q portal to send data (payloads).
 
The concept of GGC stands for “Green Grass Computer”, the word: “Computer” also refers to any kind of device. This document will teach users how to configure, install, and deploy a GGC, as well as create and set up an Edge Device for the purpose of establishing a connection between the computer (device) and the 42Q portal to send data (payloads).
Line 20: Line 20:
 
&nbsp;
 
&nbsp;
  
= <span class="mw-headline" id="Prerequisites"><span class="mw-headline" id="Prerequisites"><span class="mw-headline" id="Prerequisites">Prerequisites</span></span></span> =
+
= <span class="mw-headline" id="Prerequisites"><span class="mw-headline" id="Prerequisites"><span class="mw-headline" id="Prerequisites"><span class="mw-headline" id="Prerequisites">Prerequisites</span></span></span></span> =
  
 
*Only Linux is supported for the computer or device to install the Green Grass Core. The related shell scripts and test code only work on Linux systems (Windows is not currently supported).  
 
*Only Linux is supported for the computer or device to install the Green Grass Core. The related shell scripts and test code only work on Linux systems (Windows is not currently supported).  
Line 29: Line 29:
 
**Python version 3.8 for functions that use the Python 3.8 runtime (included in the installation script).   
 
**Python version 3.8 for functions that use the Python 3.8 runtime (included in the installation script).   
 
*Network requirements:<br/> A Region is an AWS region that hosts 42Q portal APIs. The Green Grass Core hardware needs to be able to access the following endpoints through specific ports:  
 
*Network requirements:<br/> A Region is an AWS region that hosts 42Q portal APIs. The Green Grass Core hardware needs to be able to access the following endpoints through specific ports:  
**[https://www.amazontrust.com/repository/AmazonRootCA1.pem [1]].  
+
**https://www.amazontrust.com/repository/AmazonRootCA1.pem.  
**[https://d2s8p88vqu9w66.cloudfront.net/releases/greengrass-2.6.0.zip [2]].  
+
**https://d2s8p88vqu9w66.cloudfront.net/releases/greengrass-2.6.0.zip.  
 
**greengrass-ats.iot.us-east-1.amazonaws.com. '''Ports:''' &nbsp; 8443, 443.  
 
**greengrass-ats.iot.us-east-1.amazonaws.com. '''Ports:''' &nbsp; 8443, 443.  
 
***.iot.us-east-1.amazonaws.com. '''Ports:''' &nbsp;8883, 8443, 443.  
 
***.iot.us-east-1.amazonaws.com. '''Ports:''' &nbsp;8883, 8443, 443.  
Line 39: Line 39:
 
&nbsp;
 
&nbsp;
  
= <span class="mw-headline" id="Functional_Description"><span class="mw-headline" id="Functional_Description"><span class="mw-headline" id="Functional_Description">Functional Description</span></span></span> =
+
= <span class="mw-headline" id="Functional_Description"><span class="mw-headline" id="Functional_Description"><span class="mw-headline" id="Functional_Description"><span class="mw-headline" id="Functional_Description">Functional Description</span></span></span></span> =
  
There are three different functional components: CloudPrinting, MachineInterface, and DataIngestion.<br/> To access the Edge Devices portlet, navigate to: Shop Floor Control > Configuration > IIoT Configuration > Edge Devices.
+
There are three different functional components: '''CloudPrinting''', '''MachineInterface''', and '''DataIngestion'''.<br/> To access the Edge Devices portlet, navigate to: '''Shop Floor Control > Configuration > IIoT Configuration > Edge Devices'''.
  
<br/> '''Figure 1: Accessing Edge Devices'''<br/> [[File:DSS Accessing Edge Devices.png|800px]]
+
<br/> '''Figure 1: Accessing Edge Devices'''<br/> [[File:DSS Accessing Edge Devices.png|800px|DSS Accessing Edge Devices.png]]
 +
 
 +
&nbsp;
  
 
&nbsp;
 
&nbsp;
Line 49: Line 51:
 
'''Figure 2: Edge Devices Functions'''
 
'''Figure 2: Edge Devices Functions'''
  
[[File:DSS Edge Devices Functions.png|800px]]
+
[[File:DSS Edge Devices Functions.png|800px|DSS Edge Devices Functions.png]]
  
 
&nbsp;
 
&nbsp;
  
#Users can query the list of all devices by Edge Device Name or Group Name.  
+
#Users can query the list of all devices by '''Edge Device Name''' or '''Group Name'''.  
 
#Users can create a new edge device.  
 
#Users can create a new edge device.  
 
#Users can view the details of the edge device.  
 
#Users can view the details of the edge device.  
Line 65: Line 67:
 
&nbsp;
 
&nbsp;
  
= <span class="mw-headline" id="Install_42Q_Edge_Software"><span class="mw-headline" id="Install_42Q_Edge_Software"><span class="mw-headline" id="Install_42Q_Edge_Software">Install 42Q Edge Software</span></span></span> =
+
= <span class="mw-headline" id="Install_42Q_Edge_Software"><span class="mw-headline" id="Install_42Q_Edge_Software"><span class="mw-headline" id="Install_42Q_Edge_Software"><span class="mw-headline" id="Install_42Q_Edge_Software">Install 42Q Edge Software</span></span></span></span> =
  
== <span class="mw-headline" id="CloudPrinting"><span class="mw-headline" id="CloudPrinting"><span class="mw-headline" id="CloudPrinting">CloudPrinting</span></span></span> ==
+
== <span class="mw-headline" id="CloudPrinting"><span class="mw-headline" id="CloudPrinting"><span class="mw-headline" id="CloudPrinting"><span class="mw-headline" id="CloudPrinting">CloudPrinting</span></span></span></span> ==
  
 
Please follow the steps below to create a 42Q Cloud Printing Edge Device in 42Q:
 
Please follow the steps below to create a 42Q Cloud Printing Edge Device in 42Q:
  
#Navigate to: Shop Floor Control > Configuration > IIoT Configuration > Edge Devices.  
+
#'''Navigate''' to: Shop Floor Control > Configuration > IIoT Configuration > Edge Devices.  
#Select CREATE EDGE DEVICE to create a new Green Grass Core.  
+
#'''Select''' '''CREATE EDGE DEVICE''' to create a new Green Grass Core.  
  
 
&nbsp;
 
&nbsp;
Line 78: Line 80:
 
'''Figure 3: CREATE EDGE DEVICE Button'''
 
'''Figure 3: CREATE EDGE DEVICE Button'''
  
[[File:DSS CREATE EDGE DEVICE Button.png|800px]]
+
[[File:DSS CREATE EDGE DEVICE Button.png|800px|DSS CREATE EDGE DEVICE Button.png]]
  
 
&nbsp;
 
&nbsp;
 
<ol start="3">
 
<ol start="3">
<li>Enter the Edge Device Name of the Green Grass Core. The name can be up to 128 characters. Valid characters are: a-z, A-Z, 0-9, colon (:), underscore (_), and hyphen (-).</li>
+
<li>'''Enter''' the '''Edge Device Name''' of the Green Grass Core. The name can be up to 128 characters. Valid characters are: a-z, A-Z, 0-9, colon (:), underscore (_), and hyphen (-).</li>
<li>Select the Group Name as CloudPrintingGroup.</li>
+
<li>Select the '''Group Name''' as '''CloudPrintingGroup'''.</li>
 
</ol>
 
</ol>
  
Line 92: Line 94:
 
<br/> '''Figure 4: Create Edge Device Form'''
 
<br/> '''Figure 4: Create Edge Device Form'''
  
[[File:DSS Create Edge Device Form.png]]
+
[[File:DSS Create Edge Device Form.png|DSS Create Edge Device Form.png]]
  
 
&nbsp;
 
&nbsp;
 
<ol start="5">
 
<ol start="5">
<li>Select the checkbox next to the desired Edge Device.</li>
+
<li>'''Select''' the '''checkbox''' next to the desired Edge Device.</li>
<li>Select the Download icon to download the Edge Device ZIP file.</li>
+
<li>'''Select''' the '''Download''' icon to download the '''Edge Device ZIP file'''.</li>
 
</ol>
 
</ol>
  
Line 106: Line 108:
 
'''Figure 5: Downloading The Files'''
 
'''Figure 5: Downloading The Files'''
  
[[File:DSS Downloading The Files.png|800px]]
+
[[File:DSS Downloading The Files.png|800px|DSS Downloading The Files.png]]
  
 
&nbsp;
 
&nbsp;
 
<ol start="7">
 
<ol start="7">
<li>Right-click on the ZIP file.</li>
+
<li>'''Right-click''' on the '''ZIP file'''.</li>
<li>Select Extract Here to unzip the file.</li>
+
<li>'''Select''' '''Extract Here''' to unzip the file.</li>
<li>Open the Terminal.</li>
+
<li>'''Open''' the '''Terminal'''.</li>
<li>Enter the command: sudo su, and then press Enter.</li>
+
<li>'''Enter''' the command: '''sudo su''', and then press Enter.</li>
<li>Enter the root user’s password, and then press Enter.</li>
+
<li>'''Enter''' the root user’s '''password''', and then press Enter.</li>
 
</ol>
 
</ol>
  
<u>'''Note:'''</u> If the word: root@ appears before the computer’s username as in the image below, it means that you are logged in as a root user.
+
<u>'''Note:'''</u> If the word: '''root@''' appears before the computer’s username as in the image below, it means that you are logged in as a root user.
  
 
&nbsp;
 
&nbsp;
Line 123: Line 125:
 
<br/> '''Figure 6: User Logged In as a Root User'''
 
<br/> '''Figure 6: User Logged In as a Root User'''
  
[[File:DSS User Logged In as a Root User.png]]
+
[[File:DSS User Logged In as a Root User.png|DSS User Logged In as a Root User.png]]
  
 
&nbsp;
 
&nbsp;
 
<ol start="12">
 
<ol start="12">
<li>Enter the next command: sh ggcV2.sh, and then press Enter.</li>
+
<li>Enter the next command: '''sh ggcV2.sh''', and then press Enter.</li>
 
</ol>
 
</ol>
  
Line 136: Line 138:
 
<br/> '''Figure 7: Edge Device Folder'''
 
<br/> '''Figure 7: Edge Device Folder'''
  
[[File:DSS Edge Device Folder.png|800px]]
+
[[File:DSS Edge Device Folder.png|800px|DSS Edge Device Folder.png]]
  
 
&nbsp;
 
&nbsp;
  
=== <span class="mw-headline" id="Testing_Label_Printing_Function_Using_Label_Engine_Screens"><span class="mw-headline" id="Testing_Label_Printing_Function_Using_Label_Engine_Screens"><span class="mw-headline" id="Testing_Label_Printing_Function_Using_Label_Engine_Screens">Testing Label Printing Function Using Label Engine Screens</span></span></span> ===
+
=== <span class="mw-headline" id="Testing_Label_Printing_Function_Using_Label_Engine_Screens"><span class="mw-headline" id="Testing_Label_Printing_Function_Using_Label_Engine_Screens"><span class="mw-headline" id="Testing_Label_Printing_Function_Using_Label_Engine_Screens"><span class="mw-headline" id="Testing_Label_Printing_Function_Using_Label_Engine_Screens">Testing Label Printing Function Using Label Engine Screens</span></span></span></span> ===
  
#Navigate to: Administration > Label Engine Admin > Printer.  
+
#'''Navigate''' to: '''Administration > Label Engine Admin > Printer'''.  
#Select Add.  
+
#'''Select''' '''Add'''.  
  
 
&nbsp;
 
&nbsp;
  
<br/> '''Figure 8: Add Printer Button'''<br/> [[File:DSS Add Printer Button.png|800px]]
+
<br/> '''Figure 8: Add Printer Button'''<br/> [[File:DSS Add Printer Button.png|800px|DSS Add Printer Button.png]]
  
 
&nbsp;
 
&nbsp;
 
<ol start="3">
 
<ol start="3">
<li>Enter the Printer Name.</li>
+
<li>'''Enter''' the '''Printer Name'''.</li>
<li>Select the Resolution from the drop-down list.</li>
+
<li>'''Select''' the'''Resolution''' from the drop-down list.</li>
<li>Select the Connectivity Type as Edge Device.</li>
+
<li>'''Select''' the Connectivity Type as '''Edge Device'''.</li>
 
</ol>
 
</ol>
  
Line 160: Line 162:
 
<br/> '''Figure 9: Entering The Printer Details'''
 
<br/> '''Figure 9: Entering The Printer Details'''
  
[[File:DSS Entering The Printer Details.png]]
+
[[File:DSS Entering The Printer Details.png|DSS Entering The Printer Details.png]]
  
 
&nbsp;
 
&nbsp;
  
<u>'''Note:'''</u> The TCP IP Address should be the address of the printer or start a TCP Server as a simulator by executing the next command in the Terminal: python3 tcpServer.py.
+
<u>'''Note:'''</u> The TCP IP Address should be the address of the printer or start a TCP Server as a simulator by executing the next command in the Terminal: '''python3 tcpServer.py'''.
  
 
&nbsp;
 
&nbsp;
 
<ol start="6">
 
<ol start="6">
<li>Navigate to: Production > Label Engine Labels > LE Labels.</li>
+
<li>'''Navigate''' to: '''Production > Label Engine Labels > LE Labels'''.</li>
<li>Search for the label called “entry”, which will print whatever "Entry" value is passed.</li>
+
<li>'''Search''' for the label called '''“entry”''', which will print whatever "Entry" value is passed.</li>
<li>Select the checkbox next to the printer name.</li>
+
<li>'''Select''' the '''checkbox''' next to the printer name.</li>
<li>Select Print.</li>
+
<li>'''Select''' '''Print'''.</li>
 
</ol>
 
</ol>
  
Line 178: Line 180:
 
<br/> '''Figure 10: Print Button'''
 
<br/> '''Figure 10: Print Button'''
  
[[File:DSS Print Button.png|800px]]
+
[[File:DSS Print Button.png|800px|DSS Print Button.png]]
  
 
&nbsp;
 
&nbsp;
 
<ol start="10">
 
<ol start="10">
<li>Select the Printer Name previously created.</li>
+
<li>'''Select''' the '''Printer Name''' previously created.</li>
<li>Enter a value in the Entry field.</li>
+
<li>'''Enter''' a '''value''' in the Entry field.</li>
<li>Select Test Print.</li>
+
<li>'''Select''' '''Test Print'''.</li>
 
</ol>
 
</ol>
  
Line 193: Line 195:
 
'''Figure 11: Entering Test Print Data'''
 
'''Figure 11: Entering Test Print Data'''
  
[[File:DSS Entering Test Print Data.png|800px]]
+
[[File:DSS Entering Test Print Data.png|800px|DSS Entering Test Print Data.png]]
  
 
&nbsp;
 
&nbsp;
 
<ol start="13">
 
<ol start="13">
<li>Open the Terminal.</li>
+
<li>'''Open''' the '''Terminal'''.</li>
<li>Navigate to the local device’s path: /greengrass/v2/logs.</li>
+
<li>'''Navigate''' to the local device’s path: '''/greengrass/v2/logs'''.</li>
<li>Enter the next command: tail -f {envide}_CloudPrinting.log. After that, a message will be received to confirm the successful testing.</li>
+
<li>'''Enter''' the next command: '''tail -f {envide}_CloudPrinting.log'''. After that, a message will be received to confirm the successful testing.</li>
 
</ol>
 
</ol>
  
Line 208: Line 210:
 
'''Figure 12: Successful Testing Message'''
 
'''Figure 12: Successful Testing Message'''
  
[[File:DSS Successful Testing Message.png]]<br/> &nbsp;
+
[[File:DSS Successful Testing Message.png|DSS Successful Testing Message.png]]<br/> &nbsp;
 +
 
 +
&nbsp;
  
== <span class="mw-headline" id="MachineInterface">MachineInterface</span> ==
+
== <span class="mw-headline" id="MachineInterface"><span class="mw-headline" id="MachineInterface">MachineInterface</span></span> ==
  
 
This function is used for sending commands to machines from the cloud.<br/> Below there is an example for stopping a machine when the server finds MSD material expired.
 
This function is used for sending commands to machines from the cloud.<br/> Below there is an example for stopping a machine when the server finds MSD material expired.
 
&nbsp;
 
  
 
&nbsp;
 
&nbsp;
Line 220: Line 222:
 
'''Figure 13: Server Stopping A Machine Due To Material Expired Diagram'''
 
'''Figure 13: Server Stopping A Machine Due To Material Expired Diagram'''
  
[[File:DSS Server Stopping A Machine Due To Material Expired Diagram.png|800px]]<br/> &nbsp;
+
[[File:DSS Server Stopping A Machine Due To Material Expired Diagram.png|800px|DSS Server Stopping A Machine Due To Material Expired Diagram.png]]<br/> &nbsp;
  
 
The diagram above is divided into three steps:
 
The diagram above is divided into three steps:
Line 230: Line 232:
 
<br/> Please follow the steps below to create a 42Q Cloud Machine Interface Edge Device in 42Q:
 
<br/> Please follow the steps below to create a 42Q Cloud Machine Interface Edge Device in 42Q:
  
#Navigate to: Shop Floor Control > Configuration > IIoT Configuration > Edge Devices.  
+
#'''Navigate''' to: '''Shop Floor Control > Configuration > IIoT Configuration > Edge Devices'''.  
#Select CREATE EDGE DEVICE to create a new Green Grass Core.  
+
#'''Select''' '''CREATE EDGE DEVICE''' to create a new Green Grass Core.  
#Enter the Edge Device Name of the Green Grass Core. The name can be up to 128 characters. Valid characters are: a-z, A-Z, 0-9, colon (:), underscore (_), and hyphen (-).  
+
#'''Enter''' the '''Edge Device Name''' of the Green Grass Core. The name can be up to 128 characters. Valid characters are: a-z, A-Z, 0-9, colon (:), underscore (_), and hyphen (-).  
#Select the Group Name as MachineInterfaceGroup.  
+
#'''Select''' the '''Group Name''' as '''MachineInterfaceGroup'''.  
  
 
<u>'''Note:'''</u> After selecting the Group Name, the Group Version will automatically be selected.
 
<u>'''Note:'''</u> After selecting the Group Name, the Group Version will automatically be selected.
Line 239: Line 241:
 
&nbsp;
 
&nbsp;
 
<ol start="5">
 
<ol start="5">
<li>Select the checkbox next to the desired Edge Device.</li>
+
<li>'''Select''' the '''checkbox''' next to the desired Edge Device.</li>
<li>Select the Download icon to download the ZIP file.</li>
+
<li>'''Select''' the '''Download''' icon to download the ZIP file.</li>
<li>Right-click on the ZIP file.</li>
+
<li>'''Right-click''' on the '''ZIP file'''.</li>
<li>Select Extract Here to unzip the file.</li>
+
<li>'''Select''' '''Extract Here''' to unzip the file.</li>
<li>Open the Terminal.</li>
+
<li>'''Open''' the '''Terminal'''.</li>
<li>Enter the command: sudo su, and then press Enter.</li>
+
<li>'''Enter''' the command: '''sudo su''', and then press Enter.</li>
<li>Enter the root user’s password, and then press Enter.</li>
+
<li>'''Enter''' the root user’s '''password''', and then press Enter.</li>
<li>Navigate to the extract folder by using the command: cd {folder path}.</li>
+
<li>'''Navigate''' to the extract folder by using the command: '''cd {folder path}'''.</li>
<li>Enter the next command: sh ggcV2.sh, and then press Enter.</li>
+
<li>'''Enter''' the next command: '''sh ggcV2.sh''', and then press Enter.</li>
 
</ol>
 
</ol>
  
<u>'''Note:'''</u> After the script is installed successfully, users can navigate to the computer’s path:&nbsp;<br/> /greengrass/v2 to check the installed folder; logs are contained in the path: /greengrass/v2/logs.
+
<u>'''Note:'''</u> After the script is installed successfully, users can navigate to the computer’s path:&nbsp;'''/greengrass/v2''' to check the installed folder; logs are contained in the path: '''/greengrass/v2/logs'''.
  
 
&nbsp;
 
&nbsp;
 
<ol start="14">
 
<ol start="14">
<li>Open Postman to test its functionality.</li>
+
<li>'''Open''' '''Postman''' to test its functionality.</li>
<li>Select POST as HTTP Method.</li>
+
<li>'''Select''' '''POST''' as HTTP Method.</li>
<li>Enter the URL.</li>
+
<li>'''Enter''' the '''URL'''.</li>
<li>Enter the Topic.</li>
+
<li>'''Enter''' the '''Topic'''.</li>
<li>Enter the Output.</li>
+
<li>'''Enter''' the '''Output'''.</li>
<li>Enter the Error.</li>
+
<li>'''Enter''' the '''Error'''.</li>
 
</ol>
 
</ol>
  
Line 270: Line 272:
 
<br/> '''Figure 14: Sending The Payload Using Postman'''
 
<br/> '''Figure 14: Sending The Payload Using Postman'''
  
[[File:DSS Sending The Payload Using Postman.png|800px]]<br/> &nbsp;
+
[[File:DSS Sending The Payload Using Postman.png|800px|DSS Sending The Payload Using Postman.png]]<br/> &nbsp;
 
<ol start="21">
 
<ol start="21">
 
<li>Navigate to the local device’s path: /greengrass/v2/log to view the logs.</li>
 
<li>Navigate to the local device’s path: /greengrass/v2/log to view the logs.</li>
Line 281: Line 283:
 
'''Figure 15: Successful Payload Sending Logs'''
 
'''Figure 15: Successful Payload Sending Logs'''
  
[[File:DSS Successful Payload Sending Logs.png|800px]]<br/> &nbsp;
+
[[File:DSS Successful Payload Sending Logs.png|800px|DSS Successful Payload Sending Logs.png]]<br/> &nbsp;
  
 
<u>'''Note:'''</u> If the message from the previous image is printed in your local log, the function has succeeded.<br/> Adding the corresponding configuration for PTS allows PTS to send messages to Edge Device.
 
<u>'''Note:'''</u> If the message from the previous image is printed in your local log, the function has succeeded.<br/> Adding the corresponding configuration for PTS allows PTS to send messages to Edge Device.
Line 287: Line 289:
 
&nbsp;
 
&nbsp;
  
== <span class="mw-headline" id="DataIngestion">DataIngestion</span> ==
+
== <span class="mw-headline" id="DataIngestion"><span class="mw-headline" id="DataIngestion">DataIngestion</span></span> ==
  
 
Please follow the steps below to create a 42Q Cloud Data Ingestion Edge Device in 42Q:
 
Please follow the steps below to create a 42Q Cloud Data Ingestion Edge Device in 42Q:
Line 321: Line 323:
 
<br/> '''Figure 16: Edit Button'''
 
<br/> '''Figure 16: Edit Button'''
  
[[File:DSS Edit Button.png|800px]]
+
[[File:DSS Edit Button.png|800px|DSS Edit Button.png]]
  
 
&nbsp;
 
&nbsp;
Line 333: Line 335:
 
<br/> '''Figure 17: CLIENT DEVICES TAB'''
 
<br/> '''Figure 17: CLIENT DEVICES TAB'''
  
[[File:DSS CLIENT DEVICES TAB.png|800px]]
+
[[File:DSS CLIENT DEVICES TAB.png|800px|DSS CLIENT DEVICES TAB.png]]
  
 
&nbsp;
 
&nbsp;
Line 351: Line 353:
 
'''Figure 18: Creating a Client Device'''
 
'''Figure 18: Creating a Client Device'''
  
[[File:DSS Creating a Client Device.png]]
+
[[File:DSS Creating a Client Device.png|DSS Creating a Client Device.png]]
  
 
&nbsp;
 
&nbsp;
Line 364: Line 366:
 
<br/> '''Figure 19: Client Device Folder'''
 
<br/> '''Figure 19: Client Device Folder'''
  
[[File:DSS Client Device Folder.png|800px]]
+
[[File:DSS Client Device Folder.png|800px|DSS Client Device Folder.png]]
  
 
&nbsp;
 
&nbsp;
Line 377: Line 379:
 
<br/> '''Figure 20: Data To Be Modified'''
 
<br/> '''Figure 20: Data To Be Modified'''
  
[[File:DSS Data To Be Modified.png|800px]]
+
[[File:DSS Data To Be Modified.png|800px|DSS Data To Be Modified.png]]
 +
 
 +
&nbsp;
 
<ol start="24">
 
<ol start="24">
 
<li>Open the Terminal.</li>
 
<li>Open the Terminal.</li>
Line 387: Line 391:
 
<br/> '''Figure 21: Result Of Executing The MqttTest.py File'''
 
<br/> '''Figure 21: Result Of Executing The MqttTest.py File'''
  
[[File:DSS Result Of Executing The MqttTest.py File.png|800px]]
+
[[File:DSS Result Of Executing The MqttTest.py File.png|800px|DSS Result Of Executing The MqttTest.py File.png]]
  
 
&nbsp;
 
&nbsp;
Line 400: Line 404:
 
'''Figure 22: Successful MqttTest.py Running Logs'''
 
'''Figure 22: Successful MqttTest.py Running Logs'''
  
[[File:DSS Successful MqttTest.py Running Logs.png|800px]]
+
[[File:DSS Successful MqttTest.py Running Logs.png|800px|DSS Successful MqttTest.py Running Logs.png]]
  
 
<br/> &nbsp;
 
<br/> &nbsp;
Line 407: Line 411:
  
 
&nbsp;
 
&nbsp;
 
+
<ol start="27">
#Navigate to: Shop Floor Control > Configuration > IIoT Configuration > Things.  
+
<li>Navigate to: Shop Floor Control > Configuration > IIoT Configuration > Things.</li>
 +
</ol>
  
 
&nbsp;
 
&nbsp;
Line 414: Line 419:
 
<br/> '''Figure 23: Things Portlet'''
 
<br/> '''Figure 23: Things Portlet'''
  
[[File:DSS Things Portlet.png|800px]]
+
[[File:DSS Things Portlet.png|800px|DSS Things Portlet.png]]
  
 
&nbsp;
 
&nbsp;
Line 425: Line 430:
 
&nbsp;
 
&nbsp;
  
'''Figure 24: Thing ID'''<br/> [[File:DSS Thing ID.png|800px]]
+
'''Figure 24: Thing ID'''<br/> [[File:DSS Thing ID.png|800px|DSS Thing ID.png]]
  
 
&nbsp;
 
&nbsp;
Line 437: Line 442:
 
&nbsp;
 
&nbsp;
  
'''Figure 25: Add (+) Icon'''<br/> [[File:DSS Add (+) Icon.png|800px]]
+
'''Figure 25: Add (+) Icon'''<br/> [[File:DSS Add (+) Icon.png|800px|DSS Add (+) Icon.png]]
  
 
&nbsp;
 
&nbsp;
Line 451: Line 456:
 
<br/> '''Figure 26: Creating a Widget'''
 
<br/> '''Figure 26: Creating a Widget'''
  
[[File:DSS Creating a Widget.png|800px]]
+
[[File:DSS Creating a Widget.png|800px|DSS Creating a Widget.png]]
  
 
&nbsp;
 
&nbsp;
Line 462: Line 467:
 
<br/> '''Figure 27: Show/Hide Icon'''
 
<br/> '''Figure 27: Show/Hide Icon'''
  
[[File:DSS Show-Hide Icon.png|800px]]
+
[[File:DSS Show-Hide Icon.png|800px|DSS Show-Hide Icon.png]]
  
 
<br/> <u>'''Note:'''</u> Users can check the payload sent through either of the following:
 
<br/> <u>'''Note:'''</u> Users can check the payload sent through either of the following:

Revision as of 22:10, 13 March 2023

42Q Home > IIoT > Device Self Service

 


 

 

IIoT
Device Self Service
Version MES 15.76
Revision B1
 

 

 

 

Introduction

The concept of GGC stands for “Green Grass Computer”, the word: “Computer” also refers to any kind of device. This document will teach users how to configure, install, and deploy a GGC, as well as create and set up an Edge Device for the purpose of establishing a connection between the computer (device) and the 42Q portal to send data (payloads).

 

 

Prerequisites

  • Only Linux is supported for the computer or device to install the Green Grass Core. The related shell scripts and test code only work on Linux systems (Windows is not currently supported).
  • Python 3.8 or higher must be installed and configured to run the test code.
  • Operating System and  Software requirements:
    • Linux kernel version 4.4 or later (Ubuntu 20.04 and CentOS 8.5).
    • Java Runtime Environment (JRE) version 8 or greater (included in the installation script).
    • Python version 3.8 for functions that use the Python 3.8 runtime (included in the installation script).
  • Network requirements:
    A Region is an AWS region that hosts 42Q portal APIs. The Green Grass Core hardware needs to be able to access the following endpoints through specific ports:

 

 

Functional Description

There are three different functional components: CloudPrinting, MachineInterface, and DataIngestion.
To access the Edge Devices portlet, navigate to: Shop Floor Control > Configuration > IIoT Configuration > Edge Devices.


Figure 1: Accessing Edge Devices
DSS Accessing Edge Devices.png

 

 

Figure 2: Edge Devices Functions

DSS Edge Devices Functions.png

 

  1. Users can query the list of all devices by Edge Device Name or Group Name.
  2. Users can create a new edge device.
  3. Users can view the details of the edge device.
  4. Users can download the software of the edge device.
  5. Users can upgrade this edge device with more features.
  6. Users can get all functional components through this button when no functional components are deployed on their local core device.
  7. Users can delete the edge device.

 

 

Install 42Q Edge Software

CloudPrinting

Please follow the steps below to create a 42Q Cloud Printing Edge Device in 42Q:

  1. Navigate to: Shop Floor Control > Configuration > IIoT Configuration > Edge Devices.
  2. Select CREATE EDGE DEVICE to create a new Green Grass Core.

 

Figure 3: CREATE EDGE DEVICE Button

DSS CREATE EDGE DEVICE Button.png

 

  1. Enter the Edge Device Name of the Green Grass Core. The name can be up to 128 characters. Valid characters are: a-z, A-Z, 0-9, colon (:), underscore (_), and hyphen (-).
  2. Select the Group Name as CloudPrintingGroup.

Note: After selecting the Group Name, the Group Version will automatically be selected.

 


Figure 4: Create Edge Device Form

DSS Create Edge Device Form.png

 

  1. Select the checkbox next to the desired Edge Device.
  2. Select the Download icon to download the Edge Device ZIP file.

 

 

Figure 5: Downloading The Files

DSS Downloading The Files.png

 

  1. Right-click on the ZIP file.
  2. Select Extract Here to unzip the file.
  3. Open the Terminal.
  4. Enter the command: sudo su, and then press Enter.
  5. Enter the root user’s password, and then press Enter.

Note: If the word: root@ appears before the computer’s username as in the image below, it means that you are logged in as a root user.

 


Figure 6: User Logged In as a Root User

DSS User Logged In as a Root User.png

 

  1. Enter the next command: sh ggcV2.sh, and then press Enter.

Note: After the script is installed successfully, users can navigate to the local device’s path: /greengrass/v2 to check the installed folder; logs are contained in the path: /greengrass/v2/logs.

 


Figure 7: Edge Device Folder

DSS Edge Device Folder.png

 

Testing Label Printing Function Using Label Engine Screens

  1. Navigate to: Administration > Label Engine Admin > Printer.
  2. Select Add.

 


Figure 8: Add Printer Button
DSS Add Printer Button.png

 

  1. Enter the Printer Name.
  2. Select theResolution from the drop-down list.
  3. Select the Connectivity Type as Edge Device.

 


Figure 9: Entering The Printer Details

DSS Entering The Printer Details.png

 

Note: The TCP IP Address should be the address of the printer or start a TCP Server as a simulator by executing the next command in the Terminal: python3 tcpServer.py.

 

  1. Navigate to: Production > Label Engine Labels > LE Labels.
  2. Search for the label called “entry”, which will print whatever "Entry" value is passed.
  3. Select the checkbox next to the printer name.
  4. Select Print.

 


Figure 10: Print Button

DSS Print Button.png

 

  1. Select the Printer Name previously created.
  2. Enter a value in the Entry field.
  3. Select Test Print.

 

 

Figure 11: Entering Test Print Data

DSS Entering Test Print Data.png

 

  1. Open the Terminal.
  2. Navigate to the local device’s path: /greengrass/v2/logs.
  3. Enter the next command: tail -f {envide}_CloudPrinting.log. After that, a message will be received to confirm the successful testing.

 

 

Figure 12: Successful Testing Message

DSS Successful Testing Message.png
 

 

MachineInterface

This function is used for sending commands to machines from the cloud.
Below there is an example for stopping a machine when the server finds MSD material expired.

 

Figure 13: Server Stopping A Machine Due To Material Expired Diagram

DSS Server Stopping A Machine Due To Material Expired Diagram.png
 

The diagram above is divided into three steps:

  1. Install an Edge Device on a server in the plant.
  2. The plant creates a new local application which can communicate with the Edge Device by TCP and also can send commands to machines.
  3. The Cloud application will send commands to the Edge Device, then the Edge Device will forward the message to the local application through TCP/IP.


Please follow the steps below to create a 42Q Cloud Machine Interface Edge Device in 42Q:

  1. Navigate to: Shop Floor Control > Configuration > IIoT Configuration > Edge Devices.
  2. Select CREATE EDGE DEVICE to create a new Green Grass Core.
  3. Enter the Edge Device Name of the Green Grass Core. The name can be up to 128 characters. Valid characters are: a-z, A-Z, 0-9, colon (:), underscore (_), and hyphen (-).
  4. Select the Group Name as MachineInterfaceGroup.

Note: After selecting the Group Name, the Group Version will automatically be selected.

 

  1. Select the checkbox next to the desired Edge Device.
  2. Select the Download icon to download the ZIP file.
  3. Right-click on the ZIP file.
  4. Select Extract Here to unzip the file.
  5. Open the Terminal.
  6. Enter the command: sudo su, and then press Enter.
  7. Enter the root user’s password, and then press Enter.
  8. Navigate to the extract folder by using the command: cd {folder path}.
  9. Enter the next command: sh ggcV2.sh, and then press Enter.

Note: After the script is installed successfully, users can navigate to the computer’s path: /greengrass/v2 to check the installed folder; logs are contained in the path: /greengrass/v2/logs.

 

  1. Open Postman to test its functionality.
  2. Select POST as HTTP Method.
  3. Enter the URL.
  4. Enter the Topic.
  5. Enter the Output.
  6. Enter the Error.

 

Data nomenclature:
URL: https://portal-sqa.42-q.com/mes-api/[SiteName]/greengrass/v2/publish
Topic: [Envide]/machine-interface/[Envide]_[Edge device name]
Output: [Envide]/machine-interface/results
Error: [Envide]/machine-interface/errors

 


Figure 14: Sending The Payload Using Postman

DSS Sending The Payload Using Postman.png
 

  1. Navigate to the local device’s path: /greengrass/v2/log to view the logs.

 

 

Figure 15: Successful Payload Sending Logs

DSS Successful Payload Sending Logs.png
 

Note: If the message from the previous image is printed in your local log, the function has succeeded.
Adding the corresponding configuration for PTS allows PTS to send messages to Edge Device.

 

DataIngestion

Please follow the steps below to create a 42Q Cloud Data Ingestion Edge Device in 42Q:

  1. Navigate to: Shop Floor Control > Configuration > IIoT Configuration > Edge Devices.
  2. Select CREATE EDGE DEVICE to create a new Green Grass Core.
  3. Enter the Edge Device Name of the Green Grass Core. The name can be up to 128 characters. Valid characters are: a-z, A-Z, 0-9, colon (:), underscore (_), and hyphen (-).
  4. Select the Group Name as DataIngestionGroup.

Note: After selecting the Group Name, the Group Version will automatically be selected.

 

  1. Select the checkbox next to the desired Edge Device.
  2. Select the Download icon to download the ZIP file.
  3. Right-click on the ZIP file.
  4. Select Extract Here to unzip the file.
  5. Open the Terminal.
  6. Enter the command: sudo su, and then press Enter.
  7. Enter the root user’s password, and then press Enter.
  8. Enter the next command: sh ggcV2.sh, and then press Enter.

Note: After the script is installed successfully, users can navigate to the computer’s path: /greengrass/v2 to check the installed folder; logs are contained in the path: /greengrass/v2/logs.

 

  1. When the status of this Edge Device is "Healthy", select the Edit button to enter the Edge Device information.

 


Figure 16: Edit Button

DSS Edit Button.png

 

  1. Select the CLIENT DEVICES tab.
  2. Select CREATE CLIENT DEVICES.

 


Figure 17: CLIENT DEVICES TAB

DSS CLIENT DEVICES TAB.png

 

  1. Enter the name of the Client Device to be created.

Note: The name can be up to 128 characters. Valid characters: a-z, A-Z, 0-9, colon (:), underscore (_), and hyphen (-).

  1. Select ASSOCIATE.

 

 

Figure 18: Creating a Client Device

DSS Creating a Client Device.png

 

  1. Select the Download icon to download the Client Device ZIP file.
  2. Right-click on the ZIP file.
  3. Select Extract Here to unzip the file.

 


Figure 19: Client Device Folder

DSS Client Device Folder.png

 

  1. Open the MqttTest.py file.
  2. Find the line that contains: ‘# Change This’.
  3. Modify the data information to be sent; users may see an example below (user’s will be different).

 


Figure 20: Data To Be Modified

DSS Data To Be Modified.png

 

  1. Open the Terminal.
  2. Enter the next command: python MqttTest.py, and then press Enter. The result should be similar to the image below:

 


Figure 21: Result Of Executing The MqttTest.py File

DSS Result Of Executing The MqttTest.py File.png

 

  1. Navigate to the local device’s path: /greengrass/v2/log to view the logs.

 

 

Figure 22: Successful MqttTest.py Running Logs

DSS Successful MqttTest.py Running Logs.png


 

Note: If the message from the previous image is printed in your local log, the function has succeeded.

 

  1. Navigate to: Shop Floor Control > Configuration > IIoT Configuration > Things.

 


Figure 23: Things Portlet

DSS Things Portlet.png

 

  1. If the “Thing ID” is the same as the “id” configured in MqttTest.py file, it means that AWS Cloud has already stored the data uploaded.

 

 

Figure 24: Thing ID
DSS Thing ID.png

 

  1. Navigate to: Reporting > IIoT Dashboard.
  2. Select the + icon to create a new widget.

 

 

Figure 25: Add (+) Icon
DSS Add (+) Icon.png

 

  1. Enter the Widget Name.
  2. Select the THINGS tab.
  3. Select the "id" value previously configured in the MqttTest.py file.
  4. Select the SAVE button located at the end of the Add Widget Form.

 


Figure 26: Creating a Widget

DSS Creating a Widget.png

 

  1. Select the show/hide icon to view the values of the widget created.

 


Figure 27: Show/Hide Icon

DSS Show-Hide Icon.png


Note: Users can check the payload sent through either of the following:

  • IIoT widget.