I modified C1LSC.mdl to use the CDSphase blocks, which automatically calculate the R and D phase rotation for us. Now each of the RFPDs has 2 channels in place of the old IQ_MTRX channels: C1:LSC-RFPD_PHASE_R and C1:LSC-RFPD_PHASE_D.
I have not yet compiled / rebooted / done CDS magic to actually make these installed. So far the change is only in the simulink model.
I was going to wait until morning to compile/reboot/magic, so I can do it under Joe's supervision.
In the meantime, I also modified the RFPD screens. They have white boxes for the _R and _D channels just now, but that's because the new model hasn't been put in. They now look like phase rotators, instead of Koji's temporary matrix.
Still to do: Find the EPICS database where the phase rotation calculation is done (you give it an angle, it gives you sin(angle) and cos(angle) ). I want to put a "90-angle" in the database so that we can type in the measured relative phase between I and Q, and it will calculate how many more degrees it needs to get to 90deg.
|