mbalentine Posted September 2, 2011 Posted September 2, 2011 Using PcommServer to replace PTalk and rewriting to .NET 3.5 I don't understand the usage of DPRGetShort(). It uses an integer value for 'address' as opposed to an 'offset' value. No variable to identify X/Y memory bank. How is 'address' used to specify which bank the 16bit short is in ?? Also, is there an updated manual for PCommServer ? Mine is dated Feb '06 and is not very thorough or complete. The only other related manual I can find is PComm32 from April '05. Thanks
fahmad Posted September 2, 2011 Posted September 2, 2011 Parameters of DPRGetShort() include the device number, offset address, variable to hold two bytes, and boolean flag to indicate success od failure. There is no need to specify an X or Y register. The address parameter is to indicate the start address and next two bytes are to be read and casted ad 16 bit integer value. See the following code for prototype. Farooq STDMETHODIMP CPmacDevice::DPRGetShort(LONG dwDevice, LONG address, SHORT* pVal,VARIANT_BOOL *pbSuccess) { CHECKDEVICEPARAM(dwDevice); CHECKPOINTER2(pVal,pbSuccess); (theApp.DPRGetMem(dwDevice,address,sizeof(short),pVal) != NULL) ? *pbSuccess = VARIANT_TRUE : *pbSuccess = VARIANT_FALSE; return S_OK; } Using PcommServer to replace PTalk and rewriting to .NET 3.5 I don't understand the usage of DPRGetShort(). It uses an integer value for 'address' as opposed to an 'offset' value. No variable to identify X/Y memory bank. How is 'address' used to specify which bank the 16bit short is in ?? Also, is there an updated manual for PCommServer ? Mine is dated Feb '06 and is not very thorough or complete. The only other related manual I can find is PComm32 from April '05. Thanks
fahmad Posted September 2, 2011 Posted September 2, 2011 DPR offset in PMAC starts with Y address (16-bit wide) and then X address (16-bit wide). For example, RX:$60000 is same as DPRGetShort(dwDevice, 2, 2, bSuccess). Please notice that PC offset is 4 times the PMAC offset. Please verify these e numbers by launching DPRViewer from Pewin32Pro2's view menu. Farooq Parameters of DPRGetShort() include the device number, offset address, variable to hold two bytes, and boolean flag to indicate success od failure. There is no need to specify an X or Y register. The address parameter is to indicate the start address and next two bytes are to be read and casted ad 16 bit integer value. See the following code for prototype. Farooq STDMETHODIMP CPmacDevice::DPRGetShort(LONG dwDevice, LONG address, SHORT* pVal,VARIANT_BOOL *pbSuccess) { CHECKDEVICEPARAM(dwDevice); CHECKPOINTER2(pVal,pbSuccess); (theApp.DPRGetMem(dwDevice,address,sizeof(short),pVal) != NULL) ? *pbSuccess = VARIANT_TRUE : *pbSuccess = VARIANT_FALSE; return S_OK; } Using PcommServer to replace PTalk and rewriting to .NET 3.5 I don't understand the usage of DPRGetShort(). It uses an integer value for 'address' as opposed to an 'offset' value. No variable to identify X/Y memory bank. How is 'address' used to specify which bank the 16bit short is in ?? Also, is there an updated manual for PCommServer ? Mine is dated Feb '06 and is not very thorough or complete. The only other related manual I can find is PComm32 from April '05. Thanks
Omron Forums Support Posted September 2, 2011 Posted September 2, 2011 There is an update manual but you must purchase it. To upgrade your Pcomm Server license is roughly $250 and you must contact your distributor to do so. PComm32 is a different product from this, so its manual does not apply. The arguments to DPRGetShort() are as follows: Arguments Inputs: dwDevice: Device number, type long offset: Offset from the start of dual ported RAM, type long Outputs: pVal: Pointer to Short Value to copy, short*, Output pbSuccess: True if success, type BOOL , Output DP memory uses the lowest 16 bits of both X/Y memory as page 246 of the Turbo PMAC User Manual describes. So, there is no need to specify X or Y memory.
JeffLowe Posted December 8, 2011 Posted December 8, 2011 Also, is there an updated manual for PCommServer ? Mine is dated Feb '06 and is not very thorough or complete. The only other related manual I can find is PComm32 from April '05. Thanks Same Issue. Where is the manual?
steve.milici Posted December 9, 2011 Posted December 9, 2011 The PcommServer Pro2 Library manual is installed in the following directory: "C:\Program Files\Delta Tau\PCommServer Pro2 Library\PcommServer Document\"
Recommended Posts