Store PLCnext CommunityPLCnext on LinkedInPLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

  1. lbonillayanez
  2. PLCnext Engineer
  3. Friday, 28 May 2021
Dear colleagues, I am working on a PLCnext AXC F 2152 HW 02 FW 2021.0.5 and PLCnext Engineer 2021.0.3. At the request of one of our customers I am performing tests which consist in testing the behavior of the retentive variables when the PLCnext is affected by a power failure. I have tried to define certain variables as retentive for example the result of a CTU counter block (CV variable). Once I have a certain value as a result of the count I turn off the PLC and turn it on again. The result of this is that the variable is set to 0 and the count value is lost. The procedure I perform is to mark the variable defined as retentive in the Retain box of the variable list. What am I doing wrong? What is the procedure for the variables defined as retentive to be stored in the retentive memory and not lose the value which can be critical for a process. According to what I read by clicking on "save the retain data" it allows me to create a file to which it backs up the retentive variables and should be used in case of hardware change for example.

Your help please.
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo
Hi Luis,
I guess you are marking the variable attached to the CV output of the CTU instance, as a retain variable.
The problem there is that the CTU block contains internal variables, including the current "count" value. Each time the CTU instance is processed, this count value is copied to the variable connected to the CV output (if any). The internal variables of the FB instance are not retentive.
Since FB instances cannot be marked as "retentive" in PLCnext Engineer, I don't think there is a way to solve this problem, but I will check.
Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo
It has been suggested that, if you need a retentive CTU block, you could write this yourself using a retentive variable as the "current count" internal variable.
(ref: #213440)
Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.