New asks...
Well, what platform I am targetting? Well, I dont you it yet.
I just has until now received a code, in C, and I have some questions about the conversion...
Do you have programs done in Basic and C? Like a begginer in PLC, but 16 years of Delphi, VB and Eletric Tec. what I am, can you help me to convert with some question what sure I will have?
Do you know some books pdf or tutorial what can help me in this task?
Thank a lot again.
Part of code what I has received...
void ConvertDataMultiLab(void)
{
int itmp;
float ftmp;
char ctmp[10];
int i;
/* Get BCC of message from MultiLab */
ck = 0;
for (i = 1 ; i < 63 ; ++i)
{
carac = BufferInMtl;
ck = ck ^ carac; /* calcula o BCC */
}
carac = BufferInMtl[63];
ck = carac;
if (ck == carac)
{
/* Convert data from Multilab */
/* Place */
ctmp[0] = BufferInMtl[1];
ctmp[1]='\0';
itmp = atoi(ctmp);
DadosBTR[3] = itmp;
/* Get the field HeatNo */
/* 4 MSB */
memcpy(&ctmp[0],&BufferInMtl[49],4);
ctmp[4]=0;
itmp = atoi (ctmp);
DadosBTR[4] = itmp;
/* 4 LSB */
memcpy(&ctmp[0],&BufferInMtl[53],4);
ctmp[4]=0;
itmp = atoi (ctmp);
DadosBTR[5] = itmp;
/* Obtem o campo temperature; */
memcpy(&ctmp[0],&BufferInMtl[18],4);
ctmp[4]=0;
if (ExisteErroMedicaoMultilab(ctmp))
DadosBTR[6] = 0xFFFF;
else
{
itmp = atoi(ctmp);
DadosBTR[6] = itmp;
}
/* get the field Emf */
memcpy(&ctmp[0],&BufferInMtl[23],6);
ctmp[6]=0;
if (thereismedMultilab(ctmp))
DadosBTR[7] = 0xFFFF;
else
{
ftmp = atof(ctmp);
/* Mantissa */
DadosBTR[7] = (int) ftmp;
/* Decimal */
DadosBTR[8] = (ftmp - DadosBTR[7]) * 1000;
}