Skip to Main Content
Cognex Support Hub
LogoLogo

WriteResultsBuffer function goes to ERR when trying to send more than 128 elements

This article describes why the WriteResultsBuffer function can turn to ERR and how this could be solved.

11/29/2024

Details

If the “WriteResultsBuffer” shows #ERR as per below (cell C69):

writeresultsbuffer-function-goes-to-err-when-trying-to-send-more-than-128-elements-img1

One of the reasons can be the number of elements coming from the “FormatOutputBuffer” functions: 128 elements maximum in total.

For instance, this “FormatOutputBuffer” is using 3 elements (M34, N34 and 034) : 

writeresultsbuffer-function-goes-to-err-when-trying-to-send-more-than-128-elements-img2

When several “FormatOutputBuffer” functions are used, the total number of elements must be lower than 128.

 

SOLUTIONS :

  1. First solution, the number of elements can be reduced, to be lower than 128 elements.
  2. Second solution, all the elements can be used (more than 128), but then two “WriteResultsBuffer” functions are needed instead of one only. Half of the elements are used by the first  “WriteResultsBuffer”, and half of them are used by the second “WriteResultsBuffer”.
    To not  overwrite the first “WriteResultsBuffer” with the  second one, the PLC must use the “Buffer Results Enable” and the “Inspection Results Acknowledge” : 
writeresultsbuffer-function-goes-to-err-when-trying-to-send-more-than-128-elements

Here is the procedure :

  1. Set “Buffer Results Enable” to TRUE and keep it TRUE
  2. Wait for “Results Valid” becoming TRUE
  3. Read “Inspection Results”
  4. Set “Inspection Results Acknowledge” and keep it TRUE until “Results Valid” turns to FALSE
  5. Clear the “Inspection Results Acknowledge”
  6. Jump back to step 2

 

In-Sight Vision Suite Help

Loading component...

Related Resources