Functional overview

Discussions and file drops for Auggie
Post Reply
Richard Cullin
Site Admin
Posts: 152
Joined: Sat Jun 02, 2012 4:45 pm

Re: Functional overview

Post by Richard Cullin »

thanks art
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: Functional overview

Post by ArtF »

Richard:

 New version is online, if you call myser.ReadData() to get a string, at the same time
myser.Table is filled with integers of the incoming values. So to use byte 6,7 youd use

str = myser.ReadData( 8 );
byte6 = myser.Table[6];
byte7 = myser.Table[7]; //assuming byte 0 numbering of course..

Art
Last edited by ArtF on Fri Jan 06, 2017 9:12 pm, edited 1 time in total.
Richard Cullin
Site Admin
Posts: 152
Joined: Sat Jun 02, 2012 4:45 pm

Re: Functional overview

Post by Richard Cullin »

thanks I will  give a try

Richard Cullin
Site Admin
Posts: 152
Joined: Sat Jun 02, 2012 4:45 pm

Re: Functional overview

Post by Richard Cullin »

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 interpreted 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 GetVfdSpeed = function( )
{
    CRC=0xffff;
    vfd={1,4,3,1,0,0};
&nbsp; &nbsp; for (inx=0;inx<tableCount(vfd);inx+=1)
&nbsp; &nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CRC=Crc16(CRC,vfd[inx]);
&nbsp; &nbsp; &nbsp; };
&nbsp; &nbsp; &nbsp; // print("the CRC " + CRC);
&nbsp; &nbsp; vfd[7]=ToInt(CRC/256);
&nbsp; &nbsp; vfd[6]=ToInt(CRC%256);


&nbsp; &nbsp; myser.Table = vfd;
&nbsp; &nbsp; myser.SendTable();
&nbsp; &nbsp; //sleep(1);

while( myser.DataWaiting() <8) { yield();};
print("buff depth " + myser.DataWaiting() );
//str = myser.GetData();
//print( "buffer "+str );

bd=myser.DataWaiting();


&nbsp; &nbsp; string = myser.ReadData(bd&nbsp; );

&nbsp; &nbsp; vfdrpm=(myser.Table[bd-4]*256+myser.Table[bd-3])*55/100;
&nbsp; &nbsp; print("high " + myser.Table[4] + " low " + myser.Table[5] );
&nbsp; &nbsp; print("Rpm&nbsp; read " +&nbsp; vfdrpm );
&nbsp; &nbsp; return vfdrpm;
};

ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: Functional overview

Post by ArtF »

lol.. my bad. Ill probably have to do that for you when I pack them. Ill check it out.

Art
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: Functional overview

Post by ArtF »

Richard:

Just uploading now a proper unsigned int version..

Art
Richard Cullin
Site Admin
Posts: 152
Joined: Sat Jun 02, 2012 4:45 pm

Re: Functional overview

Post by Richard Cullin »


downloaded new version and tried again this morning, its no different .&nbsp; did I jump the gun ?
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: Functional overview

Post by ArtF »

Richard:

I doubt it, it likely just didnt work. ( I have no serial device so Im writing the code a bit blind).
Ill do an internal trace and get back to you..

Art
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: Functional overview

Post by ArtF »

Richard:

Try it now, Ive tested it sends proper integers..

Art
Richard Cullin
Site Admin
Posts: 152
Joined: Sat Jun 02, 2012 4:45 pm

Re: Functional overview

Post by Richard Cullin »

fixed&nbsp; , thanks art

do you have any thoughts re&nbsp; a pendant/mpg&nbsp; for auggie ?
I have a vista_cnc&nbsp; mach3 pendant, could auggie ever support 3rd party addons like that as mach3 does ?
one of the things that led me down the auggie track was that the Chinese motion controller I was using did not support probing g31,g38 [afaikr] style via mach3 and the pokeyscnc57 does . probing&nbsp; just one more thing to think about&nbsp; I don't think a script alone could get the timing correct for accurate position at contact
Post Reply