Changeset 912 for trunk/MagicSoft/Cosy/devdrv
- Timestamp:
- 08/17/01 15:12:57 (23 years ago)
- Location:
- trunk/MagicSoft/Cosy/devdrv
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/devdrv/macs.cc
r910 r912 419 419 double Macs::GetTime() 420 420 { 421 return fPosTime. GetTime();421 return fPosTime.Now(); 422 422 } 423 423 424 424 double Macs::GetMjd() 425 425 { 426 return fPosTime. GetMjd();426 return fPosTime.CalcMjd(); 427 427 } 428 428 429 429 double Macs::GetPdoTime() 430 430 { 431 return fPdoTime. GetTime();431 return fPdoTime.Now(); 432 432 } 433 433 434 434 double Macs::GetPdoMjd() 435 435 { 436 return fPdoTime. GetMjd();436 return fPdoTime.CalcMjd(); 437 437 } 438 438 -
trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc
r910 r912 32 32 { 33 33 case 0x1000: 34 cout << "Model: ";34 lout << "- Model: "; 35 35 switch (val&0xffff) 36 36 { 37 37 case 0x0196: 38 cout << "Shaft Encoder Type: ";38 lout << "Shaft Encoder Type: "; 39 39 switch ((val>>16)&0xff) 40 40 { 41 41 case 0x01: 42 cout << "Singleturn" << endl;42 lout << "Singleturn" << endl; 43 43 return; 44 44 case 0x02: 45 cout << "Multiturn" << endl;45 lout << "Multiturn" << endl; 46 46 return; 47 47 default: 48 cout << "?" << endl;48 lout << "?" << endl; 49 49 return; 50 50 } 51 51 default: 52 cout << "???" << endl;52 lout << "???" << endl; 53 53 return; 54 54 } 55 55 case 0x100b: 56 cout << "Node ID: " << dec << val << endl;56 lout << "Node ID: " << dec << val << endl; 57 57 return; 58 58 59 59 case 0x6000: 60 60 case 0x6500: 61 cout << "Counting: " << (val&1 ?"anti-clockwise":"clockwise") << " ";62 cout << "HwTest: " << (val&2 ?"on":"off") << " ";63 cout << "Scaling: " << (val&4 ?"on":"off") << " ";64 cout << "Modulo: " << (val&4096?"on":"off") << endl;61 lout << "- Counting: " << (val&1 ?"anti-clockwise":"clockwise") << " "; 62 lout << "HwTest: " << (val&2 ?"on":"off") << " "; 63 lout << "Scaling: " << (val&4 ?"on":"off") << " "; 64 lout << "Modulo: " << (val&4096?"on":"off") << endl; 65 65 66 66 case 0x6001: 67 cout << "Logical Ticks/Turn: " << dec << val << endl;67 lout << "- Logical Ticks/Revolution: " << dec << val << endl; 68 68 return; 69 69 70 70 case 0x6004: 71 cout << "Position: " << dec << val << endl;71 lout << "- Position: " << dec << val << endl; 72 72 fPos = val; 73 73 fTurn = 0; … … 76 76 77 77 case 0x6501: 78 cout << "Phys. Ticks/Turn: " << dec << val << endl;78 lout << "- Phys. Ticks/Revolution: " << dec << val << endl; 79 79 fTicks = val; 80 80 return; 81 81 82 82 case 0x6502: 83 cout << "Possible Turns: " << dec << val << endl;83 lout << "- Possible Turns: " << dec << val << endl; 84 84 fTurns = val ? val : 1; // Single Turn = Multiturn with one turn 85 85 return; … … 209 209 double ShaftEncoder::GetTime() 210 210 { 211 return fTime. GetTime();211 return fTime.Now(); 212 212 } 213 213 214 214 double ShaftEncoder::GetMjd() 215 215 { 216 return fTime. GetMjd();216 return fTime.CalcMjd(); 217 217 } 218 218 … … 228 228 // Requesting and checking (FIXME) type of encoder 229 229 // 230 lout << "- Requesting SDO 0x1000of " << (int)GetId() << endl;230 lout << "- Requesting Hardware Type (SDO 0x1000) of " << (int)GetId() << endl; 231 231 RequestSDO(0x1000); 232 232 WaitForSdo(0x1000); 233 233 234 234 // 235 // Read physical ticks per turn236 // 237 lout << "- Requesting SDO 0x6501of " << (int)GetId() << endl;235 // Read physical ticks per revolution 236 // 237 lout << "- Requesting physical ticks/revolution (SDO 0x6501) of " << (int)GetId() << endl; 238 238 RequestSDO(0x6501); 239 239 WaitForSdo(0x6501); 240 240 241 241 // 242 // Read number of possible ticks per turn243 // 244 lout << "- Requesting SDO 0x6502of " << (int)GetId() << endl;242 // Read number of possible ticks per revolution 243 // 244 lout << "- Requesting possible ticks/revolution (SDO 0x6502) of " << (int)GetId() << endl; 245 245 RequestSDO(0x6502); 246 246 WaitForSdo(0x6502); 247 247 248 248 // 249 // Set logic ticks per turn = physical ticks per turn => scale factor = 1249 // Set logic ticks/revolution = physical ticks/revolution => scale factor = 1 250 250 // 251 251 lout << "- Configuring SDO 0x6001 of " << (int)GetId() << endl;
Note:
See TracChangeset
for help on using the changeset viewer.