Ignore:
Timestamp:
04/14/03 17:54:32 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r1953 r1959  
    4444void Macs::HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv)
    4545{
     46  // cout << "SdoRx: Idx=0x"<< hex << idx << "/" << (int)subidx;
     47  // cout << ", val=0x" << val << endl;
    4648    switch (idx)
    4749    {
     
    127129void Macs::HandleSDOOK(WORD_t idx, BYTE_t subidx, timeval_t *tv)
    128130{
     131//    cout << "Node #" << dec << (int)GetId() << ": Sdo=" << hex << idx  << "/" << (int)subidx << " set." << endl;
    129132    switch (idx)
    130133    {
     
    201204}
    202205
    203 
    204206void Macs::ReqVelRes()
    205207{
     
    243245        SetZombie();
    244246    }
     247    if (IsZombieNode())
     248        return;
    245249
    246250    StopHostGuarding();
     
    252256    RequestSDO(0x100a);
    253257    WaitForSdo(0x100a);
    254     if (IsZombieNode())
    255         return;
    256 
    257258    // FIXME! Not statically linked!
    258     if (fSoftVersion<0x00000042) // 00.66
     259    if (fSoftVersion<0x00000044) // 00.68
    259260    {
    260261        lout << GetNodeName() << " - Software Version too old!" << endl;
     
    272273    WaitForSdo(0x3000);
    273274
    274 //    SetHome(250000);
    275 
    276 //    lout << "- Requesting SDO 0x2001 of " << (int)GetId() << endl;
    277 //    RequestSDO(0x2001);
    278 //    WaitForSdo(0x2001);
    279 
    280275    SetPDO1On(FALSE); // this is a workaround for the Macs
    281276    SetPDO1On(TRUE);
     
    283278    SetNoWait(TRUE);
    284279
    285     //    StartGuarding(500, 2);
    286     //    StartHostGuarding();
     280//    StartGuarding(250, 4);
     281//    StartHostGuarding();
    287282}
    288283
     
    301296
    302297    SetNoWait(FALSE);
     298
     299    StopHostGuarding();
     300    StopGuarding();
    303301
    304302    //
     
    506504    switch (errnum)
    507505    {
     506    case 3:
     507        lout << "Axis does not existing." << endl;
     508        return;
     509    case 5:
     510        lout << "Error not cleared (while trying to move axis)" << endl;
     511        return;
    508512    case 6:
    509513        //
     
    515519        SetError(0);
    516520        return;
    517 
    518521    case 8:
    519522        lout << "Control deviation overflow." << endl;
    520523        return;
    521 
    522524    case 9:
    523525        lout << "Zero index not found." << endl;
    524526        return;
    525 
     527    case 10:
     528        lout << "Unknown command, syntax error." << endl;
     529        lout << "Please recompile and reload program." << endl;
     530        return;
    526531    case 11:
    527532    case 25:
     
    540545        {
    541546        case 11:
    542             lout << " software endswitch activated." << endl;
     547            lout << " software";
    543548            break;
    544549        case 25:
    545             lout << " hardware endswitch activated." << endl;
     550            lout << " hardware";
    546551            break;
    547552        }
    548         return;
    549 
     553        lout << " endswitch activated." << endl;
     554        return;
     555    case 12:
     556        lout << "Wrong parameter number used in SET command." << endl;
     557        return;
     558    case 14:
     559        lout << " Too many LOOP calls." << endl;
     560        return;
     561    case 16:
     562        lout << "Parameter in EEPROM broken (means: EEPROM broken, or saving not finished)" << endl;
     563        lout << "Please use APOSS to 'Reset' the MACS and reload the parameters." << endl;
     564        return;
     565    case 17:
     566        lout << "Program in EEPROM broken (means: EEPROM broken, or saving not finished)" << endl;
     567        lout << "Please use APOSS to delete all Programs restore the programs." << endl;
     568        return;
     569    case 18:
     570        lout << "Reset by CPU (reset called by Watch-dog cause of CPU halted)" << endl;
     571        lout << "Possible reasons: short under-/overvoltage or shortcut." << endl;
     572        return;
     573    case 19:
     574        lout << "User break (autostart program stopped by user)" << endl;
     575        return;
     576    case 51:
     577        lout << "Too many (>=10) GOSUB calls." << endl;
     578        return;
     579    case 52:
     580        lout << "Too many RETURN calls." << endl;
     581        return;
     582    case 62:
     583        lout << "Error veryfiing EEPROM after access (Try again savaing parameters or program)" << endl;
     584        return;
     585    case 70:
     586        lout << "Error in DIM call (call to DIM doesn't fit existing DIM call)" << endl;
     587        return;
    550588    case 71:
    551589        lout << "Array out of bound." << endl;
    552590        return;
    553 
     591    case 79:
     592        lout << "Timeout waiting for index (WAITNDX)." << endl;
     593        return;
    554594    case 84:
    555595        lout << "Too many (>12) ON TIME calls." << endl;
     596        return;
     597    case 87:
     598        lout << "Out of memory for variables - Check APOSS predifined number of" << endl;
     599        lout << "variables and try deleting the array by doing a 'Reset' from APOSS." << endl;
     600        return;
     601    case 89:
     602        lout << "CAN I/O error (REOPEN=" << dec << errinf << " " << (errinf==0?"OK":"ERR") << ")" << endl;
    556603        return;
    557604
Note: See TracChangeset for help on using the changeset viewer.