How do I make sure that the plank is perpendicular to the beam ?
Push a side of a mitre square against  the beam and the other side of the miter square against the plank.
Push a side of a mitre square against  the beam and the same side of the miter square against the plank.