3 phase fully controlled rectifier

Hi, I need to control a 3 phase full wave rectifier using 6 thyristors and each of the gate needs to be controlled using Arduino. Does anyone have the code for this or maybe I can get some advice on how to go about writing the code ? Thanks in advance.!

Basically you have to start the appropriate thyristor based on the zero-crossing and whether you are getting the positive or negative part of the cycle. That for each phase separately.

Start with looking for zero-crossing detection. Get it working for one phase. When that works, add the second and third phase.

Here's a schematic and code for single phase.