🖥️

PLCnext AXC F 3152

Status
In progress
Assign
Rajvir Singh
Description
Coming up a new video on PLCnext controller AXC F 3152. This is an upgrade to AXC F 2152 with more memory and speed comparatively. Stay tuned :)
Link

PLCnext Engineering Software

Version: 2021.6

Download link for the software can be found at this page

PLCnext Network Configuration

DeviceFirmawareLAN PortIP AddressSubnet MaskGatewayUsageConnection
Computer
Ethernet Card
192.168.0.71
255.255.255.0
192.168.0.1
ProgrammingInternet
PLC AXC F 2152
X1
192.168.0.210
255.255.255.0
192.168.0.1
ProgrammingPROFINETInternet
Connected to PC for Programming
X2
n/a
n/a
n/a
Connected to X2 Port of AXC F 3152 for PROFINET
PLC AXC F 3152
X1
192.168.0.212
255.255.255.0
192.168.0.1
ProgrammingInternet
Connected to PC for Programming
X2
192.168.0.2
255.255.255.0
192.168.0.1
ProgrammingPROFINETInternet
Connected to X2 Port of AXC F 2152 for PROFINET
X3
192.168.0.213
255.255.255.0
192.168.0.1
ProgrammingInternet
Not connected

Communication between AXC F 2152 and AXC F 3152 via:

PROFINET

AXC F 2152 sends information to AXC F 3152 via PROFINET

OPC UA

Both PLC's act ac OPC UA Server and data is read/write via OPC UA client installed in the Node-RED

MQTT

Both PLC's can as MQTT Broker and data is read/write via MQTT client installed in the Node-RED

How to start Node-RED in PLCnext

AXC F 2152

Docker basic commands

Start node-red for the first time

balena-engine run -it -p 1880:1880 -v /home/user/node_red_data:/data --name mynodered nodered/node-red

If container is already started or listed- remove the container first

balena-engine rm "container_name"

Example: balena-engine rm "fac9e0f06f1babbf8b0dceedb83495c88b6bd6eb7999027f1c93cbb986417451"

List container

balena-engine ps

Start Node-RED

balena-engine start nodered

Stop Node-RED

balena-engine stop nodered

AXC F 3152

To start docker with a bind mount volume (-v option), for example:

docker run -it -p 1880:1880 -v /home/user/node_red_data:/data --name mynodered nodered/node-red

where /home/user/node_red_data is a directory on your host machine where you want to store your flows.

If you do not do this then you can experiment and redploy flows, but if you restart or upgrade the container the flows will be disconnected and lost.

They will still exist in a hidden data volume, which can be recovered using standard docker techniques, but that is much more complex than just starting with a named volume as described above.

image

PLCnext Project Example

Node-RED Sample Code for OPC UA Read/Write

Docker basic commands

Start node-red for the first time

docker run -it -p 1880:1880 -v /home/user/node_red_data:/data --name mynodered nodered/node-red

If container is already started or listed- remove the container first

balena-engine rm "container_name"

Example: docker rm "fac9e0f06f1babbf8b0dceedb83495c88b6bd6eb7999027f1c93cbb986417451"

List container

docker container ls

Start Node-RED

docker container start mynodered

Stop Node-RED

docker container stop mynodered