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

TOPIC: Help: PLC thread dies on process station

Help: PLC thread dies on process station 13 years 7 months ago #1003

  • Maden
  • Maden's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 86
  • Karma: 0
Here is something weird.

After some minor modifications (added some logic) the PLC process dies on the process station. On the development station it runs correctly.

This is what I get from \"rt_ini -i\"

[code:1]I Adding application. aix: 1
I Starting pwr_plc, file: plc_proview_0001_00081, prio: 5
I Started pwr_plc_1_0, prio: 5, pid: 3046
file: plc_proview_0001_00081
ruid: 1001
I Process pwr_sevhistmon_1 exited with status 0
I Process pwr_sev_server_1 exited with status 0
I Process pwr_plc_1_0 exited with status 13[/code:1]

What does the exit code 13 of pwr_plc_1_0 trying to tell me?
There is nothing strange in the pwr log file. Going back to the previous version everything runs fine also on the process station.

How can debug this further?

Ondrej
The administrator has disabled public write access.

Re:Help: PLC thread dies on process station 13 years 7 months ago #1004

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

Errno 13 is EACCESS (Permission denied). It could have to do with the file permissions of the plc executable. It should have owner root and the s-bit set for user.

/Claes
The administrator has disabled public write access.

Re:Help: PLC thread dies on process station 13 years 7 months ago #1005

  • Maden
  • Maden's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 86
  • Karma: 0
Hi Claes,

the thing is that everything worked perfectly before.

The PLC executable file was owned by pwrp and didn't have the s bit set. I changed this and now it looks like this:
[code:1]-rwsrwxr-x 1 root pwrp 2391389 2010-09-20 10:20 plc_proview_0001_00081[/code:1]

Still I get the same error :S

Could it be a problem with some file the PLC program tries to access?

Ondrej
The administrator has disabled public write access.

Re:Help: PLC thread dies on process station 13 years 7 months ago #1006

  • Maden
  • Maden's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 86
  • Karma: 0
I have found the root cause for this problem.

I had set the Address parameter of a Modbus_Tcp_Slave object to \"localhost\". This causes the (quite misleading) EACCESS exception of the PLC program. Changing the address to \"127.0.0.1\" instead works correctly.

Ondrej
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 8.327 seconds