How to fix this IK issue?

Hi,
I have a robot arm rigged with IK, I want it transforms like the referience video below do:
Reference Video

Here is what i did:
IK Issue
when check off Weight Rotation the robot arm follows IK target’s pos, but rotation not work well, if check on Weight Rotation the robot arm follows IK target’s rotation but not with pos.

Some help is appreciated.

You have to choose which to prioritize, pos or rot. You can’t always have both. Consider this two-bone IK below:

Three basically identical armatures. If we prioritize pos, we can reach the IK target with the tail of the bone most of the time. But if we prioritize rot, we can’t. The third image demonstrates why: if we constrain both the loc and rot of the final IK bone, there’s no solution for the first IK bone. There’s no orientation it can be in, because the head of its child is too close. (Or, too far.)

What’s generally done to kind of split the difference is to use a combination system, where we use IK on all but the final bone, but give the final bone a copy rotation constraint (or something equivalent):

Now we can completely define both the rotation of the final bone, and the point reached by the second-to-last bone’s tail. The two of those things end up completely defining the final bone, which completely echoes our IK target, unless it moves out of reach.

Thanks for your detail reply.
my goal is whole IK chain, not just last bone, because when last bone rotated other bone need to rotate properly.
I’ll try your tips, if it work on my robot arm.