still in a bit of trouble, very nearly works
data returned @6000 rpm is 0x2a,0x9d for table[4],table[5]

very good
but table[5] is interpret
ed as signed so 0x2a * 256 =10752 + 0x9d needs to be 10909 not 10653
I think this is happening to the setspeed calcs too
how can I get to use unsigned values ?
code
global GetVfdSpe
ed = function( )
{
CRC=0xffff;
vfd={1,4,3,1,0,0};
for (inx=0;inx<tableCoun
t(vfd);inx+=1)
{
CRC=Crc16(CRC,vfd[inx]);
};
// print("the CRC " + CRC);
vfd[7]=ToInt(CRC/256);
vfd[6]=ToInt(CRC%256);
myser.Tab
le = vfd;
myser.Sen
dTable();
//sleep(1);
while( myser.Dat
aWaiting() <

{ yield();};
print("buff depth " + myser.Dat
aWaiting() );
//str = myser.Get
Data();
//print( "buffer "+str );
bd=myser.DataWaiting();
string = myser.Rea
dData(bd );
vfdrpm=(myser.Tab
le[bd-4]*256+myser.Table[bd-3])*55/100;
print("high " + myser.Tab
le[4] + " low " + myser.Tab
le[5] );
print("Rpm read " + vfdrpm );
return vfdrpm;
};