Join us today!

Reading Router Memo...
 
Notifications
Clear all

Reading Router Memory Information in TwinCAT

1 Posts
1 Users
0 Reactions
419 Views
TwinControls
Posts: 71
Admin
Topic starter
(@beckhoffsupport)
Member
Joined: 2 years ago

If you need to check how much router memory is being used for ADS communication in your application, you can use FB_GetRouterStatusInfo function block. You would need to add Tc2_Utilities library to be able to use this FB. The TwinCAT memory is divided into two categories; the router memory and the PLC memory. More information on Memory Usage in TwinCAT can be found here : Memory Usage

utilities
//========================================================= 
VAR
    fbGetPLCStatus : FB_GetRouterStatusInfo;
    bGetPLCStatus: BOOL;
END_VAR
//========================================================= 
fbGetPLCStatus(
	sNetId:= '' , //Network address of the IPC, leave it empty ('') for local network
	bExecute:= bGetPLCStatus, 
	tTimeout:= T#5S, 
	bBusy=> , 
	bError=> , 
	nErrID=> , 
	info=> ); //TwinCAT router status information
//========================================================= 

 fbGetPLCStatus.info - ST_TcRouterStatusInfo

 

info

 

You can also use Beckhoff Device Manager to view the memory usage information.  

 

If you would like to increase the router memory size which is set to 32 MB as default, you can change that in the real time settings. The limit depends on the RAM size of your IPC. 

routermemory

 

If you are using the DOM memory in TwinCAT very often (for example; using FB_XmlDomParser.LoadDocumentFromFile() ), you might want to implement 'monitor the memory usage' logic in your application using the method mentioned above. 

 

Reply
Share: