Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Stable timers

Stable timers 2 months 3 weeks ago #11624

  • jds
  • jds's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 93
  • Karma: 0
Hello,

I've got the following issue: In a project I've got a lot of logic simulating a process to be build in the near future. Since the logic wasn't running stable and the I/O process caused the main PLC thread scantime to run out, I've divided the 3 PLC's into 3 separated PLC threads running at a different scantime (from 0,1 to 0,2 sec) so that the PLC with the I/O wouldn't interrupt the other PLC's and runs more stable. Worked out pretty good with some lag's but workable.
So far so good, but now I've created a complete new project, opened the dbs file from the old project and copied the objects into the new project as starting point because the new project uses the same structure.
The logic is running correct but the timers are running way to fast (ex. a 15 sec timer expires after 5 seconds). Tried to slightly adjust the PLC's and builded the whole project with force, but the ussue remains.

Is there anything I can do to correct this or make the timers more stable?
The system is running on a VM with Ubuntu 18 and proview 5.7.1, processing power enough.
The administrator has disabled public write access.

Stable timers 2 months 3 weeks ago #11625

  • jds
  • jds's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 93
  • Karma: 0
Hello,

I've found out a strange thing in the PLC itself: the meanscantime is about half the real scantime, also after a reset or hours running. Probably this is used to calculated the timers? This is the case in all the 3 PLC's.

Screenshotfrom2022-09-0312-53-49.png
The administrator has disabled public write access.

Stable timers 2 months 3 weeks ago #11628

  • jds
  • jds's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 93
  • Karma: 0
Hello,

I think I found a cause, but I can't explain why its happening.
Since I'm in developping mode, my bus is configured at 999. In my first project the nodename in the busconfig was set to my development machine, the production nodename to something none existing (since I didn't ues it anyway).
In the new project, the nodename of both simualting and production machines was set to the name of my development machine so when building both machines are build. When I change this settings to the settings of the first project, everything works as expected, adjusting the settings in the first project to the same nodnames gives me the same problems.

How is this possible when only the simulating bus is configured, are the PLC's running double?
The administrator has disabled public write access.

Stable timers 2 months 2 weeks ago #11666

  • jds
  • jds's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 93
  • Karma: 0
Claes,

is there any explanation to this behaivior discribed above? Its very strange since the PLC's aren't distributed so only the simulation bus is active. Building both together with the same node name gives timers that run double as fast because of the scantime (measured mean) is half of the asked scantime.
Last Edit: 2 months 2 weeks ago by jds.
The administrator has disabled public write access.

Stable timers 2 months 2 weeks ago #11672

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3048
  • Thank you received: 454
  • Karma: 125
Hi jds,

Running two versions of the plc executable would decrease the timer counters with double speed and half the timer times, and I have a vague memory that I've heard of this once before. It's possible that there is som way to start a second plc process on the same node and on the same bus, but I can't image how...

/Claes
The administrator has disabled public write access.

Stable timers 2 months 2 weeks ago #11674

  • jds
  • jds's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 93
  • Karma: 0
Claes,
I always thought that starting the runtime with the runtime monitor would only start the runtime configured with the busnumber (in this case bus 999). There aren't any other nodes or busses configured nor is the load distributed to any node. The only thing that I did is using the same node name for the simulation and production node (bus 999 and bus 1). When I compile the load, I see every PLC compiles twice. So I think that's where there goes something wrong?
Changing the nodename for the production machine solves everything, but this means that, for ex., you can't use a production machine for develoment?
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.566 seconds