Just use a convolution with [-1,1,0] as the matrix. This will calculate the difference between each pixel and the pixel to its left. To get positive and negative values, you would need to convert your image to I16 or float first. If you flip the convolution matrix, you will get the difference in columns instead of rows.
If you just want the maximum difference, try the edge detection filters. One of them calculates the max difference between each pixel and its adjacent pixels. Read the help to figure out which one would work best for you.
Bruce
Bruce Ammons
Ammons Engineering