I have a read block set up in my codesys program and have some values entered in the scratchpad to read. However only the first index of the scratchpad is read to the first element of the array. Here is how I have the mmp function blocks configured. It is a 3 element array. I assume this will read the values of index 0 in the scratchpad to element 0 in the array and so on with the other two values.
mmpClient1(
xConnect := TRUE,
sAddress := ‘127.0.0.1’
);MmpReadDelay(IN := NOT MmpReadIntegerTimes.xBusy, PT := T#100MS);
mmpReadIntegerTimes(
xExecute := MmpReadDelay.Q,
udiTimeOut := 1000000,
udiMmpAddress := 16#F0D81000, // Scratchpad location 32 bit integer index 0 through 3 currently used. Indexs 4 through 30 spare.
rClient := mmpClient1,
pData := ADR(TimesInt),
uiCount := SIZEOF(TimesInt),
);