For what it’s worth - we’re having exactly the same problem. The connectivity in the wiring is there, the pin connections are correct, and the test code doesn’t get much simpler. But it seems to be a common issue if you look at other threads.
For what it’s worth - in our case, the fix for this was to switch from the ‘round’ cable to the ribbon cable in connecting the digital sidecar to the cRIO module. We did that and all of a sudden starting getting values.
We are using the older 8-slot cRIO, and two of the 3 wire PWM cables (with two wires in each) to connect the accelerometer to the I2C connection on the sidecar.
Our test code was pretty much the same as the first posting.
I had terrible issues trying to read the accelerometer. The eventual solution was to use a short I2C cable between the accelerometer and the digital breakout board. Keep it under 12", if that does not work make one that is 6" long and see if that help.
We had the same problem and switching to a ribbon ccable fixed it, but are you sure that aa.XAxis); is right? we do “x is” +accel.getAcceleration(ADXL345_I2C.Axes.kX); well about that,