Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: RBPLC on January 04, 2020, 10:32:18 PM
-
Attached is a timer array running inside of a loop (in simulator). It appears to be working the way I would expect it to but I have the warning messages shown at the bottom of the screen. Is what I have programmed bad practice and if so what would be the correct way to program it? I must confess I get easily confused about best practices concerning multi-scan and yielding instructions.
-
We warn because it can be a problem. If you understand it and know that it isn?t, ack the warning for that instance and move on.
-
Is it bad practice to use a multi-scan instruction inside of a for loop? What potential issues would you see doing that that would prompt the warning message?
-
It isn't an issue of best practices. It's an issue of working right or not. The way you are doing it works fine as long as you do it in a program or task that has a .TimeSlice value of 65535. You posted this originally on ADC's forum under Productivity. I'm not familiar with their implementation, so I don't know if it will work there or not.
-
Attached is a timer array running inside of a loop (in simulator). It appears to be working the way I would expect it to but I have the warning messages shown at the bottom of the screen. Is what I have programmed bad practice and if so what would be the correct way to program it? I must confess I get easily confused about best practices concerning multi-scan and yielding instructions.
The timer works by accumulating scan time every time it's run, so each timer must be executed every scan. If you do that it'll be OK.