Changeset 8864 for trunk/MagicSoft/Cosy/devdrv
- Timestamp:
- 02/17/08 22:39:04 (17 years ago)
- Location:
- trunk/MagicSoft/Cosy/devdrv
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/devdrv/macs.cc
r8863 r8864 71 71 case 0xa148: return "Drive controlled interpolated relative positioning lagless with encoder 1"; 72 72 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"; 73 75 case 0xa208: return "Jog mode positive"; 74 76 case 0xa218: return "Jog mode negative"; … … 86 88 case 0xe251: return "Motor overtemp warning"; 87 89 case 0xe252: return "Bleeder overtemp warning"; 90 case 0xe257: return "Continous current limit active"; 91 case 0xe264: return "Target position out of numerical range"; 88 92 case 0xe834: return "Emergency-Stop"; 89 93 case 0xe843: return "Positive end-switch activated"; … … 95 99 case 0xf224: return "Maximum breaking time exceeded"; 96 100 case 0xf228: return "Excessive control deviation"; 101 case 0xf250: return "Overflow of target position preset memory"; 97 102 case 0xf269: return "Error during release of the motor holding brake"; 98 103 case 0xf276: return "Absolute encoder out of allowed window"; … … 120 125 const Int_t type = errinf&0xf000; 121 126 122 gLog << all << "DKC reports:";127 gLog << all << MTime(-1) << ": " << GetNodeName() << " DKC "; 123 128 124 129 switch (type) … … 127 132 case 0xe000: gLog << "WARNING"; break; 128 133 case 0xa000: gLog << "Status"; break; 134 case 0xc000: 135 case 0xd000: gLog << "Message"; break; 129 136 default: gLog << "Unknown"; break; 130 137 } … … 134 141 gLog << (type==0xf000 || type==0xe000 ? "!" : ".") << endl; 135 142 136 return type ==0xa000;143 return type!=0xf000; 137 144 } 138 145 … … 148 155 return; 149 156 gLog << inf2 << "- " << GetNodeName() << ": Error[0]=" << hex << val << dec << endl; 150 SetError(EvalStatus(val) ? 0 :val);157 CheckErrorDKC(val); 151 158 return; 152 159 … … 680 687 } 681 688 689 void Macs::CheckErrorDKC(LWORD_t val) 690 { 691 Bool_t rc = EvalStatus(val); 692 SetError(rc ? 0 : val); 693 if (!rc) 694 SetZombie(); 695 } 696 682 697 void Macs::HandlePDO2(const BYTE_t *data, const timeval_t &tv) 683 698 { … … 688 703 if (errnum==0xff && (errinf&0xf000)<=0xe000) 689 704 { 690 EvalStatus(errnum, errinf); 691 SetError(0); 705 CheckErrorDKC(errnum, errinf); 692 706 return; 693 707 } … … 915 929 case 0xff: 916 930 gLog << err << "DKC error! Go and check what is going on!" << endl; 917 DelError();931 //DelError(); 918 932 return; 919 933 /* -
trunk/MagicSoft/Cosy/devdrv/macs.h
r8863 r8864 44 44 return EvalStatus(errnum|(errinf<<16)); 45 45 } 46 void CheckErrorDKC(LWORD_t val); 47 void CheckErrorDKC(UInt_t errnum, UInt_t errinf) 48 { 49 CheckErrorDKC(errnum|(errinf<<16)); 50 } 51 46 52 47 53 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.