问题: ADS实例运行机制及一种报错原因
回答:

此条问题内部查阅,暂时不要公开

问:

what the mean of 8191? there is not so many instances was created in target and what will cause this issue? 

8191

答:

  • The number of ADS handles is limited to 8k.
  • This is necessary because otherwise a blue screen can occur when the list is longer.
  • Mostly this happens if someone is using an ADS FB inside a function (not a function block).
  • Reason:
    • We need a list of all ADS instances inside TwinCAT runtime.
    • If a new ADS instance is used first time a place in the list is reserved for this instance.
    • The place in the list is stored in the instance. So everytime the ADS instance is used it will first look into the list and see if on the reserved place is an answer from someone or not.
    • If the ADS instance is used in a function the memory is always cleared when the function is called. Means: everytime the function is called the internal used ADS instance see that it has no number in the list and tries to get a new one.
    • Means: after 8.000 call the limit is reached and the error message is thrown.

 

What to do:

  • Check the customers project if functions are used with an ADS instance (ADS read, write, readwrite, file, …). Anything with ADS needs to be used from a FB instead of a function!
  • If not à check if someone is deleting the memory of an ADS instance (via Memset or via pointer usage). This is of course not so easy to find.




数据维护:朱元
编辑时间:28 6月 2022

如果此回答有不清楚或错误的地方,请扫描页面底部二维码添加微信公众号与我们联系,我们努力给您满意的答复。