Ignore:
Timestamp:
02/17/08 22:39:04 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy/devdrv
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/devdrv/macs.cc

    r8863 r8864  
    7171    case 0xa148: return "Drive controlled interpolated relative positioning lagless with encoder 1";
    7272    case 0xa149: return "Drive controlled interpolated relative positioning lagless with encoder 2";
     73    case 0xa150: return "Drive controlled positioning with encoder 1";
     74    case 0xa151: return "Drive controlled positioning with encoder 2";
    7375    case 0xa208: return "Jog mode positive";
    7476    case 0xa218: return "Jog mode negative";
     
    8688    case 0xe251: return "Motor overtemp warning";
    8789    case 0xe252: return "Bleeder overtemp warning";
     90    case 0xe257: return "Continous current limit active";
     91    case 0xe264: return "Target position out of numerical range";
    8892    case 0xe834: return "Emergency-Stop";
    8993    case 0xe843: return "Positive end-switch activated";
     
    9599    case 0xf224: return "Maximum breaking time exceeded";
    96100    case 0xf228: return "Excessive control deviation";
     101    case 0xf250: return "Overflow of target position preset memory";
    97102    case 0xf269: return "Error during release of the motor holding brake";
    98103    case 0xf276: return "Absolute encoder out of allowed window";
     
    120125    const Int_t type = errinf&0xf000;
    121126
    122     gLog << all << "DKC reports: ";
     127    gLog << all << MTime(-1) << ": " << GetNodeName() << " DKC ";
    123128
    124129    switch (type)
     
    127132    case 0xe000: gLog << "WARNING"; break;
    128133    case 0xa000: gLog << "Status"; break;
     134    case 0xc000:
     135    case 0xd000: gLog << "Message"; break;
    129136    default:     gLog << "Unknown"; break;
    130137    }
     
    134141    gLog << (type==0xf000 || type==0xe000 ? "!" : ".") << endl;
    135142
    136     return type==0xa000;
     143    return type!=0xf000;
    137144}
    138145
     
    148155            return;
    149156        gLog << inf2 << "- " << GetNodeName() << ": Error[0]=" << hex << val << dec << endl;
    150         SetError(EvalStatus(val) ? 0 : val);
     157        CheckErrorDKC(val);
    151158        return;
    152159
     
    680687}
    681688
     689void Macs::CheckErrorDKC(LWORD_t val)
     690{
     691    Bool_t rc = EvalStatus(val);
     692    SetError(rc ? 0 : val);
     693    if (!rc)
     694        SetZombie();
     695}
     696
    682697void Macs::HandlePDO2(const BYTE_t *data, const timeval_t &tv)
    683698{
     
    688703    if (errnum==0xff && (errinf&0xf000)<=0xe000)
    689704    {
    690         EvalStatus(errnum, errinf);
    691         SetError(0);
     705        CheckErrorDKC(errnum, errinf);
    692706        return;
    693707    }
     
    915929    case 0xff:
    916930        gLog << err << "DKC error! Go and check what is going on!" << endl;
    917         DelError();
     931        //DelError();
    918932        return;
    919933/*
  • trunk/MagicSoft/Cosy/devdrv/macs.h

    r8863 r8864  
    4444        return EvalStatus(errnum|(errinf<<16));
    4545    }
     46    void CheckErrorDKC(LWORD_t val);
     47    void CheckErrorDKC(UInt_t errnum, UInt_t errinf)
     48    {
     49        CheckErrorDKC(errnum|(errinf<<16));
     50    }
     51
    4652
    4753    void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, const timeval_t &tv);
Note: See TracChangeset for help on using the changeset viewer.