On 02/06/2021 09:45 PM, Gene Heskett wrote:
Greetngs Jon;

I am in the process of installing a newer machine to run that GO704.

But I cannot find a copy of boot.comp to build for the buster kernel.

Where can I pull another copy of it from?


Hmm, I have a copy of what looks to be the right thing. But, it is from 2014, so it might have
compatibility issues with newer LinuxCNC versions.

I just had to swap out the computer on my Bridgeport, and had to manually do all the ini and hal file changes for 2.8.

Jon


component boot "enable state machine for Pico Systems brush PWM servo amp";
pin in bit enable "enable input";
pin in float pid0 "pid input 0";
pin in float pid1 "pid input 1";
pin in float pid2 "pid input 2";
pin in float pid3 "pid input 3";
pin out float pout0 "pid output 0";
pin out float pout1 "pid output 1";
pin out float pout2 "pid output 2";
pin out float pout3 "pid output 3";
pin out u32 state "state";
option data boot_data;

function _;
license "GPL";
;;

typedef struct { int oldenable; int cstate;} boot_data;

FUNCTION(_) {
    int newstate;

    if ( enable == 0 ) { // recognize rising edge of enable
       newstate = 0;
    } else {
        if (data.cstate == 0) {
           pout0 = pid0;        // pass PID value through to servo
           pout1 = pid1;   // and wait a while before booting servo
           pout2 = pid2;
           pout3 = pid3;
           newstate = 1;
        }
    if (data.cstate == 1) {
        pout0 = pid0;   // pass PID value through to servo
        pout1 = pid1;   // and wait a while before booting servo
        pout2 = pid2;
        pout3 = pid3;
        newstate = 2;
    }
    if (data.cstate == 2) {
        pout0 = pid0;   // pass PID value through to servo
        pout1 = pid1;   // and wait a while before booting servo
        pout2 = pid2;
        pout3 = pid3;
        newstate = 3;
    }
    if (data.cstate == 3) {
        pout0 = 0.5;    // set output to +5%
        pout1 = 0.5;
        pout2 = 0.5;
        pout3 = 0.5;
        newstate = 4;
    }
    if (data.cstate == 4) {
        pout0 = -0.5;   // set output to -5%
        pout1 = -0.5;
        pout2 = -0.5;
        pout3 = -0.5;
        newstate = 5;
        }
    if (data.cstate == 5) {
        pout0 = pid0;   // pass PID value through to servo
        pout1 = pid1;
        pout2 = pid2;
        pout3 = pid3;
        newstate = 5;
        }
    }
    data.oldenable = enable;
    data.cstate = newstate;
    state = data.cstate;
}
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to