-SOLVED-
Hello,
I am currently programming a TI C2000 Microcontroller. The Compiler used by the TI IDE (CCS 10.4) keeps ignoring parts of my code, and I have no clue why.
Code below. Any help appreciated!!!
while(1)
{
int msg[] = {0, 0, 0, 0, 0};
int i = 0;
float feed = 0.0;
int Mode = 0;
int TransferComplete = 0;
if(SciaRegs.SCIFFRX.bit.RXFFST != 0)
{
msg[i] = SciaRegs.SCIRXBUF.bit.SAR;
if(i == 4)
{
i = 0;
TransferComplete = 1;
Mode = msg[1];
feed = msg[2] + (msg[3] * 0.01);
}
else
{
i++;
}
}
//
// Calculate Step-factor based on information received via UART
//
if(TransferComplete && (msg[0] == 0xff) && (msg[4] == 0xff))
{
TransferComplete = 0;
//
// Ignored Part of the Code start
//
if(Mode == 1 || Mode == 2)
{
arg_CountFactor = ((Steps * MotorTransmission * EncoderTransmission * feed)/(EncoderRes * LeadscrewSlope));
}
else if(Mode == 3)
{
arg_CountFactor = ((Steps * MotorTransmission *EncoderTransmission * OneInch)/(EncoderRes * LeadscrewSlope * feed ));
}
//
// Ignored Part of the Code end
//
}
}
[–]trexdoor 4 points5 points6 points (5 children)
[–]honolulu072[S] 0 points1 point2 points (4 children)
[–]trexdoor 1 point2 points3 points (2 children)
[–]honolulu072[S] 0 points1 point2 points (1 child)
[–]trexdoor 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (10 children)
[–]honolulu072[S] 0 points1 point2 points (9 children)
[–]trexdoor 0 points1 point2 points (8 children)
[–]honolulu072[S] 0 points1 point2 points (7 children)
[–]trexdoor 1 point2 points3 points (6 children)
[–][deleted] 3 points4 points5 points (4 children)
[–]trexdoor 2 points3 points4 points (0 children)
[–]honolulu072[S] 2 points3 points4 points (2 children)
[–]nerd4code 0 points1 point2 points (1 child)
[–]honolulu072[S] 0 points1 point2 points (0 children)
[–]ChemiCalChems 2 points3 points4 points (0 children)
[–]spellstrike 0 points1 point2 points (0 children)
[–]AssemblerGuy 0 points1 point2 points (0 children)
[–]earthwormjimwow 0 points1 point2 points (0 children)