I have modified the Sensing Matrix I,Q to Mag, Phase library part in the new sensing matrix system.
I had forgotten that in the c-code, I convert from radians to degrees, and so was doing the conversion again in the model. As it turns out, this gives you a nonsense number. I removed the multiplication by 180/pi in the model, and just use the output of the c-code, which is already in degrees.
I also put in some "choice" blocks just before the divisions in the calibration section of this library part. If it's about to divide by zero, divide by one instead.
The last modification so far today was adding the _PHASE_DEG and _MAG_WPERM (watts per meter) channels to a DAQ channels block, so that they are saved.
The RCG was very unhappy with me having 2 channels, with no data rate after them (doing this is supposed to imply that both should be saved at the default data rate), however after I put in "2048", it was happy. The symptom was a little tricky: The channel names in Dataviewer showed up red, even though the model compiles and runs. An indicator that you have a problem is a note in the model's "GDS" screen (the details screen that you can click to from the CDS front end overview screen). The channel name is "C1:FEC-50_MSGDAQ" (where the number 50 is specific to the c1cal model). After restarting the model, but before restarting the framebuilder's daqd process, this channel said "Error reading DAQ file!", rather than the date and time of the last successful read. At this point, before restarting the daqd process on the framebuilder, all of the fb statuses are green and good. However, after restarting the daqd process on the framebuilder, I got status "0x2000". Anyhow, after trying many different things, I determined that I could have 1 channel, without a specified rate, but if I wanted more than one channel, I needed to specify the rate for both.