This site uses cookies for functional purposes. To continue please read and agree to our Data Privacy.

By closing this message, you consent to our use of cookies on this device.

PLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

 

 How to create a Blog Entry

Find user stories of interesting ideas and solutions in this blog. If you have any problems with editing or publishing please contact us at This email address is being protected from spambots. You need JavaScript enabled to view it..

Note: The maker blog show applications and user stories of community members and are not tested or reviewed by Phoenix Contact.


 

To be able to follow this blog, you must have alreday installe the OPC-UA inside Node-Red.

Then, it will be possible to send a mail, with a command from the PLC (xSend) including a variable message (strText).

Here are the 2 variables of the AXC F 2152 which will be used and accessible by OPC UA :

1

OPC option must be checked.

The AXC F 2152 has 512 Mb RAM. Of this the OS is using a part of it but there is still a lot which is not used. This free space could be used for a RAM drive. Unlike the SD-Card the RAM drive has no limitations in reading and writing. Therefore it could be very useful for tasks which have a lot of reading and writing, e.g. a Datalogger. The downside of the RAM drive is that everything on it is gone after a restart/reboot of the controller. So it would be a good idea to have a backup solution for the data. 

Hello PLCnext Community,

you probably already have seen awesome things within the last publication, like Node-RED, the package manager and PROFICLOUD.

All right, but all these cool IoT applications have a common need, that is right, they need to be connected to the Internet in order to function. Well, our colleague Josh Krug put together this great documentation on how to configure the AXC F 2152 for an Internet connection.

In the previous months I prepared the PLCnext Technology exhibition wall for the showroom in our Polish Phoenix Contact subsidiary and I would like to show it to the community. 
I made the applications with as many technologies as I was able to, that's why I used MQTT, OPC UA, Node-RED, Google Home etc.

These four example tasks can be demonstrated:

  1. LEDs lighting up after activating the PLC's input 0
  2. Voice message about changing the state of the switches connected to the PLC's inputs
  3. Command "Hey Google, blink" causes the LEDs on the panel to change for a moment to the opposite state and return to their original state
  4. Command "Hey Google, check the state" causes that you can hear a summary of the current state of the PLC's inputs

Join the Community

Watch this short introduction video* and create your first Makers blog entry!

 

Content of this video:

  • Create your own Makers blog entry

You have questions...? No problem:

  • Ask your question in the Forum
  • or contact us by mail: This email address is being protected from spambots. You need JavaScript enabled to view it.

 

 

*we recommend Chrome for best experience

=== UPDATE ====

The recommended way to install node.js and npm on a PLCnext Control is now through the PLCnext Store.

The original article remains below.


If you want to run the popular Node.js framework on your PLCnext Control, you can download the binary for ARMv7 from the node website and install it manually on the PLC.

A previous blog entry described an easier way to install Node on an AXC F 2152 PLC using the ipkg package manager. However this installs a relatively old version of node, which might not be suitable for all applications.

Another way to install the latest version of node - or even multiple versions - is to use Node Version Manager. NVM can be installed and used by the PLC's admin user, without root privileges. Here's how:

=== UPDATE ====

The recommended way to install node.js and npm on a PLCnext Control is now through the PLCnext Store.

It appears that the procedure described below may not work after installing node from the PLCnext Store. In this case, an alternative to pm2 may be needed to automatically start node-red. You can raise general issues related to pm2 on their Github page.

The original article remains below.


Procedure

Log in to the PLC as admin and issue the following commands:

npm install -g pm2
pm2 start node-red
pm2 save
pm2 startup

Restart the PLC and check that Node-RED has started automatically.

Thank you to PLCnext Community member David Petter for these instructions.

More information on starting Node-RED using pm2 can be found here: https://nodered.org/docs/getting-started/running

More information on the IIoT OPC UA node package:

Command to install the IIoT OPC UA node package:

npm install -g node-red-contrib-iiot-opcua

Thank you to PLCnext Community members David Petter and Stefan Brinkmann, and to Klaus Landsdorf from Bianco Royal, for their valuable contributions.

Note: We show the engineering part in this video using a beta version of the upcoming PLCnext Engineer software by Phoenix Contact that will be available soon and for free. Until then, the procedure should work using the current PC Worx Engineer version as well. If you encounter any problems, please let us know.

The flow used in this example is represented by the following JSON (press "Read more" to see it). It can be imported straight into the editor by pasting the JSON into the Import dialog (Ctrl-I or via the dropdown menu).

Page 2 of 4

Most clicked articles in the makers blog