JeffLowe Posted August 20, 2013 Share Posted August 20, 2013 I am looking for example code for doing gathers and uploading the data to the PC using pcommserver. Any language acceptable. is there anything? thanks. Link to comment Share on other sites More sharing options...
Unit101 Posted August 21, 2013 Share Posted August 21, 2013 Hi Jeff, I have plenty of examples in C# code doing gathers after e.g. Tuning moves.... and be glad to share. Please email me directly so we can transfer that way. mesposito@deltatau.com Regards, mike Link to comment Share on other sites More sharing options...
JeffLowe Posted August 23, 2013 Author Share Posted August 23, 2013 This is what my documentation says. Can anyone decode what this means: ---------------------------- PmacGetGather BOOL PmacGetGather( DWORD dwDevice,UINT num,LPSTR str,UINT maxchar ); Arguments 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 More sharing options...
Unit101 Posted August 25, 2013 Share Posted August 25, 2013 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: [C#] 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: 4.3.0.0" I will email you my version of Pcomm install with some additional docs. Let me know how it goes.... mike Link to comment Share on other sites More sharing options...
Recommended Posts