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

TOPIC: PlcThread not running

PlcThread not running 3 years 11 months ago #10627

  • silvaphoenix
  • silvaphoenix's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 97
  • Thank you received: 5
  • Karma: 4
Hi,
I have a problem of the PlcThread not running.
Everything has compiled without errors and the runtime monitor indicates that Proview is running. However the PlcThread LoopCnt remains at 0 so nothing works.
The first PlcPgm FirstScan action does initiate but but loop obviously stops before completion. There are no error messages except 'failed to set priority, plc thread 100 ms, prio 22' but fixing this with chown and chmod makes no difference.
Both Alarm and Halt CycleSup DetectCount are counting at 1 s. ScanTime is set at 100 ms
There's an error somewhere but I can't find it.
Any ideas?

Stephen
The administrator has disabled public write access.

PlcThread not running 3 years 11 months ago #10628

  • benoit
  • benoit's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 180
  • Thank you received: 1
  • Karma: 0
Hi Stephen,
I had this problem in the past.
Follow the Claes advice...

There is an example of how to make it possible to set priority on the plc. You probably have to to this every time you build the node.

> su
> ls -l plc_aristotle_0999_plc
-rwxrwxr-x 1 pwrp pwrp 6156906 Jul 5 13:25 plc_aristotle_0999_plc
> chown root plc_aristotle_0999_plc
> chmod u+s plc_aristotle_0999_plc
> ls -l plc_aristotle_0999_plc
-rwsrwxr-x 1 root pwrp 6156906 Jul 5 13:25 plc_aristotle_0999_plc

The real time priority can be displayed with ps, eg

> ps -eTo pid,pri,rtprio,comm

/Claes


I hope this solve your problem.
/Ben
The administrator has disabled public write access.

PlcThread not running 3 years 11 months ago #10629

  • silvaphoenix
  • silvaphoenix's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 97
  • Thank you received: 5
  • Karma: 4
Thanks Ben,
I already tried this as I'd had Claes' advice some years ago to set the plc priority but it hasn't made any difference.
Not sure what to do next.
Stephen
The administrator has disabled public write access.

PlcThread not running 3 years 10 months ago #10633

  • silvaphoenix
  • silvaphoenix's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 97
  • Thank you received: 5
  • Karma: 4
Hi,
I'm getting this message every time I start pwra

(wb:32469): Gtk-WARNING **: 14:19:47.629: Unable to locate theme engine in module_path: "adwaita",

Can this be stopping the PlcThread running?

Stephen
The administrator has disabled public write access.

PlcThread not running 3 years 10 months ago #10634

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3176
  • Thank you received: 502
  • Karma: 133
Hi Stephen,

Is the plc process still present or has it terminated? Check with 'ps x' if it's running. If it has terminated it's usually because of some erroneous array index or pointer in a CArithm or DataArithm, and in case you can run the plc in the debugger to see where it terminates.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: silvaphoenix

PlcThread not running 3 years 10 months ago #10636

  • silvaphoenix
  • silvaphoenix's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 97
  • Thank you received: 5
  • Karma: 4
Thank you Claes,
I had an erroneous pointer in a function object. All compiled ok but the plc terminated on the first scan.
Stephen
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 8.633 seconds