Jump to content
OMRON Forums

Uploading Gathers to PC example code


Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

This is what my documentation says. Can anyone decode what this means:



BOOL PmacGetGather( DWORD dwDevice,UINT num,LPSTR str,UINT maxchar );


dwDevice Device number.

num Number of samples to gather.

str .Base address of each sample to gather.

maxchar 32-bit interrupt mask. Zero(0) will cause all interrupt service levels to interrupt.

Return Values

TRUE = Ok, FALSE = Error.



Even with source code, I am having trouble figuring out how to setup, gather, and upload the gathered data into a PC.

Link to comment
Share on other sites

Sorry the example code not working well for you.


I see a problem and not sure why ?


Your posted function below does not match what I see in PComm. ??


BOOL PmacGetGather( DWORD dwDevice,UINT num,LPSTR str,UINT maxchar ); ... here is what I think they mean... but I've not tested

dwDevice = pmac number

num = source set of data number 0,1,2,3

str = return string to put the data into

maxchar = max number of chars for the return string of data

bool return = success or not


Mine looks like this:

.GetGather(int dwDevice, int num, ref string pStr, out bool pbSuccess)


My Manual shows:


virtual public void GetGatherSamples(

int dwDevice,

int sourceNum,

out object pVariant,

out bool pbSuccess



So perhaps we using different versions of Pcomm ?

I don't think yours is latest ?


In my example I use a different function ....CollectGatherData()

classPComm.Pmac.CollectGatherData(classPComm.DeviceNum, out DataSo, out NumSamples, out Suc);

classPComm.Pmac.GetGatherSamples(classPComm.DeviceNum, 0, ref Data1, out Suc);


Also in examples note that you must first call CollectGatherData()

-this call gives you the Number of source data sets you can collect

-so if you get 3 sets in return ... when you make call with GetGather() the "num" can be etiher 0, 1, or 2 to get that SET of gathered data...


I think we need to figure out what version of Pcomm you using and perhaps get you to newer version... when you bring up PMAC device selection dialog what is the version reported in Title Bar ?

Mine is "Pcomm Version:"


I will email you my version of Pcomm install with some additional docs.


Let me know how it goes....


Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...