hxeaven
I'm trying to add timers to my project, but the variable is not being added to the variable list like other standard variables. Any way to force it to add?
Quote 0 0
thiagoralves
I've seen it happening before a few times. What worked for me is just to hit Display->Refresh or CTRL+R to force the list to be updated.
Quote 0 0
skv
hxeaven wrote:
I'm trying to add timers to my project, but the variable is not being added to the variable list like other standard variables. Any way to force it to add?


hxeaven, what version of PLCopen Editor have you used?
I couldn't reproduce the problem.
Quote 0 0
thiagoralves
Hi skv,

I downloaded the most recent version of PLCOpenEditor from your repository (https://bitbucket.org/skvorl/beremiz/downloads/) and reproduced the problem. I'm running it on windows with the "packaged" python that comes with Beremiz RC5. To reproduce the problem, create a blank project (or open the blank project attached here) and:

1) Add a button to the variables list at %QX0.0
2) Add a left power rail
3) Add a contact and associate with the button
4) Add a TON (and then you will see that the TON will not appear in the variables list
5) Add an output to the variables list at %QX0.1
6) Add a coil and associate it with the output
7) Add a right power rail closing the circuit
8) Add a constant time (T#2000ms) for the PT input of TON0

This is what you will get after following the steps:
Capture.PNG    

The biggest problem is that if you compile the program (File -> generate), the final ST file doesn't have the TON on the list either and will fail after going through MatIEC Compiler:

PROGRAM My_Program
  VAR
    button AT %QX0.0 : BOOL;
    output AT %QX0.1 : BOOL;
  END_VAR
  TON0(IN := button, PT := T#2000ms);
  output := TON0.Q;
END_PROGRAM

CONFIGURATION Config0
  RESOURCE Res0 ON PLC
    TASK TaskMain(INTERVAL := T#1ms,PRIORITY := 0);
    PROGRAM Inst0 WITH TaskMain : My_Program;
  END_RESOURCE
END_CONFIGURATION


The only way to make TON0 appear on the list is to hit Display->Refresh right after adding it to the diagram. If you don't do it right after and then compile the program, it won't appear anymore even after hitting Refresh.
Quote 0 0
skv
Could you please create a ticket for this problem on bitbucket.
Quote 0 0
thiagoralves
Just did it. Thanks.
Quote 0 0
skv
fix released.
Quote 0 0