Changeset 1959 for trunk/MagicSoft/Cosy/devdrv/macs.cc
- Timestamp:
- 04/14/03 17:54:32 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/devdrv/macs.cc
r1953 r1959 44 44 void Macs::HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv) 45 45 { 46 // cout << "SdoRx: Idx=0x"<< hex << idx << "/" << (int)subidx; 47 // cout << ", val=0x" << val << endl; 46 48 switch (idx) 47 49 { … … 127 129 void Macs::HandleSDOOK(WORD_t idx, BYTE_t subidx, timeval_t *tv) 128 130 { 131 // cout << "Node #" << dec << (int)GetId() << ": Sdo=" << hex << idx << "/" << (int)subidx << " set." << endl; 129 132 switch (idx) 130 133 { … … 201 204 } 202 205 203 204 206 void Macs::ReqVelRes() 205 207 { … … 243 245 SetZombie(); 244 246 } 247 if (IsZombieNode()) 248 return; 245 249 246 250 StopHostGuarding(); … … 252 256 RequestSDO(0x100a); 253 257 WaitForSdo(0x100a); 254 if (IsZombieNode())255 return;256 257 258 // FIXME! Not statically linked! 258 if (fSoftVersion<0x0000004 2) // 00.66259 if (fSoftVersion<0x00000044) // 00.68 259 260 { 260 261 lout << GetNodeName() << " - Software Version too old!" << endl; … … 272 273 WaitForSdo(0x3000); 273 274 274 // SetHome(250000);275 276 // lout << "- Requesting SDO 0x2001 of " << (int)GetId() << endl;277 // RequestSDO(0x2001);278 // WaitForSdo(0x2001);279 280 275 SetPDO1On(FALSE); // this is a workaround for the Macs 281 276 SetPDO1On(TRUE); … … 283 278 SetNoWait(TRUE); 284 279 285 // StartGuarding(500, 2);286 280 // StartGuarding(250, 4); 281 // StartHostGuarding(); 287 282 } 288 283 … … 301 296 302 297 SetNoWait(FALSE); 298 299 StopHostGuarding(); 300 StopGuarding(); 303 301 304 302 // … … 506 504 switch (errnum) 507 505 { 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; 508 512 case 6: 509 513 // … … 515 519 SetError(0); 516 520 return; 517 518 521 case 8: 519 522 lout << "Control deviation overflow." << endl; 520 523 return; 521 522 524 case 9: 523 525 lout << "Zero index not found." << endl; 524 526 return; 525 527 case 10: 528 lout << "Unknown command, syntax error." << endl; 529 lout << "Please recompile and reload program." << endl; 530 return; 526 531 case 11: 527 532 case 25: … … 540 545 { 541 546 case 11: 542 lout << " software endswitch activated." << endl;547 lout << " software"; 543 548 break; 544 549 case 25: 545 lout << " hardware endswitch activated." << endl;550 lout << " hardware"; 546 551 break; 547 552 } 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; 550 588 case 71: 551 589 lout << "Array out of bound." << endl; 552 590 return; 553 591 case 79: 592 lout << "Timeout waiting for index (WAITNDX)." << endl; 593 return; 554 594 case 84: 555 595 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; 556 603 return; 557 604
Note:
See TracChangeset
for help on using the changeset viewer.