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

TOPIC: Long scantime plcthreat

Long scantime plcthreat 13 years 10 months ago #789

  • canelon
  • canelon's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 84
  • Karma: 0
Hello,

I have 2 plcthreats, one is configured with 1Sec scantime and the other is set for 300Sec; attached to them i have several plcprograms, my problem is that when i start the runtime, i get the 300Sec values after this time has passed, which means that i must wait for 5 minutes to see the values produced by these plcprograms, how do i get the 300sec threats to execute on start up as the 1Sec ones but with 300 Sec wait between scans
The administrator has disabled public write access.

Re:Long scantime plcthreat 13 years 10 months ago #790

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

I think the thread is executing, and that the problem is that the input data is not ready or prepared for som reason. From where does it get its input? Is it from I/O or calculated data in the other thread ? It might be a priority problem. Please check that the priority is set in the PlcTread object to a value >= 20. Also check that root is the owner of the plc executable and the s-bit set so that the plc is allowed to set priority of the threads.

/Claes
The administrator has disabled public write access.

Re:Long scantime plcthreat 13 years 10 months ago #792

  • robert
  • robert's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 178
  • Karma: 7
Hi Canelon,

Please set the highest priority on the fastest thread.

/Robert
The administrator has disabled public write access.

Re:Long scantime plcthreat 13 years 10 months ago #793

  • canelon
  • canelon's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 84
  • Karma: 0
Hello, and thanks for your quick responses.

My data is being collected, as i can see activity when i open the modbus_tcp_slave object on the Runtime Navigator, although the modbus_tcp_slave object is set to process 2, which means that it does not uses the plcthreat to get the values from the i/o device, the problem is that my plc program is not executed on startup but after the first scantime has passed, what i need is my plc programs to be axecuted also at startup.

Thanks in advance
The administrator has disabled public write access.

Re:Long scantime plcthreat 13 years 10 months ago #794

  • robert
  • robert's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 178
  • Karma: 7
Hi,

I guess the problem is that the plc is executed before the i/o is read. Process 2 means that rt_io_comm is reading the data. Unfortunately there is no synchronisation between these. Need to think about a solution for this.

/Robert
The administrator has disabled public write access.

Re:Long scantime plcthreat 13 years 10 months ago #812

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

In 4.7.0 we have added the ScanInterval attribute the the Modbus_Module. This makes it possible to handle modules with lower scantimes than the plc thread scantime. So you don't need to use rt_io_comm any more to handle these modules. If you move them to the first plc thread, they would be read before the slow thread is started, and this would hopefully solve the problem.

/Claes
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 8.979 seconds