function pin_struc= create_NewPinLoc_XZ(simOut,I)
time=simOut.excavator_frames2.Chassis.A1.Time;
A1=simOut.excavator_frames2.Chassis.A1;
A2=simOut.excavator_frames2.Chassis.A2;
B1= simOut.excavator_frames2.Boom.B1;
B2= simOut.excavator_frames2.Boom.B2;
B3= simOut.excavator_frames2.Boom.B3;
C1= simOut.excavator_frames2.Stick.C1;
C2= simOut.excavator_frames2.Stick.C2;
C3= simOut.excavator_frames2.Stick.C3;
C4= simOut.excavator_frames2.Stick.C4;
D1= simOut.excavator_frames2.Bucket.D1;
D2= simOut.excavator_frames2.Bucket.D2;
D3= simOut.excavator_frames2.Bucket.D3;
E1= simOut.excavator_frames2.Linkage.E1;
A1_pin=A1_info(time==I,[1 3]);
A2_pin=A2_info(time==I,[1 3]);
B1_pin=B1_info(time==I,[1 3]);
B2_pin=B2_info(time==I,[1 3]);
B3_pin=B3_info(time==I,[1 3]);
C1_pin=C1_info(time==I,[1 3]);
C2_pin=C2_info(time==I,[1 3]);
C3_pin=C3_info(time==I,[1 3]);
C4_pin=C4_info(time==I,[1 3]);
D1_pin=D1_info(time==I,[1 3]);
D2_pin=D2_info(time==I,[1 3]);
D3_pin=D3_info(time==I,[1 3]);
E1_pin=E1_info(time==I,[1 3]);
fprintf('find pins location on only x and z axies \n')
ExcvGlobal_new_xz.Chassis.ToBoom= A1_pin;
ExcvGlobal_new_xz.Chassis.ToBoomCyl= A2_pin;
ExcvGlobal_new_xz.Boom.ToBoomCyl=B1_pin;
ExcvGlobal_new_xz.Boom.ToStickCyl=B2_pin;
ExcvGlobal_new_xz.Boom.ToStick=B3_pin;
ExcvGlobal_new_xz.Stick.ToStickCyl=C1_pin;
ExcvGlobal_new_xz.Stick.ToBucketCyl=C2_pin;
ExcvGlobal_new_xz.Stick.ToBucketLinkage=C3_pin;
ExcvGlobal_new_xz.Stick.ToBucket=C4_pin;
ExcvGlobal_new_xz.Bucket.ToBucketLinkage=D1_pin;
ExcvGlobal_new_xz.Bucket.ToCuttingEdge=D2_pin;
ExcvGlobal_new_xz.Bucket.ToCG=D3_pin;
ExcvGlobal_new_xz.Linkage.ToBucketCyl=E1_pin;
pin_struc =ExcvGlobal_new_xz;