Jump to content
OMRON Forums

I5000=1 causes windows error


JeffLowe
 Share

Recommended Posts

We are trying to gather the history leading up to an event by setting the gather buffer to loop in ram and sending an endg when the event occurs. I know the plot utility does not support this, but it turns out that calls to the .CollectGatherData method in pcomserver also causes the same errors ( Windows cannot allocate a bazillion bytes).

The root cause of this appears to be in the GetNumGatherSamples function in PcommServer where the routine reads x:$3120 as the start, and Y:$3120 as the end. Once the gather wraps the beginning is larger than the end and of course it returns a negative number. Internally the beginning and end are longs, but in the calculation they are cast as an int which truncates the beginning of the twos complement long. The result is some undefined large number of data samples ( a bazillion or so).

Is there any fix to the pcomserver, and/or are there other variables that point to the location of the gather buffer, or other way that I can find the head/tail/size so I can upload the data using other methods?

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

A little follow on: Digging in I have found that bit 22 of x:$3120 gets set when the gather buffer wraps. This bit is the cause of the huge number buffer start which results in an a parent gather count in the bazillions. Also, if bit 22 is set the on line command List Gather returns an ERR003 Data error or unrecognized command. By clearing bit 22 to zero (or subtracting $400000) the list gather function works.

This also works with the Plot Pro2, although the after setting the gather items, and the define gather in plot pro, it will be necessary to go to the terminal, set I5000=1 for ram wrapping, and define a fixed length gather buffer (def gat 10000). Gathering can be started from here as well.

The CMD"End Gat" can then be inserted in a plc, in my case an alarm plc, and when the event occurs gathering is halted. Clear bit 22, and the data can then be uploaded and plotted.

 

Suggestion: Add detecting and clearing of this bit to

UINT CPmac::GetNumGatherSamples( DWORD dwDevice )

in PCommServer.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...