Ever since I started working with TcUnit I have been, in many cases, working with a lot of VAR_INST
declarations for a whole bunch of tests. This is due to the nature of how PLC world works, where you need to keep calling the body to do something, the tests are running in “parallel”, which could mean tests that share the same function block must be sure what state it is in – if another test would be changing any property it would fail every other test.
My question is, are there any cons to using instanced variables inside methods? This is not a real world example I usually do, I very rarely find the need to use them on machine code, but in case I do, I was wondering if I should take notice when I do use it.