TL;DR = Is there any obvious reason why a MyBlock, added twice in parallel to a program, will only run one of them?
In my EV3-G program, I have a MyBlock which uses the Proximity Heading to control a motor so that the heading is always straight ahead. (It has some added complexity, as it slows down when getting close, etc.)
My robot-arm has two infrared sensors, one mounted horizontally, one mounted vertically, so the arm can always point at the beacon... and the MyBlock has been setup with parameters, so that the corresponding port/motor numbers are passed in.
Is there any reason why two MyBlocks, running in parallel, would only work on one of those blocks, and not the other? (When debugging, both blocks are "shimmering", show they are both apparently running.)
I have double-tripple-quadruple checked that all the flow-control, sensor and actions are working with the correct parameter values, and running each block individually works perfectly.
I have also replicated (at great length) the blocks in brand new programs, and they work without issue.
Why would two blocks running in parallel not work, when the same code replicated on the program does?
UPDATE
As requested (and I should have done originally).
Here is the MyBlock. It starts with 3 parameters, the sensor port, the motor port and an "offset" - all numeric. The loop starts, and a direction heading reading is taken. It then uses the "offset" value, and passes "offet - 5" and "offet + 5" into the range
Based on the boolean value from the range, if the current heading value is within the range, then it runs the motor at a "graded" speed, based on the heading value. Therefore as it gets closer to 0 the slower the motor is run.
If the current heading value is outside the range, then the motor is run at a non-variable speed... in this case if the value is below the "offset" value.
And in this case if the value is above the "offset" value.
The program simply calls two instances of the MyBlock. If I run the left one, the horizontal detection and movement works without issue - if I run the right one, the vertical detection and movement works without issue.
But, if I run the following, only the last MyBlock to be wired works. There is literally movement from just one direction motor.