12-05-2016 02:11 PM
12-05-2016 03:01 PM
The direct replacement to a shared variable is a global variable.
How fast are you reading the data? How fast is your PWM loop running? What I am getting at is that you may be able to put everything inside a single loop. Then you could just use a wire!
12-05-2016 04:59 PM
12-06-2016 06:16 AM
@ben49 wrote:
Will using a single loop make the program run more efficiently?
That depends on everything that is happening and what rates you need to run at. In general, a control system is better off as a single loop.
Also converting to/from the Dynamic Data is generally a bad idea (I have seen way too many problems due to that data type).