Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: HB_GUY on October 31, 2015, 10:15:06 PM

Title: What is going on here? Bug maybe?
Post by: HB_GUY on October 31, 2015, 10:15:06 PM
Please reference the attached pictures.
The code in question is in RUNG 10.
This is in a program names ProcessLOG_Q. This program is run every 10 minutes to look for queued logs to transmit to the webserver.
I noticed tonight while working on the system that if I have "All Status" turned on in DMD, whenever rung 10 is displayed on the screen, I get the errors in the attached photo.
It does not matter if the program is actually running or not. I still get the errors...

Any thoughts?
Title: Re: What is going on here? Bug maybe?
Post by: BobO on November 01, 2015, 12:34:58 AM
V51 may be resulting in an out-of-range array index. I'll need to check the code to be sure.
Title: Re: What is going on here? Bug maybe?
Post by: HB_GUY on November 01, 2015, 12:57:31 AM
My Ladder Code? Or DMD code?
Title: Re: What is going on here? Bug maybe?
Post by: BobO on November 01, 2015, 04:53:36 PM
Error #6 is Invalid Argument, a fairly general error that means we got some bad juju in a request. One common way to generate it is to attempt to display status on an out-of-range array reference (the V index points beyond the block). Another possibility would be that the project in the PLC doesn't match the project that DmD has loaded (moved the cable with an active session) then attempted to read status of a heap item or block that didn't exist. Since you had an array reference in rung 10, and the problem only shows up when you show status on rung 10, it just followed that it might be a bad array reference. Depending on the state of ST18, we either treat out-of-range array refs as an error or a warning.