Host Engineering Forum

General Category => General Discussion => Topic started by: ssutton on August 15, 2016, 06:58:02 AM

Title: More questions about programs
Post by: ssutton on August 15, 2016, 06:58:02 AM
I am new to using the programs feature on DoMore. Yesterday I was working on a project that had 4 programs besides the main. I configured each program to run as "Never Yield" since I am not using any instruction that would yield the code block, I am using the program feature just for code organization. However, a strange unexpected behavior began to happen in at least one code block. A particular ladder would execute and cause an output coil to come on when the inputs were true, but then sometimes the same output would come on when the inputs were true but then not go off when the inputs were false. This C75 bit could not be turned off even in the Data View window in edit mode. Using the search function I could not find any other reference in the program to C75 that may have been holding it on. I then replaced C75 with C200 (nowhere close to any C bit in use as I use them in sequential order) and the same exact behavior happened. It seemed as if the program was not executing and had frozen the C75 (C200) bit. I then started a new project in DoMore and simply copied and pasted all the code from each individual program in the previous project into the "Main" of the new project. Everything worked as expected with no more hangs.   Am I using the program feature wrong? Any thoughts?
Title: Re: More questions about programs
Post by: BobO on August 15, 2016, 08:20:20 AM
Forcing? Suspending? Yielding or not yielding should have no effect if you aren't using yielding instructions. When we have questions about whether something is running or not, we usually stick INC instructions near the questionable instruction.

If you have a project that demonstrates this reliably, we would really like to see it.
Title: Re: More questions about programs
Post by: ssutton on August 15, 2016, 09:07:34 AM
I will back on site this afternoon and will reload the original program and see if I can reproduce the same results. I will add the INC instruction to see if I can evaluate program execution. If I get the same odd behavior you would be welcome to remote in and see whats happening or I could send you the code. Most likely I am doing something wrong here causing this to happen and I just cant determine what it is.

Thanks,
Scott
Title: Re: More questions about programs
Post by: BobO on August 15, 2016, 09:36:51 AM
If you've got it broken, remoting in would be great. It's very helpful to interact with it while it's unhappy. Barring that, you can send code to support@hosteng.com.
Title: Re: More questions about programs
Post by: ssutton on August 15, 2016, 11:49:00 AM
OK, its broken now if you want to remote in and take a look. If you can send me a PM and will give you the login details with Team Viewer
Title: Re: More questions about programs
Post by: BobO on August 15, 2016, 04:18:37 PM
In the interest of completing this thread, we did remote in and determined that there was subtle programming issue, but that the controller was working as expected.