Amir Posted November 29, 2010 Posted November 29, 2010 my routine realtimeinterrupt_plcc() only runs once when I set UserAlgo.Rticplc=1. Each time I set UserAlgo.Rticplc=1 it will run just once and stop. What do I need to do to have it run continually?
bradp Posted November 29, 2010 Posted November 29, 2010 This usually means you have some error in the code and the routine is essentially crashing. To be more sure put Sys.ServoCount into the watch wndow. If Sys.ServoCount is counting then it is very likely to be something illegal in your code. If you send your code over I can take a look at it.
bradp Posted November 30, 2010 Posted November 30, 2010 The code is OK and runs on my system. So how is Sys.ServoCount, is it counting? How is Sys.WDTFault, is it 0? Do you have anything in the watch window that is setting UserAlgo.RtiCplc=0 or sending disable rticplc? Any other code that is running that could be doing this, check the task manager for other running programs and stop them. If all that turns up nothing then open a new project, issue $$$*** to PPmac, past the code into the rticplc and build and download and see if it now runs.
Amir Posted November 30, 2010 Author Posted November 30, 2010 Sys.ServoCount is not counting. Is this because there are no axis cards in the rack? If this is the case, is there a way to trick the Power PMAC into doing a background servo update? [quote='bradp' pid='871' dateline='1291076975'] The code is OK and runs on my system. So how is Sys.ServoCount, is it counting? How is Sys.WDTFault, is it 0? Do you have anything in the watch window that is setting UserAlgo.RtiCplc=0 or sending disable rticplc? Any other code that is running that could be doing this, check the task manager for other running programs and stop them. If all that turns up nothing then open a new project, issue $$$*** to PPmac, past the code into the rticplc and build and download and see if it now runs. [/quote]
bradp Posted November 30, 2010 Posted November 30, 2010 That is the problem. When you have no cards in the rack that generate the clocks you must set Sys.CPUTimerIntr = 1 then you must save and then cycle power. After that Sys.ServoCount will count and the plc will work.
Recommended Posts