In this tips and tricks post I will demonstrate the usage of the attribute: ‘instance-path’. The instance path attribute allows you to get the instance path of the containing POU in a string variable. Something I find particularly useful for error-logs and debug messages. How to use it 1. We need a string variable which […]
In the post ‘How to use monitoring attributes’ I showed how to use the monitoring attributes: attribute ‘monitoring’ := ‘variable’ and attribute ‘monitoring’ := ‘call’. With these pragma attributes we can monitor and modify our function blocks properties. This comes however with a small drawback. As the online view now shows your properties and their backing fields your online view gets less clear. In this post I will show how to solve this with the hiding attributes.
Every programmer spends a considerable amount of time debugging their software. In the world of PLC programming it’s common to login to the PLC and monitor and write your variables. However, with the introduction of properties for your function blocks monitoring is not as plain as it used to be. In this post I’ll explain how to use monitoring attributes for your properties in TwinCAT.