News:

  • October 03, 2026, 12:02:15 AM

Login with username, password and session length

Author Topic: Info Message  (Read 7700 times)

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Info Message
« on: November 20, 2018, 08:37:55 AM »
I have a program that has a couple of for/Next loops in stages and and an MRX instruction in the same program, but not in the loops. I am getting this Information message

M331 Asynchronous instruction MRX used in code-block with 2 yielding instructions

Is that a real problem or only a problem if it was inside one of the loops?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Info Message
« Reply #1 on: November 20, 2018, 08:57:39 AM »
When looping instructions yield, other instructions don't get executed for one or more scans. Multiscan instructions can hang if they don't execute. It's just letting you know that the conditions exist for that to occur. As long as your loops don't take forever to execute, it's probably fine. We alert you so you can consider whether it is an issue.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Info Message
« Reply #2 on: November 20, 2018, 11:11:08 AM »
So if i did have a long loop it would be best  to put it in a separate code block? Would that allow the MRX instruction in the initiating program to execute?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Info Message
« Reply #3 on: November 20, 2018, 11:56:10 AM »
So if i did have a long loop it would be best  to put it in a separate code block? Would that allow the MRX instruction in the initiating program to execute?

Yes. My general rule is that if I have a loop that can't (or shouldn't) complete in a single scan, I put it in a TASK. That allows you to tune the time slice and balance loop completion time and scan time hit.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO