TODO's
- SSL implementation under development only use this contribution for testing!
This repo is a !!!ALPHA!!! meant to host our implementation of Sparkplug MQTT for PLCnext Controllers.
Requirements
- Internet connection to the PLC
- This build will not run without an SD card additional memory, due to storage requirements -Minimum 2GB Memory stick for AXC F series (Part# 1043501 or 1061701)
- Understating of PLC Web page management
- Basic knowledge of PLCnext Engineer
- Basic Knowledge of Ignition
- root User access
Supported hardware
- AXC F 1152, AXC F 2152, AXC F 3152 (Firmware 2021.0 or later) and BPC 1500 series.
- Connect the AXC F controller to Internet-Provider
- Start the terminal on Linux OS or Shell capable software (Putty or Moba) and establish the SSH-Connection to PLC via command line "ssh [email protected]" (your password should be set in the User authentication under WBM).
- Change to root via "su" The root user need to be setup root user guide
- Make sure your Internet connection is intact, via command-line ping http://google.com
- Update the clock running the command below.
date -s "$(curl -s --head http://google.com | grep ^Date: | sed 's/Date: //g')"
After preparing the controller still as a root user execute the commands below.
git clone https://github.com/PLCnext/Docker_GettingStarted.git
cd Docker_GettingStarted
chmod -c 777 setup.sh
./setup.sh
The Setup script will run and prompt you as below,you must select Docker and enter blank for the latest version.
After installing Docker you can pull and run the container with the Sparkplug connector implementation by running the command below.
docker run -it --restart unless-stopped --network host --privileged --name=sparkplug-connector plcnextusa/sparkplug-connector:buildx-latest
After your container is pulled and running you can find the Sparkplug Connector Web configurator running under plc-ip-address:3010
Username: admin Password: private
-
Create your project with PLCnext Engineer 2021.0.1 or later !
-
Deploy and Run your PLCnext Engineer project
Disclaimer: This section is dedicated to installing and setting up a Demo instance of Ignition in your Local machine, all materials used under this section are the intellectual property of Inductive Automation, please refer to their Website for more information on where and how to acquire their software licenses. Any technical support for Ignition should be requested to Inductive Automation itself, Phoenix Contact have no responsibility and or obligation on supporting it.
Download and install the suitable version of Ignition at https://inductiveautomation.com/downloads after the installation your Ignition Gateway should be running under http://localhost:8088/
After installing Ignition the proper modules for Sparkplug-MQTT need to be installed and configured as well.
-
Watch the guides for MQTT from Inductive Automation, Video Series Here! The installation guide starts on Video 5.
-
Download the 2 needed modules for MQTT in ignition MQTT-Engine and MQTT-Distributor at this LINK (Version 8.0.17).
-
Install the MQTT modules the way the videos show, Video Series Here! The installation guide starts on Video 5.
-
Configure the MQTT Engine and MQTT Distribution Drivers as below.
-
Create a new user with the username "plcnext" and password "private" (it can be changed after the configuration)
-
Deactivate the SSL authentication (This functionality will be implemented for security in the next release)
The Ignition designer launcher can be foundd at the Ignition Gateway main page top right, Install it and go through the configuration steps. Please refer to their main page(LINK) if any help is needed on this step.
If your PLCnext project has been correctly configured and deployed, you should be able to see all your available TAG's in the connector webpage plc-ip-address:3010.
Now go to Configuration and set the minimal fields.
- Ignition Server URL (if running in your local machine that is your PC IP address or whichever remote serve Ignition gateway is running on. The port is always 1883 unless it has been changed in the Ignition Gateway)
- Ignition Server Username ( "plcnext" if you follow the previous steps)
- Ignition Server Password ("private" if you followed the previous steps)
Make sure your Ignition Gateway is running, and launch the Ignition Designer
Connect to the available server and launch it, login with the same credential from ignition Gateway and Create a new project. As you Designer starts you will notice the change from yellow to green on the status indicator in the gateway webpage top right (bellow). If the status don't change please try rebooting your PLC and check again
Finally, back to your Ignition Designer Navigate to your TAGs and start testing and creating your DEMO project.
Good luck with your Project.
For question, suggestion and bug reports please use the Issues page