Turret Tracking with Polygon-Aligned sets of Objects in Animation Nodes 2.1
I am going to discuss a pure Animation Nodes approach instead of of using constraints, because, as you said, it is simpler and more flexible.

Base

The base is simple, we instance the base object, position it based on the polygons centers, and orient it based on the polygons normals as follows:



Turret

For the turret, the same will apply, but we are going to use the vector directed from the turret to the target empty as the guide for the Direction To Rotation node. We can compute that vector by subtracting the centers from the target location as follows:

 

The output rotation matrix is something we will use later, so make sure to expose it as an output.

Barrel

The barrel have the same orientation as the turret but it can rotate around its local Y axis, to rotate the barrel around the local Y axis, we multiply the rotation matrix we computed before by a Y rotation matrix. The location is also the same except it is shifted along the normal slightly, to do this shifting, we simply add a scalar multiple of the normal to the location as follows:



Now the only thing left to do is to compute the angle at which we are going to rotate each barrel along the local Y axis. To compute that angle, we are going to compute the angle between the the vector along the length of the barrel and the vector directed from the barrel's location to the orthogonal projection of the target empty on the plane of barrel, this angle:



Does that make sense? We will implement that as follows:



There is something slightly wrong with this implementation, the angle is not directed, it is, in fact, the smallest angle between both vectors. To get the signed angle (Directed angle) we can either use the Quaternion Output or investigate the cross product, we will be using the cross product method here as it is simpler. We compute the cross product between the two vectors, normalize the output, subtract it from the normal of the plane, return the sign -1 if its length is close to zero and 1 if not, then multiply the signs to the angle as follows:



One last thing to do is clamp the rotation so that the barrel doesn't go through the base, and maybe expose the limits as parameters. So the final result is:



Blend file: