swapan
Full Member level 4
Hi guys,
With a view to modulate the width of pulse of a sine wave inverter to get stable output I took 14 sets of values (each set consisting 32 values for 180 degree cycle. Depending upon sample output voltage the sine values will be obtained from corresponding sets. I have derived 14 sets of sine values for 65% to 100% duty cycles. But the code does not built. Please see the code and the error report.
The error message is as under
30 389 Too many initializers of subaggregate SINEWAVE_TWO_DIMENSION.c
30 325 Too many initializers
With a view to modulate the width of pulse of a sine wave inverter to get stable output I took 14 sets of values (each set consisting 32 values for 180 degree cycle. Depending upon sample output voltage the sine values will be obtained from corresponding sets. I have derived 14 sets of sine values for 65% to 100% duty cycles. But the code does not built. Please see the code and the error report.
Code:
const unsigned char table[13][31]={
{0, 20, 40, 59, 78, 96, 113, 129, 144, 157, 169, 179, 188, 194, 199, 202, 203, 202, 199, 194, 188, 179, 169, 157, 144, 129, 113, 96, 78, 59, 40, 20}, //67.5%
{0, 20, 40, 60, 79, 98, 115, 131, 146, 160, 172, 183, 191, 198, 203, 206, 207, 206, 203, 198, 191, 183, 172, 160, 146, 131, 115, 98, 79, 60, 40, 20}, //70%
{0, 21, 41, 61, 80, 99, 117, 133, 148, 162, 175, 185, 194, 201, 206, 209, 210, 209, 206, 201, 194, 185, 175, 162, 148, 133, 117, 99, 80, 61, 41, 21}, //72.5%
{0, 21, 42, 62, 82, 100, 118, 135, 151, 165, 177, 188, 197, 204, 209, 212, 213, 212, 209, 204, 197, 188, 177, 165, 151, 135, 118, 100, 82, 62, 42, 21}, //75%
{0, 21, 42, 63, 83, 102, 121, 138, 153, 168, 180, 191, 200, 208, 213, 216, 217, 216, 213, 208, 200, 191, 180, 168, 153, 138, 121, 102, 83, 63, 42, 21}, //77.5%
{0, 22, 43, 64, 84, 104, 122, 140, 156, 170, 183, 194, 203, 211, 216, 219, 220, 219, 216, 211, 203, 194, 183, 170, 156, 140, 122, 104, 84, 64, 43, 22}, //80%
{0, 22, 44, 65, 86, 106, 124, 142, 158, 173, 186, 198, 207, 214, 220, 223, 224, 223, 220, 214, 207, 198, 186, 173, 158, 142, 124, 106, 86, 65, 44, 22}, //82.5%
{0, 22, 44, 66, 87, 107, 126, 144, 161, 175, 189, 200, 210, 217, 223, 226, 227, 226, 223, 217, 210, 200, 189, 175, 161, 144, 126, 107, 87, 66, 44, 22}, //85
{0, 23, 45, 67, 88, 109, 128, 147, 163, 179, 192, 204, 213, 221, 227, 230, 231, 230, 227, 221, 213, 204, 192, 179, 163, 147, 128, 109, 88, 67, 45, 23}, //87.5%
{0, 23, 46, 68, 90, 110, 130, 148, 165, 181, 195, 206, 216, 224, 230, 233, 234, 233, 230, 224, 216, 206, 195, 181, 165, 148, 130, 110, 90, 68, 46, 23}, //90%
{0, 23, 46, 69, 91, 112, 132, 151, 168, 184, 198, 210, 220, 228, 233, 237, 238, 237, 233, 228, 220, 210, 198, 184, 168, 151, 132, 112, 91, 69, 46, 23}, //92.5%
{0, 24, 47, 71, 93, 115, 135, 154, 172, 188, 202, 214, 225, 233, 238, 242, 243, 242, 238, 233, 225, 214, 202, 188, 172, 154, 135, 115, 93, 71, 47, 24}, // 95%
{0, 24, 48, 72, 95, 117, 138, 157, 175, 192, 206, 219, 229, 237, 243, 247, 248, 247, 243, 237, 229, 219, 206, 192, 175, 157, 138, 117, 95, 72, 48, 24} //98%
};
The error message is as under
30 389 Too many initializers of subaggregate SINEWAVE_TWO_DIMENSION.c
30 325 Too many initializers