SKA AB

RecSearch unreliable.

4 posts in this topic

Hi, i have found that the RecSearch seems to be unreliable, you cannot tell if the search is done, and nothing is found, or if its still searching.

I see quite often that we get double and tripplets in the array[0..199] struct.

Lap1_PushBoard.ID is filled in by a scanner, RecSearch is looping thru 0..199 array to see if its already in there, if its not, it should add it in the network after.

The red-crossed out is an attempt to try to validate the search is completed.

Is there a way with recsearch to actually KNOW when it has looped thru all the array and not found its search value in? Right now it has basically one cycle to find or not find, then the network 2 is

going to assume board not found, but watching live data i see doubles in the array, several times in a row, meaning search was never done when we added the value.

 

 

recsearch.png

boardlist array.png

Share this post


Link to post
Share on other sites

@SKA AB 

If you place the StackPush in line with the EndofOperation of the RecSearch does the problem seem to improve?

 

Take a stab at what may be going on...

I am wondering if on Rung 1, when Lap1_OperationComplete goes TRUE, RecSearch on Rung 0 is no longer being executed (EN is off) so maybe Lap1_FoundBoard will go FALSE. I do not think that output is a "Retained" status and goes FALSE when it is no longer executing.

This could possibly cause Rung 1 to execute the StackPush multiple times as long as Lap1_Processing bit is still high.

Also will depend on conditions you are using to reset Lap1_OperationComplete

 

65f328e716a48_Screenshot2024-03-14114108

Share this post


Link to post
Share on other sites
On 3/14/2024 at 5:55 PM, Str8jCkt said:

@SKA AB 

If you place the StackPush in line with the EndofOperation of the RecSearch does the problem seem to improve?

 

Take a stab at what may be going on...

I am wondering if on Rung 1, when Lap1_OperationComplete goes TRUE, RecSearch on Rung 0 is no longer being executed (EN is off) so maybe Lap1_FoundBoard will go FALSE. I do not think that output is a "Retained" status and goes FALSE when it is no longer executing.

This could possibly cause Rung 1 to execute the StackPush multiple times as long as Lap1_Processing bit is still high.

Also will depend on conditions you are using to reset Lap1_OperationComplete

 

65f328e716a48_Screenshot2024-03-14114108

Thanbks for the suggestion, i have modified the code to your suggestion, but have not had the chance to download and have it tested live yet.

Quote

This could possibly cause Rung 1 to execute the StackPush multiple times as long as Lap1_Processing bit is still high.

This was my first thought, that Rung 0 does not manage to finish in what ever condition is has per cycle, and then rung 1 do get pushed several times.

Share this post


Link to post
Share on other sites

Had the test run for a day or so, it still counts wrong because the RecSearch does not seem to finish searching before the StackPush puts in the record.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now