Rotating around the Z axis

I’m trying to rotated around the RZ axis 540 degrees. I need to be able to do it through script because the waypoints I’m using need to be variable waypoints. I tried doing something like this:

Current_Pose = get_actual_tcp_pose()
TargetRz = p[0,0,0,0,0,d2r(540)]
Pos1 = pose_add(Current_Pose, TargetRz)

The problem I’m having with this is that this method doesn’t seem to allow rotations over 180 degrees, so effectively, putting 540 is getting me exactly what I’d be getting if I inputted 180. I understand why this is happening. If I’m telling the robot to go to a position 360 degrees from where it is, it assumes that it is already in that position, but I’m trying to rotate the tooling on the end of my cobot so that is spins 540 degrees in total. Anyone have any clue what I could do to achieve this?

just tried doing something like this with relative waypoints too, and I’ve achieved pretty much the same mode of failure. You cannot rotate over 180 degrees with a single node. I can get to 540 by creating 3 relative waypoints that rotate 180 each, but that just feels like an obtuse way of doing things.